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

Commit 100a59e0 authored by Julia Reynolds's avatar Julia Reynolds Committed by Android Build Coastguard Worker
Browse files

Fix NPE

"should never happen", but... is

Test: NotificationEntryTest
Fixes: 444767151
Flag: com.android.systemui.notification_bundle_ui
(cherry picked from commit 999d28638cbc943a33127a49c8009cdc83e63748)
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:62a887ef8c22f8e05304134e582b0fcc7698a642
Merged-In: Ib8c9c9caec94b9e5cf8f39d53f3615c54b6093ba
Change-Id: Ib8c9c9caec94b9e5cf8f39d53f3615c54b6093ba
parent 34e086f3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ import android.service.notification.SnoozeCriterion;
import android.service.notification.StatusBarNotification;
import android.util.Log;
import android.util.Pair;
import android.util.Slog;
import android.view.ContentInfo;

import androidx.annotation.NonNull;
@@ -437,6 +438,10 @@ public final class NotificationEntry extends ListEntry {
    }

    public boolean isBundled() {
        if (getRanking() == null || getRanking().getChannel() == null) {
            Slog.wtfQuiet(TAG, "getRanking() or getRanking().getChannel() is null " + getKey());
            return false;
        }
        return SYSTEM_RESERVED_IDS.contains(getRanking().getChannel().getId());
    }