Fix an issue where bubble bar would collapse when rotating

When the device is rotated, everything gets recreated, in this case,
bubble bar state is typically set to be stashed. However, if taskbar
and bubble bar were unstashed while rotating, bubble bar would be
incorrectly stashed. To fix this, only do the stash if taskbar is
also stashed in this case.

Flag: com.android.wm.shell.enable_bubble_bar
Test: manual - be in an app, unstash bubbles, rotate device
             => observe that bubble bar is unstashed like taskbar
                after rotation
Bug: 353884121
Change-Id: Ia37397c62a1a6819c1bd42261f8a9955db511da3
This commit is contained in:
Mady Mellor committed 2024-10-02 13:55:55 -07:00
1 parent da8487eb33
commit 3e8cc610b3
1 file changed
+2 -1
@@ -675,7 +675,8 @@ public class BubbleBarViewController {
// if the animation is suppressed, immediately stash or show the bubble bar to
// ensure they've been initialized.
if (mTaskbarStashController.isInApp()
&& mBubbleStashController.isTransientTaskBar()) {
&& mBubbleStashController.isTransientTaskBar()
&& mTaskbarStashController.isStashed()) {
mBubbleStashController.stashBubbleBarImmediate();
} else {
mBubbleStashController.showBubbleBarImmediate();