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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user