From 469fef61ab2b4acbed0597e70c0984900117cd89 Mon Sep 17 00:00:00 2001 From: Liran Binyamin Date: Fri, 7 Jul 2023 12:49:20 -0400 Subject: [PATCH] Pass the bubble bar screen coordinates to WMShell This allows WMShell to store the bubble bar coordinates so that it draw the expanded view above it. Fixes: 290099589 Test: Manual - Add bubbles to the bubble bar - Expand the bubble bar - Observe that there is enough space between the bar and the expanded view Change-Id: Iff40b2b71369f33f343eb069e119f65723a6984e --- .../taskbar/bubbles/BubbleBarViewController.java | 8 ++++---- quickstep/src/com/android/quickstep/SystemUiProxy.java | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java index 4e9f88a14e..725f94820f 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java @@ -113,8 +113,8 @@ public class BubbleBarViewController { mBubbleStashController.stashBubbleBar(); } else { mBubbleBarController.setSelectedBubble(bubble); - mSystemUiProxy.showBubble(bubble.getKey(), - mBubbleStashController.isBubblesShowingOnHome()); + int[] bubbleBarCoords = mBarView.getLocationOnScreen(); + mSystemUiProxy.showBubble(bubble.getKey(), bubbleBarCoords[0], bubbleBarCoords[1]); } } @@ -293,8 +293,8 @@ public class BubbleBarViewController { } else { final String selectedKey = mBubbleBarController.getSelectedBubbleKey(); if (selectedKey != null) { - mSystemUiProxy.showBubble(selectedKey, - mBubbleStashController.isBubblesShowingOnHome()); + int[] bubbleBarCoords = mBarView.getLocationOnScreen(); + mSystemUiProxy.showBubble(selectedKey, bubbleBarCoords[0], bubbleBarCoords[1]); } else { Log.w(TAG, "trying to expand bubbles when there isn't one selected"); } diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.java b/quickstep/src/com/android/quickstep/SystemUiProxy.java index 1de264a8c5..d2e7fb54f3 100644 --- a/quickstep/src/com/android/quickstep/SystemUiProxy.java +++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java @@ -646,13 +646,13 @@ public class SystemUiProxy implements ISystemUiProxy { /** * Tells SysUI to show the bubble with the provided key. * @param key the key of the bubble to show. - * @param onLauncherHome whether the bubble is showing on launcher home or not (modifies where - * the expanded bubble view is placed). + * @param bubbleBarXCoordinate the X coordinate of the bubble bar on the screen. + * @param bubbleBarYCoordinate the Y coordinate of the bubble bar on the screen. */ - public void showBubble(String key, boolean onLauncherHome) { + public void showBubble(String key, int bubbleBarXCoordinate, int bubbleBarYCoordinate) { if (mBubbles != null) { try { - mBubbles.showBubble(key, onLauncherHome); + mBubbles.showBubble(key, bubbleBarXCoordinate, bubbleBarYCoordinate); } catch (RemoteException e) { Log.w(TAG, "Failed call showBubble"); }