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"
This commit is contained in:
Dan Sandler
2020-02-19 14:58:08 -05:00
parent 490eba353b
commit f9a8552f74
8 changed files with 23 additions and 15 deletions

View File

@@ -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;
}