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 committed 2025-02-14 13:09:46 -08:00
1 parent 2ab63042b8
commit 768019357f
5 files changed
+22 -7

No files matched your search

@@ -47,6 +47,8 @@ import static com.android.quickstep.util.AnimUtils.completeRunnableListCallback;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_VISIBLE;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_VOICE_INTERACTION_WINDOW_SHOWING;
import static com.android.window.flags.Flags.enableStartLaunchTransitionFromTaskbarBugfix;
import static com.android.wm.shell.Flags.enableBubbleBar;
import static com.android.wm.shell.Flags.enableBubbleBarOnPhones;
import static com.android.wm.shell.Flags.enableTinyTaskbar;
import static java.lang.invoke.MethodHandles.Lookup.PROTECTED;
@@ -298,9 +300,10 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
// If Bubble bar is present, TaskbarControllers depends on it so build it first.
Optional<BubbleControllers> bubbleControllersOptional = Optional.empty();
BubbleBarController.onTaskbarRecreated();
final boolean deviceBubbleBarEnabled = enableBubbleBarOnPhones()
|| (!mDeviceProfile.isPhone && !mDeviceProfile.isVerticalBarLayout());
if (BubbleBarController.isBubbleBarEnabled()
&& !mDeviceProfile.isPhone
&& !mDeviceProfile.isVerticalBarLayout()
&& deviceBubbleBarEnabled
&& bubbleBarView != null
) {
Optional<BubbleStashedHandleViewController> bubbleHandleController = Optional.empty();
@@ -512,6 +515,10 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
return enableTinyTaskbar() && mDeviceProfile.isPhone && mDeviceProfile.isTaskbarPresent;
}
public boolean isBubbleBarOnPhone() {
return enableBubbleBarOnPhones() && enableBubbleBar() && mDeviceProfile.isPhone;
}
/**
* Returns {@code true} iff bubble bar is enabled (but not necessarily visible /
* containing bubbles).