mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Fix hotseat layout on device rotation.
When rotating the device, a few issues were causing improper hotseat layout: - BubbleBarController receives an initial configuration before the UI controller is set. - The updated device profile, including the correct `isQsbInline` value, arrives after all controllers are recreated, and the UI controller is not informed of the device profile update. Added logic to carry over the bubble bar bubble visibility state to the new UI controller. Included a call to notify the UI controller of the device profile update. Fixes: 378400160 Flag: com.android.wm.shell.enable_bubble_bar Test: Manual. Have a Tangor device in landscape orientation with the bubble bar. Rotate the device - observe hotseat and QSB are reduced in width. Dismiss the bubble bar - observe hotseat and QSB extends to the full width. video: http://recall/-/gx8ASgewUeUS3QYohfrd1J/e8e1ZFRQlbHQtUlCXVJbFJ Change-Id: If180b01c8cdb329cd45d084af63a986c08cf65a1
This commit is contained in:
@@ -221,10 +221,13 @@ public class TaskbarControllers {
|
||||
uiController = newUiController;
|
||||
uiController.init(this);
|
||||
uiController.updateStateForSysuiFlags(mSharedState.sysuiStateFlags);
|
||||
// if bubble controllers are present take bubble bar location, else set it to null
|
||||
// if bubble controllers are present configure the UI controller
|
||||
bubbleControllers.ifPresentOrElse(bubbleControllers -> {
|
||||
BubbleBarLocation location =
|
||||
bubbleControllers.bubbleBarViewController.getBubbleBarLocation();
|
||||
boolean hiddenForBubbles =
|
||||
bubbleControllers.bubbleBarViewController.isHiddenForNoBubbles();
|
||||
uiController.adjustHotseatForBubbleBar(!hiddenForBubbles);
|
||||
uiController.onBubbleBarLocationUpdated(location);
|
||||
}, () -> uiController.onBubbleBarLocationUpdated(null));
|
||||
// Notify that the ui controller has changed
|
||||
|
||||
Reference in New Issue
Block a user