Fix squished hotseat due to bubbles

Hotseat supports adjusting its layout to make room for bubbles when
needed. There are 2 events that trigger this:
  1. When Hotseat's layout is reset, it checks for whether bubbles
     are showing.
  2. When Bubble Bar visibility changes it notifies hotseat so that
     it can update itself.

Folding the device is recreated triggers both hotseat layout reset
and recreation of taskbar, but the order in which these happen is not
guaranteed. Sometimes hotseat checks for the status of bubble bar
which may be visible if taskbar hasn't been recreated yet.

This change makes sure that hotseat updates itself after taskbar is
recreated and the ui controller is set, so that it cleans up any
adjustments it may have if bubbles are not visible.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 349430356
Test: manual
       - unfold the device
       - create bubbles
       - observe hotseat adjusts itself for the bubble bar
       - fold the device
       - observe bubble bar is gone and hotseat shows correctly
Change-Id: I58d925c178b02c22583488ae081d478bbbbccc8c
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
index 21a8268..bd7f40c 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java
@@ -792,6 +792,11 @@
      */
     public void setUIController(@NonNull TaskbarUIController uiController) {
         mControllers.setUiController(uiController);
+        if (mControllers.bubbleControllers.isEmpty()) {
+            // if the bubble bar was visible in a previous configuration of taskbar and is being
+            // recreated now without bubbles, clean up any bubble bar adjustments from hotseat
+            bubbleBarVisibilityChanged(/* isVisible= */ false);
+        }
     }
 
     /**