summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Liran Binyamin <liranb@google.com> 2023-08-01 10:56:32 -0400
committer Liran Binyamin <liranb@google.com> 2023-08-01 10:56:32 -0400
commit52472704f59e8614a2a1ccd045d3d4c11a7a4106 (patch)
treee4b1bdcd5d0b419141fea6f843b2623d46b39e02
parent40383d7977e6e611fa619af2add08bbef7eb7e53 (diff)
Collapse the overflow view when swiping back
Fixes: 293355231 Test: Manual - Add a bubble to the bubble bar - Expand the bubble bar and select the overflow bubble - Perform back gesture - Observe that the overflow view is removed and the bubble bar collapsed Change-Id: I033f88287f8d1927593ed6dc4129615399e71e92
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java8
1 files changed, 6 insertions, 2 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 8def8ff1ab01..58a59b7da998 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
@@ -817,13 +817,17 @@ public class BubbleController implements ConfigurationChangeListener,
* @param interceptBack whether back should be intercepted or not.
*/
void updateWindowFlagsForBackpress(boolean interceptBack) {
- if (mStackView != null && mAddedToWindowManager) {
+ if (mAddedToWindowManager) {
mWmLayoutParams.flags = interceptBack
? 0
: WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
mWmLayoutParams.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
- mWindowManager.updateViewLayout(mStackView, mWmLayoutParams);
+ if (mStackView != null) {
+ mWindowManager.updateViewLayout(mStackView, mWmLayoutParams);
+ } else if (mLayerView != null) {
+ mWindowManager.updateViewLayout(mLayerView, mWmLayoutParams);
+ }
}
}