diff options
author | Tony <twickham@google.com> | 2017-10-06 13:46:55 -0700 |
---|---|---|
committer | Tony <twickham@google.com> | 2017-10-06 14:03:09 -0700 |
commit | 207f7d7f86ec858969c25c1829965311a7eea58a (patch) | |
tree | ddad30477574611b35f1829e326782d85152f7d9 /src/com/android/launcher3/notification | |
parent | b23980cc0e56b5d3f5ac0ca7714eca6479e502ae (diff) | |
download | packages_apps_Trebuchet-207f7d7f86ec858969c25c1829965311a7eea58a.tar.gz packages_apps_Trebuchet-207f7d7f86ec858969c25c1829965311a7eea58a.tar.bz2 packages_apps_Trebuchet-207f7d7f86ec858969c25c1829965311a7eea58a.zip |
Handle null small icon
It shouldn't be possible to have a null small icon, but apparently
there are cases where we get one anyway. Might as well handle it
gracefully instead of crashing.
Bug: 67156108
Change-Id: I01ad0251920f7f531a3019eb694946c3d295f9de
Diffstat (limited to 'src/com/android/launcher3/notification')
-rw-r--r-- | src/com/android/launcher3/notification/NotificationInfo.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/launcher3/notification/NotificationInfo.java b/src/com/android/launcher3/notification/NotificationInfo.java index 1b7c87b22..f54a50d45 100644 --- a/src/com/android/launcher3/notification/NotificationInfo.java +++ b/src/com/android/launcher3/notification/NotificationInfo.java @@ -73,7 +73,7 @@ public class NotificationInfo implements View.OnClickListener { if (icon == null) { // Use the small icon. icon = notification.getSmallIcon(); - mIconDrawable = icon.loadDrawable(context); + mIconDrawable = icon == null ? null : icon.loadDrawable(context); mIconColor = statusBarNotification.getNotification().color; mIsIconLarge = false; } else { |