summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/statusbar
diff options
context:
space:
mode:
authorDan Sandler <dsandler@android.com>2015-02-25 13:20:39 -0500
committerJustin Harrison <astyrrian@google.com>2015-03-17 16:34:34 +0000
commit06433bd9f354c27b9adcda2c07e05bcca6e2ad0d (patch)
tree0d2eafb378dacf652a71a96550a9d9619b2d1448 /packages/SystemUI/src/com/android/systemui/statusbar
parent1f9a26af95abba385b612c734d1d5e32d9e3f363 (diff)
downloadframeworks_base-06433bd9f354c27b9adcda2c07e05bcca6e2ad0d.zip
frameworks_base-06433bd9f354c27b9adcda2c07e05bcca6e2ad0d.tar.gz
frameworks_base-06433bd9f354c27b9adcda2c07e05bcca6e2ad0d.tar.bz2
Avoid crashing on corrupted notifications.
If a notification content view has an @id/icon or @id/right_icon, we need to make sure those ImageViews actually have a drawable inside. Bug: 19487078 Change-Id: I4ef6c4a10926823aa8680628097ed150d9e717d4
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/NotificationTemplateViewWrapper.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationTemplateViewWrapper.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationTemplateViewWrapper.java
index 59b62e5..57d162b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationTemplateViewWrapper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationTemplateViewWrapper.java
@@ -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) {