Allow bubble bar to show on phones if the flag is enabled

* Check for bubble bar on phone being enabled in most places
  tiny taskbar was checking
* Forces taskbar to always be stashed when bubble bar is enabled
* There are a couple of visual issues with the flag enabled:
  - extra space in overview
  - the hotseat is a lil squished on home when bubbles are there

Flag: com.android.wm.shell.enable_bubble_bar_on_phones
Test: manual - enable bubble bar on phones observe that bubble bar
               is enabled and kind of works
Bug: 394869612
Change-Id: I56d3045c78c6c31dcacf16744033b34c9aa5f6e0
This commit is contained in:
Mady Mellor
2025-02-06 10:28:08 -08:00
parent 2ab63042b8
commit 768019357f
5 changed files with 22 additions and 7 deletions
@@ -104,6 +104,8 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
private static final int FLAG_DELAY_TASKBAR_BG_TAG = 1 << 12;
public static final int FLAG_STASHED_FOR_BUBBLES = 1 << 13; // show handle for stashed hotseat
public static final int FLAG_TASKBAR_HIDDEN = 1 << 14; // taskbar hidden during dream, etc...
// taskbar should always be stashed for bubble bar on phone
public static final int FLAG_STASHED_BUBBLE_BAR_ON_PHONE = 1 << 15;
// If any of these flags are enabled, isInApp should return true.
private static final int FLAGS_IN_APP = FLAG_IN_APP | FLAG_IN_SETUP;
@@ -126,7 +128,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
// If any of these flags are enabled, the taskbar must be stashed.
private static final int FLAGS_FORCE_STASHED = FLAG_STASHED_SYSUI | FLAG_STASHED_DEVICE_LOCKED
| FLAG_STASHED_IN_TASKBAR_ALL_APPS | FLAG_STASHED_SMALL_SCREEN
| FLAG_STASHED_FOR_BUBBLES;
| FLAG_STASHED_FOR_BUBBLES | FLAG_STASHED_BUBBLE_BAR_ON_PHONE;
/**
* How long to stash/unstash when manually invoked via long press.
@@ -359,6 +361,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
// For now, assume we're in an app, since LauncherTaskbarUIController won't be able to tell
// us that we're paused until a bit later. This avoids flickering upon recreating taskbar.
updateStateForFlag(FLAG_IN_APP, true);
updateStateForFlag(FLAG_STASHED_BUBBLE_BAR_ON_PHONE, mActivity.isBubbleBarOnPhone());
applyState(/* duration = */ 0);
@@ -574,7 +577,8 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
*/
public void updateAndAnimateTransientTaskbar(boolean stash, boolean shouldBubblesFollow,
boolean delayTaskbarBackground) {
if (!DisplayController.isTransientTaskbar(mActivity)) {
if (!DisplayController.isTransientTaskbar(mActivity)
|| mActivity.isBubbleBarOnPhone()) {
return;
}