Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +5 −5 Original line number Diff line number Diff line Loading @@ -1075,9 +1075,9 @@ public class BubbleController implements ConfigurationChangeListener, * <p>This is used by external callers (launcher). */ @VisibleForTesting public void expandStackAndSelectBubbleFromLauncher(String key, int bubbleBarXCoordinate, int bubbleBarYCoordinate) { mBubblePositioner.setBubbleBarPosition(bubbleBarXCoordinate, bubbleBarYCoordinate); public void expandStackAndSelectBubbleFromLauncher(String key, int bubbleBarOffsetX, int bubbleBarOffsetY) { mBubblePositioner.setBubbleBarPosition(bubbleBarOffsetX, bubbleBarOffsetY); if (BubbleOverflow.KEY.equals(key)) { mBubbleData.setSelectedBubbleFromLauncher(mBubbleData.getOverflow()); Loading Loading @@ -2088,10 +2088,10 @@ public class BubbleController implements ConfigurationChangeListener, } @Override public void showBubble(String key, int bubbleBarXCoordinate, int bubbleBarYCoordinate) { public void showBubble(String key, int bubbleBarOffsetX, int bubbleBarOffsetY) { mMainExecutor.execute( () -> mController.expandStackAndSelectBubbleFromLauncher( key, bubbleBarXCoordinate, bubbleBarYCoordinate)); key, bubbleBarOffsetX, bubbleBarOffsetY)); } @Override Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubblePositioner.java +10 −3 Original line number Diff line number Diff line Loading @@ -718,9 +718,16 @@ public class BubblePositioner { mShowingInBubbleBar = showingInBubbleBar; } /** Sets the position of the bubble bar in screen coordinates. */ public void setBubbleBarPosition(int x, int y) { mBubbleBarPosition.set(x, y); /** * Sets the position of the bubble bar in screen coordinates. * * @param offsetX the offset of the bubble bar from the edge of the screen on the X axis * @param offsetY the offset of the bubble bar from the edge of the screen on the Y axis */ public void setBubbleBarPosition(int offsetX, int offsetY) { mBubbleBarPosition.set( getAvailableRect().width() - offsetX, getAvailableRect().height() + mInsets.top + mInsets.bottom - offsetY); } /** Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl +1 −2 Original line number Diff line number Diff line Loading @@ -29,8 +29,7 @@ interface IBubbles { oneway void unregisterBubbleListener(in IBubblesListener listener) = 2; oneway void showBubble(in String key, in int bubbleBarXCoordinate, in int bubbleBarYCoordinate) = 3; oneway void showBubble(in String key, in int bubbleBarOffsetX, in int bubbleBarOffsetY) = 3; oneway void removeBubble(in String key, in int reason) = 4; Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +5 −5 Original line number Diff line number Diff line Loading @@ -1075,9 +1075,9 @@ public class BubbleController implements ConfigurationChangeListener, * <p>This is used by external callers (launcher). */ @VisibleForTesting public void expandStackAndSelectBubbleFromLauncher(String key, int bubbleBarXCoordinate, int bubbleBarYCoordinate) { mBubblePositioner.setBubbleBarPosition(bubbleBarXCoordinate, bubbleBarYCoordinate); public void expandStackAndSelectBubbleFromLauncher(String key, int bubbleBarOffsetX, int bubbleBarOffsetY) { mBubblePositioner.setBubbleBarPosition(bubbleBarOffsetX, bubbleBarOffsetY); if (BubbleOverflow.KEY.equals(key)) { mBubbleData.setSelectedBubbleFromLauncher(mBubbleData.getOverflow()); Loading Loading @@ -2088,10 +2088,10 @@ public class BubbleController implements ConfigurationChangeListener, } @Override public void showBubble(String key, int bubbleBarXCoordinate, int bubbleBarYCoordinate) { public void showBubble(String key, int bubbleBarOffsetX, int bubbleBarOffsetY) { mMainExecutor.execute( () -> mController.expandStackAndSelectBubbleFromLauncher( key, bubbleBarXCoordinate, bubbleBarYCoordinate)); key, bubbleBarOffsetX, bubbleBarOffsetY)); } @Override Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubblePositioner.java +10 −3 Original line number Diff line number Diff line Loading @@ -718,9 +718,16 @@ public class BubblePositioner { mShowingInBubbleBar = showingInBubbleBar; } /** Sets the position of the bubble bar in screen coordinates. */ public void setBubbleBarPosition(int x, int y) { mBubbleBarPosition.set(x, y); /** * Sets the position of the bubble bar in screen coordinates. * * @param offsetX the offset of the bubble bar from the edge of the screen on the X axis * @param offsetY the offset of the bubble bar from the edge of the screen on the Y axis */ public void setBubbleBarPosition(int offsetX, int offsetY) { mBubbleBarPosition.set( getAvailableRect().width() - offsetX, getAvailableRect().height() + mInsets.top + mInsets.bottom - offsetY); } /** Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl +1 −2 Original line number Diff line number Diff line Loading @@ -29,8 +29,7 @@ interface IBubbles { oneway void unregisterBubbleListener(in IBubblesListener listener) = 2; oneway void showBubble(in String key, in int bubbleBarXCoordinate, in int bubbleBarYCoordinate) = 3; oneway void showBubble(in String key, in int bubbleBarOffsetX, in int bubbleBarOffsetY) = 3; oneway void removeBubble(in String key, in int reason) = 4; Loading