diff options
| author | 2019-10-18 13:13:00 -0400 | |
|---|---|---|
| committer | 2019-10-18 14:36:19 -0400 | |
| commit | 626447294a48ffe31d864b98ec8f343febf47603 (patch) | |
| tree | c98a3a887012a806c02a41f570cb7dfe014b2e77 | |
| parent | d9b82e2c635be183d133079661a5bfdc53b9178f (diff) | |
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
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java | 2 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java | 19 |
2 files changed, 13 insertions, 8 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java index 2f7f47b6cda7..4e229c00b891 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleData.java @@ -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 diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java index e004ca7d1f1d..048e784cd3d5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java @@ -156,12 +156,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; } |