Skip to content

Commit

Permalink
Merge "Protect against NPE" into rvc-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
TreeHugger Robot authored and Android (Google) Code Review committed Jun 1, 2020
2 parents 0b90ea2 + 4f872f9 commit 2d1efb2
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.android.systemui.bubbles;

import android.service.notification.StatusBarNotification;

import com.android.internal.logging.UiEventLoggerImpl;

/**
Expand All @@ -31,6 +32,10 @@ public class BubbleLoggerImpl extends UiEventLoggerImpl implements BubbleLogger
* @param e UI event
*/
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();
logWithInstanceId(e, sbn.getUid(), sbn.getPackageName(), sbn.getInstanceId());
}
Expand Down

0 comments on commit 2d1efb2

Please sign in to comment.