From be613e6a9841c89bf3daf2077889fac88c3e9979 Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Mon, 14 Jun 2021 12:01:41 -0700 Subject: [PATCH] Fix dismiss ciricle being behind expanded view - Need to give it an elevation - Need to make sure to bring the bubble container in front of it so that they appear on top Test: manual - have at least 2 bubbles, expand the stack, drag the bubble that is not expanded to the dismiss view => observe that the dismiss view is above the expanded view & below the bubble Bug: 190478161 Change-Id: Ifbce49211b2342c3e197168af38f4c2ca9a1904b --- .../src/com/android/wm/shell/bubbles/BubbleStackView.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java index 16b8150467fdb..c71f123459ecb 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java @@ -50,7 +50,6 @@ import android.view.View; import android.view.ViewGroup; import android.view.ViewOutlineProvider; import android.view.ViewTreeObserver; -import android.view.WindowInsets; import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction; import android.widget.FrameLayout; @@ -1018,7 +1017,10 @@ public class BubbleStackView extends FrameLayout removeView(mDismissView); } mDismissView = new DismissView(getContext()); + int elevation = getResources().getDimensionPixelSize(R.dimen.bubble_elevation); + addView(mDismissView); + mDismissView.setElevation(elevation); final ContentResolver contentResolver = getContext().getContentResolver(); final int dismissRadius = Settings.Secure.getInt( @@ -1028,6 +1030,8 @@ public class BubbleStackView extends FrameLayout // MagnetizedObjects. mMagneticTarget = new MagnetizedObject.MagneticTarget( mDismissView.getCircle(), dismissRadius); + + mBubbleContainer.bringToFront(); } // TODO: Create ManageMenuView and move setup / animations there