From 8650f4116375e9559f16d8a64f2f92f824d018df Mon Sep 17 00:00:00 2001 From: Brad Stenning Date: Tue, 16 Jul 2019 16:46:28 -0700 Subject: [PATCH] DO NOT MERGE Call mutate on notification shade drawable before editing. All drawables, by default, are shared in memory thus this would affect other unintended elements to also have their alpha set. Bug: 134407440 Test: Manual Change-Id: Ieb26146b67c0cb7d2bfd3213993238be2da68c23 (cherry picked from commit 0b7e45ebc5f1030fe77f3cfe2a542095d9fa6f80) --- .../src/com/android/systemui/statusbar/car/CarStatusBar.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java index 146bfe02498b6..2c53378e41fb9 100644 --- a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +++ b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java @@ -1072,9 +1072,10 @@ public class CarStatusBar extends StatusBar implements // shade is visible to the user. When the notification shade is completely open then // alpha value will be 1. float alpha = (float) height / mNotificationView.getHeight(); - Drawable background = mNotificationView.getBackground(); + Drawable background = mNotificationView.getBackground().mutate(); background.setAlpha((int) (alpha * 255)); + mNotificationView.setBackground(background); } }