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

Commit 62644729 authored by Ned Burns's avatar Ned Burns
Browse files

Remove last ranking-derived member from NotifEntry

This can be extracted directly from the Ranking, no need to store a
second copy.

Test: atest
Change-Id: I254079fd010ca4e984c28a96e471f5dd9075c81c
parent d9b82e2c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ public class BubbleData {
            Log.d(TAG, "notificationEntryUpdated: " + entry);
        }
        Bubble bubble = getBubbleWithKey(entry.getKey());
        suppressFlyout = !entry.isVisuallyInterruptive || suppressFlyout;
        suppressFlyout = !entry.getRanking().visuallyInterruptive() || suppressFlyout;

        if (bubble == null) {
            // Create a new bubble
+12 −7
Original line number Diff line number Diff line
@@ -155,12 +155,6 @@ public final class NotificationEntry {
     */
    private boolean hasSentReply;

    /**
     * Whether this notification has changed in visual appearance since the previous post.
     * New notifications are interruptive by default.
     */
    public boolean isVisuallyInterruptive;

    /**
     * Whether this notification is shown to the user as a high priority notification: visible on
     * the lock screen/status bar and in the top section in the shade.
@@ -236,10 +230,15 @@ public final class NotificationEntry {
            throw new IllegalArgumentException("New key " + ranking.getKey()
                    + " doesn't match existing key " + mKey);
        }

        mRanking = ranking;
        isVisuallyInterruptive = ranking.visuallyInterruptive();
    }


    /*
     * Convenience getters for SBN and Ranking members
     */

    public NotificationChannel getChannel() {
        return mRanking.getChannel();
    }
@@ -287,6 +286,12 @@ public final class NotificationEntry {
    }


    /*
     * Old methods
     *
     * TODO: Remove as many of these as possible
     */

    public void setInterruption() {
        interruption = true;
    }