mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
Merge "Add a test for stashed bubble bar" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
fdc5c72aa1
@@ -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;
|
||||
}
|
||||
|
||||
@@ -160,6 +160,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);
|
||||
|
||||
@@ -174,6 +174,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) {
|
||||
|
||||
@@ -2160,6 +2160,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
|
||||
|
||||
Reference in New Issue
Block a user