Merge "Send bubble bar location update source to shell" into main
diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java
index 3e2c4b9..e0814d3 100644
--- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarController.java
@@ -528,9 +528,10 @@
* <p>
* 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 c0a76a8..350f56f 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 @@
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;
@@ -1567,6 +1569,7 @@
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 96fadf7..776a98e 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 @@
}
@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 @@
}
@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 42bd197..fd4cf0e 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 @@
@Override
void onDragEnd() {
- mBubbleBarController.updateBubbleBarLocation(mReleasedLocation);
+ mBubbleBarController.updateBubbleBarLocation(mReleasedLocation,
+ BubbleBarLocation.UpdateSource.DRAG_BUBBLE);
mBubbleBarViewController.onBubbleDragEnd();
mBubblePinController.setListener(null);
}
@@ -226,7 +227,8 @@
@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 0ea4222..c74fa9b 100644
--- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleView.java
+++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleView.java
@@ -224,12 +224,14 @@
}
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;
@@ -483,6 +485,7 @@
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 c618422..6c4c74c 100644
--- a/quickstep/src/com/android/quickstep/SystemUiProxy.java
+++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java
@@ -886,10 +886,12 @@
/**
* 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");
}