summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java34
1 files changed, 17 insertions, 17 deletions
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 4fc347a09292..aedbd1b56622 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
@@ -158,13 +158,6 @@ public final class NotificationEntry extends ListEntry {
private long initializationTime = -1;
/**
- * Whether or not this row represents a system notification. Note that if this is
- * {@code null}, that means we were either unable to retrieve the info or have yet to
- * retrieve the info.
- */
- public Boolean mIsSystemNotification;
-
- /**
* Has the user sent a reply through this Notification.
*/
private boolean hasSentReply;
@@ -777,12 +770,28 @@ public final class NotificationEntry extends ListEntry {
if (mSbn.getNotification().isMediaNotification()) {
return true;
}
- if (mIsSystemNotification != null && mIsSystemNotification) {
+ if (!isBlockable()) {
return true;
}
return false;
}
+ /**
+ * Returns whether this row is considered blockable (i.e. it's not a system notif
+ * or is not in an allowList).
+ */
+ public boolean isBlockable() {
+ if (getChannel() == null) {
+ return false;
+ }
+ if (getChannel().isImportanceLockedByCriticalDeviceFunction()
+ && !getChannel().isBlockable()) {
+ return false;
+ }
+
+ return true;
+ }
+
private boolean shouldSuppressVisualEffect(int effect) {
if (isExemptFromDndVisualSuppression()) {
return false;
@@ -858,15 +867,6 @@ public final class NotificationEntry extends ListEntry {
}
/**
- * Whether or not this row represents a system notification. Note that if this is
- * {@code null}, that means we were either unable to retrieve the info or have yet to
- * retrieve the info.
- */
- public Boolean isSystemNotification() {
- return mIsSystemNotification;
- }
-
- /**
* Set this notification to be sensitive.
*
* @param sensitive true if the content of this notification is sensitive right now