Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +28 −6 Original line number Diff line number Diff line Loading @@ -1162,12 +1162,29 @@ public class BubbleController implements ConfigurationChangeListener, } /** * Update expanded state when a single bubble is dragged in Launcher. * A bubble is being dragged in Launcher. * Will be called only when bubble bar is expanded. * @param bubbleKey key of the bubble to collapse/expand * @param isBeingDragged whether the bubble is being dragged * * @param bubbleKey key of the bubble being dragged */ public void startBubbleDrag(String bubbleKey) { onBubbleDrag(bubbleKey, true /* isBeingDragged */); } /** * A bubble is no longer being dragged in Launcher. As was released in given location. * Will be called only when bubble bar is expanded. * * @param bubbleKey key of the bubble being dragged * @param location location where bubble was released */ public void onBubbleDrag(String bubbleKey, boolean isBeingDragged) { public void stopBubbleDrag(String bubbleKey, BubbleBarLocation location) { mBubblePositioner.setBubbleBarLocation(location); onBubbleDrag(bubbleKey, false /* isBeingDragged */); } private void onBubbleDrag(String bubbleKey, boolean isBeingDragged) { // TODO(b/330585402): collapse stack if any bubble is dragged if (mBubbleData.getSelectedBubble() != null && mBubbleData.getSelectedBubble().getKey().equals(bubbleKey)) { // Should collapse/expand only if equals to selected bubble. Loading Loading @@ -2329,8 +2346,13 @@ public class BubbleController implements ConfigurationChangeListener, } @Override public void onBubbleDrag(String bubbleKey, boolean isBeingDragged) { mMainExecutor.execute(() -> mController.onBubbleDrag(bubbleKey, isBeingDragged)); public void startBubbleDrag(String bubbleKey) { mMainExecutor.execute(() -> mController.startBubbleDrag(bubbleKey)); } @Override public void stopBubbleDrag(String bubbleKey, BubbleBarLocation location) { mMainExecutor.execute(() -> mController.stopBubbleDrag(bubbleKey, location)); } @Override Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl +3 −1 Original line number Diff line number Diff line Loading @@ -39,11 +39,13 @@ interface IBubbles { oneway void collapseBubbles() = 6; oneway void onBubbleDrag(in String key, in boolean isBeingDragged) = 7; oneway void startBubbleDrag(in String key) = 7; oneway void showUserEducation(in int positionX, in int positionY) = 8; oneway void setBubbleBarLocation(in BubbleBarLocation location) = 9; oneway void setBubbleBarBounds(in Rect bubbleBarBounds) = 10; oneway void stopBubbleDrag(in String key, in BubbleBarLocation location) = 11; } No newline at end of file Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +28 −6 Original line number Diff line number Diff line Loading @@ -1162,12 +1162,29 @@ public class BubbleController implements ConfigurationChangeListener, } /** * Update expanded state when a single bubble is dragged in Launcher. * A bubble is being dragged in Launcher. * Will be called only when bubble bar is expanded. * @param bubbleKey key of the bubble to collapse/expand * @param isBeingDragged whether the bubble is being dragged * * @param bubbleKey key of the bubble being dragged */ public void startBubbleDrag(String bubbleKey) { onBubbleDrag(bubbleKey, true /* isBeingDragged */); } /** * A bubble is no longer being dragged in Launcher. As was released in given location. * Will be called only when bubble bar is expanded. * * @param bubbleKey key of the bubble being dragged * @param location location where bubble was released */ public void onBubbleDrag(String bubbleKey, boolean isBeingDragged) { public void stopBubbleDrag(String bubbleKey, BubbleBarLocation location) { mBubblePositioner.setBubbleBarLocation(location); onBubbleDrag(bubbleKey, false /* isBeingDragged */); } private void onBubbleDrag(String bubbleKey, boolean isBeingDragged) { // TODO(b/330585402): collapse stack if any bubble is dragged if (mBubbleData.getSelectedBubble() != null && mBubbleData.getSelectedBubble().getKey().equals(bubbleKey)) { // Should collapse/expand only if equals to selected bubble. Loading Loading @@ -2329,8 +2346,13 @@ public class BubbleController implements ConfigurationChangeListener, } @Override public void onBubbleDrag(String bubbleKey, boolean isBeingDragged) { mMainExecutor.execute(() -> mController.onBubbleDrag(bubbleKey, isBeingDragged)); public void startBubbleDrag(String bubbleKey) { mMainExecutor.execute(() -> mController.startBubbleDrag(bubbleKey)); } @Override public void stopBubbleDrag(String bubbleKey, BubbleBarLocation location) { mMainExecutor.execute(() -> mController.stopBubbleDrag(bubbleKey, location)); } @Override Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl +3 −1 Original line number Diff line number Diff line Loading @@ -39,11 +39,13 @@ interface IBubbles { oneway void collapseBubbles() = 6; oneway void onBubbleDrag(in String key, in boolean isBeingDragged) = 7; oneway void startBubbleDrag(in String key) = 7; oneway void showUserEducation(in int positionX, in int positionY) = 8; oneway void setBubbleBarLocation(in BubbleBarLocation location) = 9; oneway void setBubbleBarBounds(in Rect bubbleBarBounds) = 10; oneway void stopBubbleDrag(in String key, in BubbleBarLocation location) = 11; } No newline at end of file