diff options
author | Raju Yadav <raju.yadav@sonymobile.com> | 2014-03-24 10:44:00 +0100 |
---|---|---|
committer | Henrik Baard <henrik.baard@sonymobile.com> | 2014-03-26 14:54:12 +0100 |
commit | 5f3302622178ddd26848df39125a02405c764c41 (patch) | |
tree | 06c9b84d0a5a8433f88200c0430e98ef52b7f918 /packages | |
parent | dac298005ce3c1361e27bb740e4b518765d43d77 (diff) | |
download | frameworks_base-5f3302622178ddd26848df39125a02405c764c41.zip frameworks_base-5f3302622178ddd26848df39125a02405c764c41.tar.gz frameworks_base-5f3302622178ddd26848df39125a02405c764c41.tar.bz2 |
Avoid SystemUI crash due to NPE
BaseStatusBar.createNotificationViews() returns null
when it reports handleNotificationError(), leading to
a forced crash of the misbehaving app. However, it
should not add a null object of Notification.Entry
since it will also crash SystemUI (crashing at compare).
Change-Id: I86678c8024e931420b0fbab1f36b330e7e75d581
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index ed00398..604f4c3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -841,6 +841,9 @@ public abstract class BaseStatusBar extends SystemUI implements } protected void addNotificationViews(NotificationData.Entry entry) { + if (entry == null) { + return; + } // Add the expanded view and icon. int pos = mNotificationData.add(entry); if (DEBUG) { |