summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mykola Podolian <mpodolian@google.com> 2024-11-14 01:48:19 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-11-14 01:48:19 +0000
commite5d7a587f7c2d9114973cd595d9b9199d97492ef (patch)
tree84e6b2f8e744bc3e9ece62cf298027b0c62d30aa
parent2463f6c5133545635ffeaf0435bbab321146b345 (diff)
parent6ee267f9d6f8ab0d8c260ed05754e5b9c3e66aed (diff)
Merge "Revert "Fix bubble bar location on device boot."" into main
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java12
1 files 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 823c533e8e72..39dc26797a81 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();