diff options
| author | 2025-02-28 14:22:55 -0500 | |
|---|---|---|
| committer | 2025-02-28 14:22:55 -0500 | |
| commit | 601914948f83c968ff2ba0700eace5394a5f09a7 (patch) | |
| tree | 9fe000fe232992eecb612b3ed7fe863ea8848301 | |
| parent | 6e63524cf22393bd2e7254ea231a89e2a1141a4e (diff) | |
AIDL method to move bubble to fullscreen
This will be used from launcher to move a bubble to full screen.
Flag: com.android.wm.shell.enable_bubble_to_fullscreen
Test: this is not wired up, so just tested that it builds
Bug: 393173014
Change-Id: I41e6eb6c0845746be9b189e250c8623588fa798d
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 |