Loading libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubblePositionerTest.kt +3 −3 Original line number Diff line number Diff line Loading @@ -222,7 +222,7 @@ class BubblePositionerTest { positioner.setShowingInBubbleBar(true) positioner.update(deviceConfig) positioner.bubbleBarTopOnScreen = 2500 positioner.updateBubbleBarTopOnScreen(100) val spaceBetweenTopInsetAndBubbleBarInLandscape = 1680 val expandedViewVerticalSpacing = Loading @@ -248,7 +248,7 @@ class BubblePositionerTest { ) positioner.setShowingInBubbleBar(true) positioner.update(deviceConfig) positioner.bubbleBarTopOnScreen = 2500 positioner.updateBubbleBarTopOnScreen(100) val spaceBetweenTopInsetAndBubbleBarInLandscape = 180 val expandedViewSpacing = Loading Loading @@ -681,7 +681,7 @@ class BubblePositionerTest { positioner.update(deviceConfig) val bubbleBarHeight = 100 positioner.bubbleBarTopOnScreen = windowBounds.bottom - insets.bottom - bubbleBarHeight positioner.updateBubbleBarTopOnScreen(bubbleBarHeight) val expandedViewPadding = context.resources.getDimensionPixelSize(R.dimen.bubble_expanded_view_padding) Loading libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/bar/BubbleExpandedViewPinControllerTest.kt +1 −2 Original line number Diff line number Diff line Loading @@ -89,8 +89,7 @@ class BubbleExpandedViewPinControllerTest { insets = Insets.of(10, 20, 30, 40), ) positioner.update(deviceConfig) positioner.bubbleBarTopOnScreen = SCREEN_HEIGHT - deviceConfig.insets.bottom - BUBBLE_BAR_HEIGHT positioner.updateBubbleBarTopOnScreen(BUBBLE_BAR_HEIGHT) controller = BubbleExpandedViewPinController(context, container, positioner) testListener = TestLocationChangeListener() controller.setListener(testListener) Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +24 −18 Original line number Diff line number Diff line Loading @@ -1444,11 +1444,12 @@ public class BubbleController implements ConfigurationChangeListener, * Will be called only when bubble bar is expanded. * * @param location location where bubble was released * @param topOnScreen top coordinate of the bubble bar on the screen after release * @param bubbleBarTopToScreenBottom the distance between the top coordinate of the bubble * bar and the bottom of the screen after release */ public void stopBubbleDrag(BubbleBarLocation location, int topOnScreen) { public void stopBubbleDrag(BubbleBarLocation location, int bubbleBarTopToScreenBottom) { mBubblePositioner.setBubbleBarLocation(location); mBubblePositioner.setBubbleBarTopOnScreen(topOnScreen); mBubblePositioner.updateBubbleBarTopOnScreen(bubbleBarTopToScreenBottom); if (mBubbleData.getSelectedBubble() != null) { showExpandedViewForBubbleBar(); } Loading Loading @@ -1524,8 +1525,8 @@ public class BubbleController implements ConfigurationChangeListener, * <p>This is used by external callers (launcher). */ @VisibleForTesting public void expandStackAndSelectBubbleFromLauncher(String key, int topOnScreen) { mBubblePositioner.setBubbleBarTopOnScreen(topOnScreen); public void expandStackAndSelectBubbleFromLauncher(String key, int bubbleBarTopToScreenBottom) { mBubblePositioner.updateBubbleBarTopOnScreen(bubbleBarTopToScreenBottom); if (BubbleOverflow.KEY.equals(key)) { mBubbleData.setSelectedBubbleFromLauncher(mBubbleData.getOverflow()); Loading Loading @@ -3001,14 +3002,16 @@ public class BubbleController implements ConfigurationChangeListener, } @Override public void showBubble(String key, int topOnScreen) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "IBubbles.showBubble: key=%s top=%d", key, topOnScreen); public void showBubble(String key, int bubbleBarTopToScreenBottom) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "IBubbles.showBubble: key=%s bubbleBarTopToScreenBottom=%d", key, bubbleBarTopToScreenBottom); executeRemoteCallWithTaskPermission( mController, "showBubble", (controller) -> controller.expandStackAndSelectBubbleFromLauncher(key, topOnScreen)); controller.expandStackAndSelectBubbleFromLauncher( key, bubbleBarTopToScreenBottom)); } @Override Loading Loading @@ -3051,13 +3054,15 @@ public class BubbleController implements ConfigurationChangeListener, } @Override public void stopBubbleDrag(BubbleBarLocation location, int topOnScreen) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "IBubbles.stopBubbleDrag: log=%s top=%d", location, topOnScreen); public void stopBubbleDrag(BubbleBarLocation location, int bubbleBarTopToScreenBottom) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "IBubbles.stopBubbleDrag: log=%s bubbleBarTopToScreenBottom=%d", location, bubbleBarTopToScreenBottom); executeRemoteCallWithTaskPermission( mController, "stopBubbleDrag", (controller) -> controller.stopBubbleDrag(location, topOnScreen)); (controller) -> controller.stopBubbleDrag(location, bubbleBarTopToScreenBottom)); } @Override Loading Loading @@ -3092,14 +3097,15 @@ public class BubbleController implements ConfigurationChangeListener, } @Override public void updateBubbleBarTopOnScreen(int topOnScreen) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "IBubbles.updateBubbleBarTopOnScreen: top=%d", topOnScreen); public void updateBubbleBarTopToScreenBottom(int bubbleBarTopToScreenBottom) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "IBubbles.updateBubbleBarTopOnScreen: bubbleBarTopToScreenBottom=%d", bubbleBarTopToScreenBottom); executeRemoteCallWithTaskPermission( mController, "updateBubbleBarTopOnScreen", "updateBubbleBarTopToScreenBottom", (controller) -> { mBubblePositioner.setBubbleBarTopOnScreen(topOnScreen); mBubblePositioner.updateBubbleBarTopOnScreen(bubbleBarTopToScreenBottom); if (mLayerView != null) mLayerView.updateExpandedView(); }); } Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubblePositioner.java +3 −5 Original line number Diff line number Diff line Loading @@ -893,11 +893,9 @@ public class BubblePositioner implements BubbleDropTargetBoundsProvider { return mBubbleBarLocation.isOnLeft(mDeviceConfig.isRtl()); } /** * Set top coordinate of bubble bar on screen */ public void setBubbleBarTopOnScreen(int topOnScreen) { mBubbleBarTopOnScreen = topOnScreen; /** Updates the top coordinate of bubble bar on screen. */ public void updateBubbleBarTopOnScreen(int bubbleBarTopToScreenBottom) { mBubbleBarTopOnScreen = getScreenRect().bottom - bubbleBarTopToScreenBottom; } /** Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl +3 −3 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ interface IBubbles { oneway void unregisterBubbleListener(in IBubblesListener listener) = 2; oneway void showBubble(in String key, in int topOnScreen) = 3; oneway void showBubble(in String key, in int bubbleBarTopToScreenBottom) = 3; oneway void dragBubbleToDismiss(in String key, in long timestamp) = 4; Loading @@ -48,9 +48,9 @@ interface IBubbles { oneway void setBubbleBarLocation(in BubbleBarLocation location, in int source) = 9; oneway void updateBubbleBarTopOnScreen(in int topOnScreen) = 10; oneway void updateBubbleBarTopToScreenBottom(in int bubbleBarTopToScreenBottom) = 10; oneway void stopBubbleDrag(in BubbleBarLocation location, in int topOnScreen) = 11; oneway void stopBubbleDrag(in BubbleBarLocation location, in int bubbleBarTopToScreenBottom) = 11; oneway void showShortcutBubble(in ShortcutInfo info, in @nullable BubbleBarLocation location) = 12; Loading Loading
libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/BubblePositionerTest.kt +3 −3 Original line number Diff line number Diff line Loading @@ -222,7 +222,7 @@ class BubblePositionerTest { positioner.setShowingInBubbleBar(true) positioner.update(deviceConfig) positioner.bubbleBarTopOnScreen = 2500 positioner.updateBubbleBarTopOnScreen(100) val spaceBetweenTopInsetAndBubbleBarInLandscape = 1680 val expandedViewVerticalSpacing = Loading @@ -248,7 +248,7 @@ class BubblePositionerTest { ) positioner.setShowingInBubbleBar(true) positioner.update(deviceConfig) positioner.bubbleBarTopOnScreen = 2500 positioner.updateBubbleBarTopOnScreen(100) val spaceBetweenTopInsetAndBubbleBarInLandscape = 180 val expandedViewSpacing = Loading Loading @@ -681,7 +681,7 @@ class BubblePositionerTest { positioner.update(deviceConfig) val bubbleBarHeight = 100 positioner.bubbleBarTopOnScreen = windowBounds.bottom - insets.bottom - bubbleBarHeight positioner.updateBubbleBarTopOnScreen(bubbleBarHeight) val expandedViewPadding = context.resources.getDimensionPixelSize(R.dimen.bubble_expanded_view_padding) Loading
libs/WindowManager/Shell/multivalentTests/src/com/android/wm/shell/bubbles/bar/BubbleExpandedViewPinControllerTest.kt +1 −2 Original line number Diff line number Diff line Loading @@ -89,8 +89,7 @@ class BubbleExpandedViewPinControllerTest { insets = Insets.of(10, 20, 30, 40), ) positioner.update(deviceConfig) positioner.bubbleBarTopOnScreen = SCREEN_HEIGHT - deviceConfig.insets.bottom - BUBBLE_BAR_HEIGHT positioner.updateBubbleBarTopOnScreen(BUBBLE_BAR_HEIGHT) controller = BubbleExpandedViewPinController(context, container, positioner) testListener = TestLocationChangeListener() controller.setListener(testListener) Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +24 −18 Original line number Diff line number Diff line Loading @@ -1444,11 +1444,12 @@ public class BubbleController implements ConfigurationChangeListener, * Will be called only when bubble bar is expanded. * * @param location location where bubble was released * @param topOnScreen top coordinate of the bubble bar on the screen after release * @param bubbleBarTopToScreenBottom the distance between the top coordinate of the bubble * bar and the bottom of the screen after release */ public void stopBubbleDrag(BubbleBarLocation location, int topOnScreen) { public void stopBubbleDrag(BubbleBarLocation location, int bubbleBarTopToScreenBottom) { mBubblePositioner.setBubbleBarLocation(location); mBubblePositioner.setBubbleBarTopOnScreen(topOnScreen); mBubblePositioner.updateBubbleBarTopOnScreen(bubbleBarTopToScreenBottom); if (mBubbleData.getSelectedBubble() != null) { showExpandedViewForBubbleBar(); } Loading Loading @@ -1524,8 +1525,8 @@ public class BubbleController implements ConfigurationChangeListener, * <p>This is used by external callers (launcher). */ @VisibleForTesting public void expandStackAndSelectBubbleFromLauncher(String key, int topOnScreen) { mBubblePositioner.setBubbleBarTopOnScreen(topOnScreen); public void expandStackAndSelectBubbleFromLauncher(String key, int bubbleBarTopToScreenBottom) { mBubblePositioner.updateBubbleBarTopOnScreen(bubbleBarTopToScreenBottom); if (BubbleOverflow.KEY.equals(key)) { mBubbleData.setSelectedBubbleFromLauncher(mBubbleData.getOverflow()); Loading Loading @@ -3001,14 +3002,16 @@ public class BubbleController implements ConfigurationChangeListener, } @Override public void showBubble(String key, int topOnScreen) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "IBubbles.showBubble: key=%s top=%d", key, topOnScreen); public void showBubble(String key, int bubbleBarTopToScreenBottom) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "IBubbles.showBubble: key=%s bubbleBarTopToScreenBottom=%d", key, bubbleBarTopToScreenBottom); executeRemoteCallWithTaskPermission( mController, "showBubble", (controller) -> controller.expandStackAndSelectBubbleFromLauncher(key, topOnScreen)); controller.expandStackAndSelectBubbleFromLauncher( key, bubbleBarTopToScreenBottom)); } @Override Loading Loading @@ -3051,13 +3054,15 @@ public class BubbleController implements ConfigurationChangeListener, } @Override public void stopBubbleDrag(BubbleBarLocation location, int topOnScreen) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "IBubbles.stopBubbleDrag: log=%s top=%d", location, topOnScreen); public void stopBubbleDrag(BubbleBarLocation location, int bubbleBarTopToScreenBottom) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "IBubbles.stopBubbleDrag: log=%s bubbleBarTopToScreenBottom=%d", location, bubbleBarTopToScreenBottom); executeRemoteCallWithTaskPermission( mController, "stopBubbleDrag", (controller) -> controller.stopBubbleDrag(location, topOnScreen)); (controller) -> controller.stopBubbleDrag(location, bubbleBarTopToScreenBottom)); } @Override Loading Loading @@ -3092,14 +3097,15 @@ public class BubbleController implements ConfigurationChangeListener, } @Override public void updateBubbleBarTopOnScreen(int topOnScreen) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "IBubbles.updateBubbleBarTopOnScreen: top=%d", topOnScreen); public void updateBubbleBarTopToScreenBottom(int bubbleBarTopToScreenBottom) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "IBubbles.updateBubbleBarTopOnScreen: bubbleBarTopToScreenBottom=%d", bubbleBarTopToScreenBottom); executeRemoteCallWithTaskPermission( mController, "updateBubbleBarTopOnScreen", "updateBubbleBarTopToScreenBottom", (controller) -> { mBubblePositioner.setBubbleBarTopOnScreen(topOnScreen); mBubblePositioner.updateBubbleBarTopOnScreen(bubbleBarTopToScreenBottom); if (mLayerView != null) mLayerView.updateExpandedView(); }); } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubblePositioner.java +3 −5 Original line number Diff line number Diff line Loading @@ -893,11 +893,9 @@ public class BubblePositioner implements BubbleDropTargetBoundsProvider { return mBubbleBarLocation.isOnLeft(mDeviceConfig.isRtl()); } /** * Set top coordinate of bubble bar on screen */ public void setBubbleBarTopOnScreen(int topOnScreen) { mBubbleBarTopOnScreen = topOnScreen; /** Updates the top coordinate of bubble bar on screen. */ public void updateBubbleBarTopOnScreen(int bubbleBarTopToScreenBottom) { mBubbleBarTopOnScreen = getScreenRect().bottom - bubbleBarTopToScreenBottom; } /** Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl +3 −3 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ interface IBubbles { oneway void unregisterBubbleListener(in IBubblesListener listener) = 2; oneway void showBubble(in String key, in int topOnScreen) = 3; oneway void showBubble(in String key, in int bubbleBarTopToScreenBottom) = 3; oneway void dragBubbleToDismiss(in String key, in long timestamp) = 4; Loading @@ -48,9 +48,9 @@ interface IBubbles { oneway void setBubbleBarLocation(in BubbleBarLocation location, in int source) = 9; oneway void updateBubbleBarTopOnScreen(in int topOnScreen) = 10; oneway void updateBubbleBarTopToScreenBottom(in int bubbleBarTopToScreenBottom) = 10; oneway void stopBubbleDrag(in BubbleBarLocation location, in int topOnScreen) = 11; oneway void stopBubbleDrag(in BubbleBarLocation location, in int bubbleBarTopToScreenBottom) = 11; oneway void showShortcutBubble(in ShortcutInfo info, in @nullable BubbleBarLocation location) = 12; Loading