summaryrefslogtreecommitdiffstats
path: root/services/core/java/com/android/server/notification/NotificationRecord.java
diff options
context:
space:
mode:
Diffstat (limited to 'services/core/java/com/android/server/notification/NotificationRecord.java')
-rw-r--r--services/core/java/com/android/server/notification/NotificationRecord.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java
index 5569a09..e106a4a 100644
--- a/services/core/java/com/android/server/notification/NotificationRecord.java
+++ b/services/core/java/com/android/server/notification/NotificationRecord.java
@@ -50,6 +50,8 @@ public final class NotificationRecord {
NotificationUsageStats.SingleNotificationStats stats;
boolean isCanceled;
int score;
+ /** Whether the notification was seen by the user via one of the notification listeners. */
+ boolean mIsSeen;
// These members are used by NotificationSignalExtractors
// to communicate with the ranking module.
@@ -301,6 +303,16 @@ public final class NotificationRecord {
return mGlobalSortKey;
}
+ /** Check if any of the listeners have marked this notification as seen by the user. */
+ public boolean isSeen() {
+ return mIsSeen;
+ }
+
+ /** Mark the notification as seen by the user. */
+ public void setSeen() {
+ mIsSeen = true;
+ }
+
public void setAuthoritativeRank(int authoritativeRank) {
mAuthoritativeRank = authoritativeRank;
}