mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Clear bubble bar saved states if bubble bar controllers not present.
Added logic to clear bubble bar related portion of the shared state to prevent bubble bar being expanded after device unfolded back. If sysui restores the expanded view, there is no harm in clearing the saved state, but if it fails to restore, we would at least have the bubble bar in the not-expanded state. Bug: 416297086 Test: Manual. Create any bubble and expanded when device is unfolded. Fold the device and unfold it back. Observe expanded bubble is closed. Test: Manual. Be folded, expand bubbles unfold bubbles remain expanded Flag: EXEMPT - bug fix Change-Id: I13448c48137cc944ec506bdd48ec630634ed120c
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -92,6 +92,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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user