Loading packages/SystemUI/multivalentTests/src/com/android/systemui/navigationbar/views/NavigationBarTest.java +5 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import static com.android.systemui.assist.AssistManager.INVOCATION_TYPE_HOME_BUT import static com.android.systemui.navigationbar.views.NavigationBar.NavBarActionEvent.NAVBAR_ASSIST_LONGPRESS; import static com.android.systemui.navigationbar.views.buttons.KeyButtonView.NavBarButtonEvent.NAVBAR_IME_SWITCHER_BUTTON_LONGPRESS; import static com.android.systemui.navigationbar.views.buttons.KeyButtonView.NavBarButtonEvent.NAVBAR_IME_SWITCHER_BUTTON_TAP; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_ALT_BACK; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_VISIBLE; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING; Loading Loading @@ -502,6 +503,7 @@ public class NavigationBarTest extends SysuiTestCase { BACK_DISPOSITION_DEFAULT, true /* showImeSwitcher */); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_VISIBLE), eq(true)); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE), eq(true)); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_ALT_BACK), eq(true)); } /** Loading @@ -516,6 +518,7 @@ public class NavigationBarTest extends SysuiTestCase { BACK_DISPOSITION_DEFAULT, false /* showImeSwitcher */); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_VISIBLE), eq(true)); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE), eq(false)); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_ALT_BACK), eq(true)); } /** Loading @@ -533,6 +536,7 @@ public class NavigationBarTest extends SysuiTestCase { BACK_DISPOSITION_DEFAULT, true /* showImeSwitcher */); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_VISIBLE), eq(false)); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE), eq(false)); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_ALT_BACK), eq(false)); } /** Loading @@ -547,6 +551,7 @@ public class NavigationBarTest extends SysuiTestCase { BACK_DISPOSITION_ADJUST_NOTHING, true /* showImeSwitcher */); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_VISIBLE), eq(true)); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE), eq(true)); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_ALT_BACK), eq(false)); } @Test Loading packages/SystemUI/shared/src/com/android/systemui/shared/system/QuickStepContract.java +6 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,8 @@ public class QuickStepContract { public static final long SYSUI_STATE_DISABLE_GESTURE_PIP_ANIMATING = 1L << 34; // Communal hub is showing public static final long SYSUI_STATE_COMMUNAL_HUB_SHOWING = 1L << 35; // The back button is adjusted for the IME. public static final long SYSUI_STATE_IME_ALT_BACK = 1L << 36; // Mask for SystemUiStateFlags to isolate SYSUI_STATE_AWAKE and // SYSUI_STATE_WAKEFULNESS_TRANSITION, to match WAKEFULNESS_* constants Loading Loading @@ -185,6 +187,7 @@ public class QuickStepContract { SYSUI_STATE_TOUCHPAD_GESTURES_DISABLED, SYSUI_STATE_DISABLE_GESTURE_PIP_ANIMATING, SYSUI_STATE_COMMUNAL_HUB_SHOWING, SYSUI_STATE_IME_ALT_BACK, }) public @interface SystemUiStateFlags {} Loading Loading @@ -295,6 +298,9 @@ public class QuickStepContract { if ((flags & SYSUI_STATE_COMMUNAL_HUB_SHOWING) != 0) { str.add("communal_hub_showing"); } if ((flags & SYSUI_STATE_IME_ALT_BACK) != 0) { str.add("ime_alt_back"); } return str.toString(); } Loading packages/SystemUI/src/com/android/systemui/navigationbar/TaskbarDelegate.java +4 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.navigationbar; import static android.app.ActivityManager.LOCK_TASK_MODE_PINNED; import static android.app.StatusBarManager.NAVIGATION_HINT_BACK_ALT; import static android.app.StatusBarManager.NAVIGATION_HINT_IME_VISIBLE; import static android.app.StatusBarManager.NAVIGATION_HINT_IME_SWITCHER_BUTTON_VISIBLE; import static android.app.StatusBarManager.WINDOW_STATE_SHOWING; Loading @@ -30,6 +31,7 @@ import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BACK_DISABLED; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_HOME_DISABLED; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_ALT_BACK; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_VISIBLE; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NAV_BAR_HIDDEN; Loading Loading @@ -366,6 +368,8 @@ public class TaskbarDelegate implements CommandQueue.Callbacks, (mNavigationIconHints & NAVIGATION_HINT_IME_VISIBLE) != 0) .setFlag(SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE, (mNavigationIconHints & NAVIGATION_HINT_IME_SWITCHER_BUTTON_VISIBLE) != 0) .setFlag(SYSUI_STATE_IME_ALT_BACK, (mNavigationIconHints & NAVIGATION_HINT_BACK_ALT) != 0) .setFlag(SYSUI_STATE_OVERVIEW_DISABLED, (mDisabledFlags & View.STATUS_BAR_DISABLE_RECENT) != 0) .setFlag(SYSUI_STATE_HOME_DISABLED, Loading packages/SystemUI/src/com/android/systemui/navigationbar/views/NavigationBar.java +4 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.navigationbar.views; import static android.app.ActivityManager.LOCK_TASK_MODE_PINNED; import static android.app.StatusBarManager.NAVIGATION_HINT_BACK_ALT; import static android.app.StatusBarManager.NAVIGATION_HINT_IME_VISIBLE; import static android.app.StatusBarManager.NAVIGATION_HINT_IME_SWITCHER_BUTTON_VISIBLE; import static android.app.StatusBarManager.WINDOW_STATE_HIDDEN; Loading @@ -43,6 +44,7 @@ import static com.android.systemui.shared.statusbar.phone.BarTransitions.Transit import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_CLICKABLE; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_ALT_BACK; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_VISIBLE; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NAV_BAR_HIDDEN; Loading Loading @@ -1688,6 +1690,8 @@ public class NavigationBar extends ViewController<NavigationBarView> implements (mNavigationIconHints & NAVIGATION_HINT_IME_VISIBLE) != 0) .setFlag(SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE, (mNavigationIconHints & NAVIGATION_HINT_IME_SWITCHER_BUTTON_VISIBLE) != 0) .setFlag(SYSUI_STATE_IME_ALT_BACK, (mNavigationIconHints & NAVIGATION_HINT_BACK_ALT) != 0) .setFlag(SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY, allowSystemGestureIgnoringBarVisibility()) .commitUpdate(mDisplayId); Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/navigationbar/views/NavigationBarTest.java +5 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import static com.android.systemui.assist.AssistManager.INVOCATION_TYPE_HOME_BUT import static com.android.systemui.navigationbar.views.NavigationBar.NavBarActionEvent.NAVBAR_ASSIST_LONGPRESS; import static com.android.systemui.navigationbar.views.buttons.KeyButtonView.NavBarButtonEvent.NAVBAR_IME_SWITCHER_BUTTON_LONGPRESS; import static com.android.systemui.navigationbar.views.buttons.KeyButtonView.NavBarButtonEvent.NAVBAR_IME_SWITCHER_BUTTON_TAP; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_ALT_BACK; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_VISIBLE; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING; Loading Loading @@ -502,6 +503,7 @@ public class NavigationBarTest extends SysuiTestCase { BACK_DISPOSITION_DEFAULT, true /* showImeSwitcher */); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_VISIBLE), eq(true)); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE), eq(true)); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_ALT_BACK), eq(true)); } /** Loading @@ -516,6 +518,7 @@ public class NavigationBarTest extends SysuiTestCase { BACK_DISPOSITION_DEFAULT, false /* showImeSwitcher */); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_VISIBLE), eq(true)); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE), eq(false)); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_ALT_BACK), eq(true)); } /** Loading @@ -533,6 +536,7 @@ public class NavigationBarTest extends SysuiTestCase { BACK_DISPOSITION_DEFAULT, true /* showImeSwitcher */); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_VISIBLE), eq(false)); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE), eq(false)); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_ALT_BACK), eq(false)); } /** Loading @@ -547,6 +551,7 @@ public class NavigationBarTest extends SysuiTestCase { BACK_DISPOSITION_ADJUST_NOTHING, true /* showImeSwitcher */); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_VISIBLE), eq(true)); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE), eq(true)); verify(mMockSysUiState).setFlag(eq(SYSUI_STATE_IME_ALT_BACK), eq(false)); } @Test Loading
packages/SystemUI/shared/src/com/android/systemui/shared/system/QuickStepContract.java +6 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,8 @@ public class QuickStepContract { public static final long SYSUI_STATE_DISABLE_GESTURE_PIP_ANIMATING = 1L << 34; // Communal hub is showing public static final long SYSUI_STATE_COMMUNAL_HUB_SHOWING = 1L << 35; // The back button is adjusted for the IME. public static final long SYSUI_STATE_IME_ALT_BACK = 1L << 36; // Mask for SystemUiStateFlags to isolate SYSUI_STATE_AWAKE and // SYSUI_STATE_WAKEFULNESS_TRANSITION, to match WAKEFULNESS_* constants Loading Loading @@ -185,6 +187,7 @@ public class QuickStepContract { SYSUI_STATE_TOUCHPAD_GESTURES_DISABLED, SYSUI_STATE_DISABLE_GESTURE_PIP_ANIMATING, SYSUI_STATE_COMMUNAL_HUB_SHOWING, SYSUI_STATE_IME_ALT_BACK, }) public @interface SystemUiStateFlags {} Loading Loading @@ -295,6 +298,9 @@ public class QuickStepContract { if ((flags & SYSUI_STATE_COMMUNAL_HUB_SHOWING) != 0) { str.add("communal_hub_showing"); } if ((flags & SYSUI_STATE_IME_ALT_BACK) != 0) { str.add("ime_alt_back"); } return str.toString(); } Loading
packages/SystemUI/src/com/android/systemui/navigationbar/TaskbarDelegate.java +4 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.navigationbar; import static android.app.ActivityManager.LOCK_TASK_MODE_PINNED; import static android.app.StatusBarManager.NAVIGATION_HINT_BACK_ALT; import static android.app.StatusBarManager.NAVIGATION_HINT_IME_VISIBLE; import static android.app.StatusBarManager.NAVIGATION_HINT_IME_SWITCHER_BUTTON_VISIBLE; import static android.app.StatusBarManager.WINDOW_STATE_SHOWING; Loading @@ -30,6 +31,7 @@ import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BACK_DISABLED; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_HOME_DISABLED; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_ALT_BACK; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_VISIBLE; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NAV_BAR_HIDDEN; Loading Loading @@ -366,6 +368,8 @@ public class TaskbarDelegate implements CommandQueue.Callbacks, (mNavigationIconHints & NAVIGATION_HINT_IME_VISIBLE) != 0) .setFlag(SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE, (mNavigationIconHints & NAVIGATION_HINT_IME_SWITCHER_BUTTON_VISIBLE) != 0) .setFlag(SYSUI_STATE_IME_ALT_BACK, (mNavigationIconHints & NAVIGATION_HINT_BACK_ALT) != 0) .setFlag(SYSUI_STATE_OVERVIEW_DISABLED, (mDisabledFlags & View.STATUS_BAR_DISABLE_RECENT) != 0) .setFlag(SYSUI_STATE_HOME_DISABLED, Loading
packages/SystemUI/src/com/android/systemui/navigationbar/views/NavigationBar.java +4 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.navigationbar.views; import static android.app.ActivityManager.LOCK_TASK_MODE_PINNED; import static android.app.StatusBarManager.NAVIGATION_HINT_BACK_ALT; import static android.app.StatusBarManager.NAVIGATION_HINT_IME_VISIBLE; import static android.app.StatusBarManager.NAVIGATION_HINT_IME_SWITCHER_BUTTON_VISIBLE; import static android.app.StatusBarManager.WINDOW_STATE_HIDDEN; Loading @@ -43,6 +44,7 @@ import static com.android.systemui.shared.statusbar.phone.BarTransitions.Transit import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_CLICKABLE; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_ALT_BACK; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_VISIBLE; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NAV_BAR_HIDDEN; Loading Loading @@ -1688,6 +1690,8 @@ public class NavigationBar extends ViewController<NavigationBarView> implements (mNavigationIconHints & NAVIGATION_HINT_IME_VISIBLE) != 0) .setFlag(SYSUI_STATE_IME_SWITCHER_BUTTON_VISIBLE, (mNavigationIconHints & NAVIGATION_HINT_IME_SWITCHER_BUTTON_VISIBLE) != 0) .setFlag(SYSUI_STATE_IME_ALT_BACK, (mNavigationIconHints & NAVIGATION_HINT_BACK_ALT) != 0) .setFlag(SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY, allowSystemGestureIgnoringBarVisibility()) .commitUpdate(mDisplayId); Loading