Loading packages/SystemUI/shared/src/com/android/systemui/shared/system/QuickStepContract.java +6 −1 Original line number Diff line number Diff line Loading @@ -347,7 +347,12 @@ public class QuickStepContract { } // Disable back gesture on the hub, but not when the shade is showing. if ((sysuiStateFlags & SYSUI_STATE_COMMUNAL_HUB_SHOWING) != 0) { return (sysuiStateFlags & SYSUI_STATE_NOTIFICATION_PANEL_VISIBLE) == 0; // Use QS expanded signal as the notification panel is always considered visible // expanded when on the lock screen and when opening hub over lock screen. This does // mean that back gesture is disabled when opening shade over hub while in portrait // mode, since QS is not expanded. // TODO(b/370108274): allow back gesture on shade over hub in portrait return (sysuiStateFlags & SYSUI_STATE_QUICK_SETTINGS_EXPANDED) == 0; } if ((sysuiStateFlags & SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY) != 0) { sysuiStateFlags &= ~SYSUI_STATE_NAV_BAR_HIDDEN; Loading packages/SystemUI/tests/src/com/android/systemui/shared/system/QuickStepContractTest.kt +3 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BOUNCER_SHOWING import com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_COMMUNAL_HUB_SHOWING import com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_VISIBLE import com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_QUICK_SETTINGS_EXPANDED import com.google.common.truth.Truth.assertThat import kotlin.test.Test import org.junit.runner.RunWith Loading @@ -41,9 +41,9 @@ class QuickStepContractTest : SysuiTestCase() { } @Test fun isBackGestureDisabled_hubAndShadeShowing() { fun isBackGestureDisabled_hubAndQSExpanded() { val sysuiStateFlags = SYSUI_STATE_COMMUNAL_HUB_SHOWING and SYSUI_STATE_NOTIFICATION_PANEL_VISIBLE SYSUI_STATE_COMMUNAL_HUB_SHOWING and SYSUI_STATE_QUICK_SETTINGS_EXPANDED // Gestures are enabled because the shade shows over the hub. assertThat( Loading Loading
packages/SystemUI/shared/src/com/android/systemui/shared/system/QuickStepContract.java +6 −1 Original line number Diff line number Diff line Loading @@ -347,7 +347,12 @@ public class QuickStepContract { } // Disable back gesture on the hub, but not when the shade is showing. if ((sysuiStateFlags & SYSUI_STATE_COMMUNAL_HUB_SHOWING) != 0) { return (sysuiStateFlags & SYSUI_STATE_NOTIFICATION_PANEL_VISIBLE) == 0; // Use QS expanded signal as the notification panel is always considered visible // expanded when on the lock screen and when opening hub over lock screen. This does // mean that back gesture is disabled when opening shade over hub while in portrait // mode, since QS is not expanded. // TODO(b/370108274): allow back gesture on shade over hub in portrait return (sysuiStateFlags & SYSUI_STATE_QUICK_SETTINGS_EXPANDED) == 0; } if ((sysuiStateFlags & SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY) != 0) { sysuiStateFlags &= ~SYSUI_STATE_NAV_BAR_HIDDEN; Loading
packages/SystemUI/tests/src/com/android/systemui/shared/system/QuickStepContractTest.kt +3 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BOUNCER_SHOWING import com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_COMMUNAL_HUB_SHOWING import com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_VISIBLE import com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_QUICK_SETTINGS_EXPANDED import com.google.common.truth.Truth.assertThat import kotlin.test.Test import org.junit.runner.RunWith Loading @@ -41,9 +41,9 @@ class QuickStepContractTest : SysuiTestCase() { } @Test fun isBackGestureDisabled_hubAndShadeShowing() { fun isBackGestureDisabled_hubAndQSExpanded() { val sysuiStateFlags = SYSUI_STATE_COMMUNAL_HUB_SHOWING and SYSUI_STATE_NOTIFICATION_PANEL_VISIBLE SYSUI_STATE_COMMUNAL_HUB_SHOWING and SYSUI_STATE_QUICK_SETTINGS_EXPANDED // Gestures are enabled because the shade shows over the hub. assertThat( Loading