Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java +2 −0 Original line number Diff line number Diff line Loading @@ -296,6 +296,8 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba mShadeController.animateCollapsePanels(); } } mNotificationPanelViewController.disable(state1, state2, animate); } /** Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/LargeScreenShadeHeaderController.kt +12 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.phone import android.app.StatusBarManager import android.view.View import androidx.constraintlayout.motion.widget.MotionLayout import com.android.settingslib.Utils Loading Loading @@ -68,6 +69,9 @@ class LargeScreenShadeHeaderController @Inject constructor( private val iconContainer: StatusIconContainer private val carrierIconSlots: List<String> private val qsCarrierGroupController: QSCarrierGroupController private var qsDisabled = false private var visible = false set(value) { if (field == value) { Loading Loading @@ -177,6 +181,13 @@ class LargeScreenShadeHeaderController @Inject constructor( updateConstraints() } fun disable(state1: Int, state2: Int, animate: Boolean) { val disabled = state2 and StatusBarManager.DISABLE2_QUICK_SETTINGS != 0 if (disabled == qsDisabled) return qsDisabled = disabled updateVisibility() } private fun updateScrollY() { if (!active && combinedHeaders) { header.scrollY = qsScrollY Loading Loading @@ -204,7 +215,7 @@ class LargeScreenShadeHeaderController @Inject constructor( } private fun updateVisibility() { val visibility = if (!active && !combinedHeaders) { val visibility = if (!active && !combinedHeaders || qsDisabled) { View.GONE } else if (shadeExpanded) { View.VISIBLE Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +4 −0 Original line number Diff line number Diff line Loading @@ -4140,6 +4140,10 @@ public class NotificationPanelViewController extends PanelViewController { return mNotificationStackScrollLayoutController; } public void disable(int state1, int state2, boolean animated) { mLargeScreenShadeHeaderController.disable(state1, state2, animated); } /** * Close the keyguard user switcher if it is open and capable of closing. * Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/LargeScreenShadeHeaderControllerTest.kt +18 −0 Original line number Diff line number Diff line package com.android.systemui.statusbar.phone import android.app.StatusBarManager import android.testing.AndroidTestingRunner import android.view.View import androidx.test.filters.SmallTest Loading Loading @@ -116,6 +117,23 @@ class LargeScreenShadeHeaderControllerTest : SysuiTestCase() { verify(statusIcons).addIgnoredSlots(carrierIconSlots) } @Test fun disableQS_notDisabled_visible() { makeShadeVisible() mLargeScreenShadeHeaderController.disable(0, 0, false) assertThat(viewVisibility).isEqualTo(View.VISIBLE) } @Test fun disableQS_disabled_gone() { makeShadeVisible() mLargeScreenShadeHeaderController.disable(0, StatusBarManager.DISABLE2_QUICK_SETTINGS, false) assertThat(viewVisibility).isEqualTo(View.GONE) } private fun makeShadeVisible() { mLargeScreenShadeHeaderController.active = true mLargeScreenShadeHeaderController.shadeExpanded = true Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java +2 −0 Original line number Diff line number Diff line Loading @@ -296,6 +296,8 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba mShadeController.animateCollapsePanels(); } } mNotificationPanelViewController.disable(state1, state2, animate); } /** Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/LargeScreenShadeHeaderController.kt +12 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.phone import android.app.StatusBarManager import android.view.View import androidx.constraintlayout.motion.widget.MotionLayout import com.android.settingslib.Utils Loading Loading @@ -68,6 +69,9 @@ class LargeScreenShadeHeaderController @Inject constructor( private val iconContainer: StatusIconContainer private val carrierIconSlots: List<String> private val qsCarrierGroupController: QSCarrierGroupController private var qsDisabled = false private var visible = false set(value) { if (field == value) { Loading Loading @@ -177,6 +181,13 @@ class LargeScreenShadeHeaderController @Inject constructor( updateConstraints() } fun disable(state1: Int, state2: Int, animate: Boolean) { val disabled = state2 and StatusBarManager.DISABLE2_QUICK_SETTINGS != 0 if (disabled == qsDisabled) return qsDisabled = disabled updateVisibility() } private fun updateScrollY() { if (!active && combinedHeaders) { header.scrollY = qsScrollY Loading Loading @@ -204,7 +215,7 @@ class LargeScreenShadeHeaderController @Inject constructor( } private fun updateVisibility() { val visibility = if (!active && !combinedHeaders) { val visibility = if (!active && !combinedHeaders || qsDisabled) { View.GONE } else if (shadeExpanded) { View.VISIBLE Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +4 −0 Original line number Diff line number Diff line Loading @@ -4140,6 +4140,10 @@ public class NotificationPanelViewController extends PanelViewController { return mNotificationStackScrollLayoutController; } public void disable(int state1, int state2, boolean animated) { mLargeScreenShadeHeaderController.disable(state1, state2, animated); } /** * Close the keyguard user switcher if it is open and capable of closing. * Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/LargeScreenShadeHeaderControllerTest.kt +18 −0 Original line number Diff line number Diff line package com.android.systemui.statusbar.phone import android.app.StatusBarManager import android.testing.AndroidTestingRunner import android.view.View import androidx.test.filters.SmallTest Loading Loading @@ -116,6 +117,23 @@ class LargeScreenShadeHeaderControllerTest : SysuiTestCase() { verify(statusIcons).addIgnoredSlots(carrierIconSlots) } @Test fun disableQS_notDisabled_visible() { makeShadeVisible() mLargeScreenShadeHeaderController.disable(0, 0, false) assertThat(viewVisibility).isEqualTo(View.VISIBLE) } @Test fun disableQS_disabled_gone() { makeShadeVisible() mLargeScreenShadeHeaderController.disable(0, StatusBarManager.DISABLE2_QUICK_SETTINGS, false) assertThat(viewVisibility).isEqualTo(View.GONE) } private fun makeShadeVisible() { mLargeScreenShadeHeaderController.active = true mLargeScreenShadeHeaderController.shadeExpanded = true Loading