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
This commit is contained in:
Ned Burns
2019-10-18 13:13:00 -04:00
parent d9b82e2c63
commit 626447294a
2 changed files with 13 additions and 8 deletions

View File

@@ -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

View File

@@ -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;
}