New scrim behind bubble stack
Top to bottom
1. [Scrim in front]
2. Status bar
3. [Scrim behind] (moved above bubble stack)
4. Bubble stack
5. [Bubble scrim] (new)
Fixes: 130237686
Test: atest SystemUITests
Test: manual: expand stack (see bubble scrim), then pull down shade (see
scrim behind status bar)
Change-Id: I2f39f41c524af2134c383c3e12dd193cbc487d93
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
index a23c99e..1fc5c39 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
@@ -271,10 +271,9 @@
if (mStackView == null) {
mStackView = new BubbleStackView(mContext, mBubbleData, mSurfaceSynchronizer);
ViewGroup sbv = mStatusBarWindowController.getStatusBarView();
- // TODO(b/130237686): When you expand the shade on top of expanded bubble, there is no
- // scrim between bubble and the shade
- int bubblePosition = sbv.indexOfChild(sbv.findViewById(R.id.scrim_behind)) + 1;
- sbv.addView(mStackView, bubblePosition,
+ int bubbleScrimIndex = sbv.indexOfChild(sbv.findViewById(R.id.scrim_for_bubble));
+ int stackIndex = bubbleScrimIndex + 1; // Show stack above bubble scrim.
+ sbv.addView(mStackView, stackIndex,
new FrameLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT));
if (mExpandListener != null) {
mStackView.setExpandListener(mExpandListener);