diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java index eff6e27898..300dd0d15d 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java @@ -1341,6 +1341,16 @@ public class TaskbarActivityContext extends BaseTaskbarContext { } } + /** Unstashes the Bubble Bar if it is stashed. */ + @VisibleForTesting + public void unstashBubbleBarIfStashed() { + mControllers.bubbleControllers.ifPresent(bubbleControllers -> { + if (bubbleControllers.bubbleStashController.isStashed()) { + bubbleControllers.bubbleStashController.showBubbleBar(false); + } + }); + } + protected boolean isUserSetupComplete() { return mIsUserSetupComplete; } diff --git a/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java b/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java index 9d942c5380..9c338ca62e 100644 --- a/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java +++ b/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java @@ -154,6 +154,14 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { // Allow null-pointer to catch illegal states. runOnTISBinder(tisBinder -> tisBinder.getTaskbarManager().recreateTaskbar()); return response; + + case TestProtocol.REQUEST_UNSTASH_BUBBLE_BAR_IF_STASHED: + runOnTISBinder(tisBinder -> { + // Allow null-pointer to catch illegal states. + tisBinder.getTaskbarManager().getCurrentActivityContext() + .unstashBubbleBarIfStashed(); + }); + return response; } return super.call(method, arg, extras); diff --git a/tests/shared/com/android/launcher3/testing/shared/TestProtocol.java b/tests/shared/com/android/launcher3/testing/shared/TestProtocol.java index fcb5158165..33e5388d0e 100644 --- a/tests/shared/com/android/launcher3/testing/shared/TestProtocol.java +++ b/tests/shared/com/android/launcher3/testing/shared/TestProtocol.java @@ -172,6 +172,9 @@ public final class TestProtocol { public static final String REQUEST_FLAG_ENABLE_GRID_ONLY_OVERVIEW = "enable-grid-only-overview"; + public static final String REQUEST_UNSTASH_BUBBLE_BAR_IF_STASHED = + "unstash-bubble-bar-if-stashed"; + /** Logs {@link Log#d(String, String)} if {@link #sDebugTracing} is true. */ public static void testLogD(String tag, String message) { if (!sDebugTracing) { diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index edc6aac7eb..05e19f8afd 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -2094,6 +2094,11 @@ public final class LauncherInstrumentation { getTestInfo(TestProtocol.REQUEST_UNSTASH_TASKBAR_IF_STASHED); } + /** Shows the bubble bar if it is stashed, otherwise this does nothing. */ + public void showBubbleBarIfHidden() { + getTestInfo(TestProtocol.REQUEST_UNSTASH_BUBBLE_BAR_IF_STASHED); + } + /** Blocks the taskbar from automatically stashing based on time. */ public void enableBlockTimeout(boolean enable) { getTestInfo(enable