Merge "Clear bubble bar saved states if bubble bar controllers not present." into main

This commit is contained in:
Mykola Podolian
2025-05-14 17:38:07 -07:00
committed by Android (Google) Code Review
2 changed files with 12 additions and 1 deletions
@@ -177,7 +177,8 @@ public class TaskbarControllers {
taskbarOverlayController.init(this);
taskbarAllAppsController.init(this, sharedState.allAppsVisible);
navButtonController.init(this);
bubbleControllers.ifPresent(controllers -> controllers.init(sharedState, this));
bubbleControllers.ifPresentOrElse(controllers -> controllers.init(sharedState, this),
sharedState::clearBubbleData);
taskbarInsetsController.init(this);
voiceInteractionWindowController.init(this);
taskbarRecentAppsController.init(this, sharedState.recentTasksBeforeTaskbarRecreate);
@@ -94,6 +94,16 @@ public class TaskbarSharedState {
return bubbleInfoItems != null && !bubbleInfoItems.isEmpty();
}
/** Clears stored bubble bar data. */
public void clearBubbleData() {
bubbleInfoItems = null;
selectedBubbleKey = null;
bubbleBarLocation = null;
bubbleBarExpanded = false;
bubbleBarStashed = false;
suppressedBubbleInfoItems = null;
}
// LauncherTaskbarUIController#mTaskbarInAppDisplayProgressMultiProp
public float[] inAppDisplayProgressMultiPropValues = new float[DISPLAY_PROGRESS_COUNT];