Merge "Protect against NPE" into rvc-dev am: 2d1efb2e6f am: 9ebbfa4718

Original change: undetermined

Change-Id: I234998d3e105811a1f31c9a578e1333cb2453d7a
This commit is contained in:
TreeHugger Robot
2020-06-01 22:28:37 +00:00
committed by Automerger Merge Worker

View File

@@ -17,6 +17,7 @@
package com.android.systemui.bubbles; package com.android.systemui.bubbles;
import android.service.notification.StatusBarNotification; import android.service.notification.StatusBarNotification;
import com.android.internal.logging.UiEventLoggerImpl; import com.android.internal.logging.UiEventLoggerImpl;
/** /**
@@ -31,6 +32,10 @@ public class BubbleLoggerImpl extends UiEventLoggerImpl implements BubbleLogger
* @param e UI event * @param e UI event
*/ */
public void log(Bubble b, UiEventEnum e) { public void log(Bubble b, UiEventEnum e) {
if (b.getEntry() == null) {
// Added from persistence -- TODO log this with specific event?
return;
}
StatusBarNotification sbn = b.getEntry().getSbn(); StatusBarNotification sbn = b.getEntry().getSbn();
logWithInstanceId(e, sbn.getUid(), sbn.getPackageName(), sbn.getInstanceId()); logWithInstanceId(e, sbn.getUid(), sbn.getPackageName(), sbn.getInstanceId());
} }