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

Commit 47f588e9 authored by Beverly Tai's avatar Beverly Tai Committed by Android (Google) Code Review
Browse files

Merge "Add null check for notifEntry's repEntry"

parents 424d8714 043b15d3
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -44,10 +44,11 @@ public abstract class ListEntry {

    /**
     * Should return the "representative entry" for this ListEntry. For NotificationEntries, its
     * the entry itself. For groups, it should be the summary. This method exists to interface with
     * the entry itself. For groups, it should be the summary (but if a summary doesn't exist,
     * this can return null). This method exists to interface with
     * legacy code that expects groups to also be NotificationEntries.
     */
    public abstract NotificationEntry getRepresentativeEntry();
    public abstract @Nullable NotificationEntry getRepresentativeEntry();

    @Nullable public GroupEntry getParent() {
        return mParent;
+4 −0
Original line number Diff line number Diff line
@@ -63,6 +63,10 @@ public class HighPriorityProvider {
        }

        final NotificationEntry notifEntry = entry.getRepresentativeEntry();
        if (notifEntry == null) {
            return false;
        }

        return notifEntry.getRanking().getImportance() >= NotificationManager.IMPORTANCE_DEFAULT
                || hasHighPriorityCharacteristics(notifEntry)
                || hasHighPriorityChild(entry);