diff options
author | Jay Shrauner <shrauner@google.com> | 2014-06-24 10:19:37 -0700 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2014-06-24 10:24:46 -0700 |
commit | 85003dc5fe29370cd3dfe6a2551b04284bfef2b7 (patch) | |
tree | 1788bd3b51a94f076197af60a2e19bf1a1a43a34 /src/com/android/mail/utils | |
parent | 6048112f3b004873db03b14efc5ae1d268fba041 (diff) | |
download | android_packages_apps_UnifiedEmail-85003dc5fe29370cd3dfe6a2551b04284bfef2b7.tar.gz android_packages_apps_UnifiedEmail-85003dc5fe29370cd3dfe6a2551b04284bfef2b7.tar.bz2 android_packages_apps_UnifiedEmail-85003dc5fe29370cd3dfe6a2551b04284bfef2b7.zip |
Fix NPE when contactIconInfo is null
Check for null contactIconInfo and use default wearable bg when
unseenCount <= 1, same as was already being done about 20 lines earlier
in the same routine for the case when unseenCount > 1.
Bug:15855456
Change-Id: I63b473eb1d409e20599346c287ddffaf132af92e
Diffstat (limited to 'src/com/android/mail/utils')
-rw-r--r-- | src/com/android/mail/utils/NotificationUtils.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/mail/utils/NotificationUtils.java b/src/com/android/mail/utils/NotificationUtils.java index 446a433c8..003b1a88a 100644 --- a/src/com/android/mail/utils/NotificationUtils.java +++ b/src/com/android/mail/utils/NotificationUtils.java @@ -1132,7 +1132,11 @@ public class NotificationUtils { summaryNotificationId, photoFetcher); notificationTicker = result.notificationTicker; - wearableExtender.setBackground(result.contactIconInfo.wearableBg); + if (result.contactIconInfo != null) { + wearableExtender.setBackground(result.contactIconInfo.wearableBg); + } else { + wearableExtender.setBackground(getDefaultWearableBg(context)); + } } // Build the notification ticker |