summaryrefslogtreecommitdiff
path: root/src/com/android/settings/widget/EntityHeaderController.java
diff options
context:
space:
mode:
authorDan Sandler <dsandler@android.com>2020-02-19 14:58:08 -0500
committerDan Sandler <dsandler@android.com>2020-02-26 11:09:38 -0500
commitf9a8552f746a645b0190262e82c08c371b256d1f (patch)
tree89c11ac6f9cdf37eaefb65e5dc2c1b3dba6c4567 /src/com/android/settings/widget/EntityHeaderController.java
parent490eba353b360026d33b26c44dc0f827893235f4 (diff)
Support updated rendering of conversation icons.
Note that changes to channel settings now generate onResume() for all available controllers to ensure they get the updated drawable. Bug: 149747760 Change-Id: I3f73c025b1d32194e3d5147d03cb781e370f2a1b Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.notification"
Diffstat (limited to 'src/com/android/settings/widget/EntityHeaderController.java')
-rw-r--r--src/com/android/settings/widget/EntityHeaderController.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/settings/widget/EntityHeaderController.java b/src/com/android/settings/widget/EntityHeaderController.java
index 440882f14d..654d50b71e 100644
--- a/src/com/android/settings/widget/EntityHeaderController.java
+++ b/src/com/android/settings/widget/EntityHeaderController.java
@@ -135,7 +135,8 @@ public class EntityHeaderController {
*/
public EntityHeaderController setIcon(Drawable icon) {
if (icon != null) {
- mIcon = icon.getConstantState().newDrawable(mAppContext.getResources());
+ final Drawable.ConstantState state = icon.getConstantState();
+ mIcon = state != null ? state.newDrawable(mAppContext.getResources()) : icon;
}
return this;
}