diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java index 30e4e47ff1..f2aa2d2a72 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java @@ -526,9 +526,10 @@ public class BubbleBarController extends IBubblesListener.Stub { *
* Updates the value locally in Launcher and in WMShell. */ - public void updateBubbleBarLocation(BubbleBarLocation location) { + public void updateBubbleBarLocation(BubbleBarLocation location, + @BubbleBarLocation.UpdateSource int source) { updateBubbleBarLocationInternal(location); - mSystemUiProxy.setBubbleBarLocation(location); + mSystemUiProxy.setBubbleBarLocation(location, source); } private void updateBubbleBarLocationInternal(BubbleBarLocation location) { diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java index d91d10a686..925e93dd34 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java @@ -407,11 +407,13 @@ public class BubbleBarView extends FrameLayout { return true; } if (action == R.id.action_move_left) { - mController.updateBubbleBarLocation(BubbleBarLocation.LEFT); + mController.updateBubbleBarLocation(BubbleBarLocation.LEFT, + BubbleBarLocation.UpdateSource.A11Y_ACTION_BAR); return true; } if (action == R.id.action_move_right) { - mController.updateBubbleBarLocation(BubbleBarLocation.RIGHT); + mController.updateBubbleBarLocation(BubbleBarLocation.RIGHT, + BubbleBarLocation.UpdateSource.A11Y_ACTION_BAR); return true; } return false; @@ -1560,6 +1562,7 @@ public class BubbleBarView extends FrameLayout { void dismissBubbleBar(); /** Requests the controller to update bubble bar location to the given value */ - void updateBubbleBarLocation(BubbleBarLocation location); + void updateBubbleBarLocation(BubbleBarLocation location, + @BubbleBarLocation.UpdateSource int source); } } diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java index 96fadf7a0e..776a98ea34 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java @@ -217,8 +217,9 @@ public class BubbleBarViewController { } @Override - public void updateBubbleBarLocation(BubbleBarLocation location) { - mBubbleBarController.updateBubbleBarLocation(location); + public void updateBubbleBarLocation(BubbleBarLocation location, + @BubbleBarLocation.UpdateSource int source) { + mBubbleBarController.updateBubbleBarLocation(location, source); } }); @@ -242,8 +243,9 @@ public class BubbleBarViewController { } @Override - public void updateBubbleBarLocation(BubbleBarLocation location) { - mBubbleBarController.updateBubbleBarLocation(location); + public void updateBubbleBarLocation(BubbleBarLocation location, + @BubbleBarLocation.UpdateSource int source) { + mBubbleBarController.updateBubbleBarLocation(location, source); } }; } diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDragController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDragController.java index 42bd19726d..fd4cf0e98f 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDragController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDragController.java @@ -161,7 +161,8 @@ public class BubbleDragController { @Override void onDragEnd() { - mBubbleBarController.updateBubbleBarLocation(mReleasedLocation); + mBubbleBarController.updateBubbleBarLocation(mReleasedLocation, + BubbleBarLocation.UpdateSource.DRAG_BUBBLE); mBubbleBarViewController.onBubbleDragEnd(); mBubblePinController.setListener(null); } @@ -226,7 +227,8 @@ public class BubbleDragController { @Override void onDragEnd() { // Make sure to update location as the first thing. Pivot update causes a relayout - mBubbleBarController.updateBubbleBarLocation(mReleasedLocation); + mBubbleBarController.updateBubbleBarLocation(mReleasedLocation, + BubbleBarLocation.UpdateSource.DRAG_BAR); bubbleBarView.setIsDragging(false); // Restoring the initial pivot for the bubble bar view bubbleBarView.setRelativePivot(initialRelativePivot.x, initialRelativePivot.y); diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleView.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleView.java index 114edf40f8..e74357cdbe 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleView.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleView.java @@ -222,12 +222,14 @@ public class BubbleView extends ConstraintLayout { } if (action == R.id.action_move_left) { if (mController != null) { - mController.updateBubbleBarLocation(BubbleBarLocation.LEFT); + mController.updateBubbleBarLocation(BubbleBarLocation.LEFT, + BubbleBarLocation.UpdateSource.A11Y_ACTION_BUBBLE); } } if (action == R.id.action_move_right) { if (mController != null) { - mController.updateBubbleBarLocation(BubbleBarLocation.RIGHT); + mController.updateBubbleBarLocation(BubbleBarLocation.RIGHT, + BubbleBarLocation.UpdateSource.A11Y_ACTION_BUBBLE); } } return false; @@ -456,6 +458,7 @@ public class BubbleView extends ConstraintLayout { void collapse(); /** Request bubble bar location to be updated to the given location */ - void updateBubbleBarLocation(BubbleBarLocation location); + void updateBubbleBarLocation(BubbleBarLocation location, + @BubbleBarLocation.UpdateSource int source); } } diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.java b/quickstep/src/com/android/quickstep/SystemUiProxy.java index 73e22bb1c6..054181f311 100644 --- a/quickstep/src/com/android/quickstep/SystemUiProxy.java +++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java @@ -885,10 +885,12 @@ public class SystemUiProxy implements ISystemUiProxy, NavHandle { /** * Tells SysUI to update the bubble bar location to the new location. * @param location new location for the bubble bar + * @param source what triggered the location update */ - public void setBubbleBarLocation(BubbleBarLocation location) { + public void setBubbleBarLocation(BubbleBarLocation location, + @BubbleBarLocation.UpdateSource int source) { try { - mBubbles.setBubbleBarLocation(location); + mBubbles.setBubbleBarLocation(location, source); } catch (RemoteException e) { Log.w(TAG, "Failed call setBubbleBarLocation"); }