Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f872f95 authored by Mady Mellor's avatar Mady Mellor
Browse files

Protect against NPE

Bug: 157923809
Test: atest
Change-Id: Ice02bf571326ccdaf448e44152b6927c5bd6bd6b
parent 273c839a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.systemui.bubbles;

import android.service.notification.StatusBarNotification;

import com.android.internal.logging.UiEventLoggerImpl;

/**
@@ -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());
    }