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
This commit is contained in:
@@ -1061,9 +1061,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user