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
This commit is contained in:
Raju Yadav
2014-03-24 10:44:00 +01:00
committed by Henrik Baard
parent dac298005c
commit 5f33026221

View File

@@ -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) {