diff options
3 files changed, 16 insertions, 1 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java index be2240286ab1..50e2f4d52bf2 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java @@ -2643,6 +2643,15 @@ public class BubbleController implements ConfigurationChangeListener, mBubbleData.setSelectedBubbleAndExpandStack(bubbleToSelect); } + private void moveBubbleToFullscreen(String key) { + Bubble b = mBubbleData.getBubbleInStackWithKey(key); + if (b == null) { + Log.w(TAG, "can't find bubble with key " + key + " to move to fullscreen"); + return; + } + b.getTaskView().moveToFullscreen(); + } + private boolean isDeviceLocked() { return !mIsStatusBarShade; } @@ -2929,6 +2938,11 @@ public class BubbleController implements ConfigurationChangeListener, } }); } + + @Override + public void moveBubbleToFullscreen(String key) { + mMainExecutor.execute(() -> mController.moveBubbleToFullscreen(key)); + } } private class BubblesImpl implements Bubbles { diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleData.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleData.java index abcdb7e70cec..226ad57e4c66 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleData.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleData.java @@ -1236,7 +1236,6 @@ public class BubbleData { /** @return the bubble in the stack that matches the provided key. */ @Nullable - @VisibleForTesting(visibility = PRIVATE) public Bubble getBubbleInStackWithKey(String key) { return getBubbleWithPredicate(mBubbles, b -> b.getKey().equals(key)); } diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl index ae1b4077098d..079edb3ea8ec 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl @@ -58,4 +58,6 @@ interface IBubbles { oneway void showExpandedView() = 14; oneway void showDropTarget(in boolean show, in @nullable BubbleBarLocation location) = 15; + + oneway void moveBubbleToFullscreen(in String key) = 16; }
\ No newline at end of file |