From 6ee267f9d6f8ab0d8c260ed05754e5b9c3e66aed Mon Sep 17 00:00:00 2001 From: "Priyanka Advani (xWF)" Date: Wed, 13 Nov 2024 22:12:14 +0000 Subject: Revert "Fix bubble bar location on device boot." This reverts commit 27c05cf4702f8c924f8e1273af0757504371b247. Reason for revert: Droidmonitor created revert due to b/378943679. Will be verifying through ABTD before submission. Change-Id: Ib7415c3f720e711e7171f1b440e99be5b1c34c3c --- .../src/com/android/wm/shell/bubbles/BubbleController.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java index 9317fc7edadf..0fd98ed7eaf1 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java @@ -274,11 +274,8 @@ public class BubbleController implements ConfigurationChangeListener, private final DragAndDropController mDragAndDropController; /** Used to send bubble events to launcher. */ private Bubbles.BubbleStateListener mBubbleStateListener; - /** - * Used to track previous navigation mode to detect switch to buttons navigation. Set to - * true to switch the bubble bar to the opposite side for 3 nav buttons mode on device boot. - */ - private boolean mIsPrevNavModeGestures = true; + /** Used to track previous navigation mode to detect switch to buttons navigation. */ + private boolean mIsPrevNavModeGestures; /** Used to send updates to the views from {@link #mBubbleDataListener}. */ private BubbleViewCallback mBubbleViewCallback; @@ -360,6 +357,7 @@ public class BubbleController implements ConfigurationChangeListener, } }; mExpandedViewManager = BubbleExpandedViewManager.fromBubbleController(this); + mIsPrevNavModeGestures = ContextUtils.isGestureNavigationMode(mContext); } private void registerOneHandedState(OneHandedController oneHanded) { @@ -595,9 +593,9 @@ public class BubbleController implements ConfigurationChangeListener, if (mBubbleStateListener != null) { boolean isCurrentNavModeGestures = ContextUtils.isGestureNavigationMode(mContext); if (mIsPrevNavModeGestures && !isCurrentNavModeGestures) { - BubbleBarLocation bubbleBarLocation = ContextUtils.isRtl(mContext) + BubbleBarLocation navButtonsLocation = ContextUtils.isRtl(mContext) ? BubbleBarLocation.RIGHT : BubbleBarLocation.LEFT; - mBubblePositioner.setBubbleBarLocation(bubbleBarLocation); + mBubblePositioner.setBubbleBarLocation(navButtonsLocation); } mIsPrevNavModeGestures = isCurrentNavModeGestures; BubbleBarUpdate update = mBubbleData.getInitialStateForBubbleBar(); -- cgit v1.2.3-59-g8ed1b