Merge "Avoid crashing on corrupted notifications." into lmp-mr1-dev

This commit is contained in:
Dan Sandler
2015-03-18 18:23:19 +00:00
committed by Android (Google) Code Review

View File

@@ -79,7 +79,8 @@ public class NotificationTemplateViewWrapper extends NotificationViewWrapper {
// If the icon already has a color filter, we assume that we already forced the icon to be
// white when we created the notification.
mIconForceGraysaleWhenDark = mIcon != null && mIcon.getDrawable().getColorFilter() != null;
final Drawable iconDrawable = mIcon != null ? mIcon.getDrawable() : null;
mIconForceGraysaleWhenDark = iconDrawable != null && iconDrawable.getColorFilter() != null;
}
private ImageView resolveIcon(ImageView largeIcon, ImageView rightIcon) {