Loading services/core/java/com/android/server/notification/NotificationIntrusivenessExtractor.java +5 −1 Original line number Diff line number Diff line Loading @@ -66,8 +66,12 @@ public class NotificationIntrusivenessExtractor implements NotificationSignalExt @Override public void applyChangesLocked(NotificationRecord record) { // there will be another reconsideration in the message queue HANG_TIME_MS // from each time this record alerts, which can finally clear this flag. if ((System.currentTimeMillis() - record.getLastIntrusive()) >= HANG_TIME_MS) { record.setRecentlyIntrusive(false); } } }; } Loading services/core/java/com/android/server/notification/NotificationRecord.java +8 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ public final class NotificationRecord { // to communicate with the ranking module. private float mContactAffinity; private boolean mRecentlyIntrusive; private long mLastIntrusive; // is this notification currently being intercepted by Zen Mode? private boolean mIntercept; Loading Loading @@ -515,12 +516,19 @@ public final class NotificationRecord { public void setRecentlyIntrusive(boolean recentlyIntrusive) { mRecentlyIntrusive = recentlyIntrusive; if (recentlyIntrusive) { mLastIntrusive = System.currentTimeMillis(); } } public boolean isRecentlyIntrusive() { return mRecentlyIntrusive; } public long getLastIntrusive() { return mLastIntrusive; } public void setPackagePriority(int packagePriority) { mPackagePriority = packagePriority; } Loading Loading
services/core/java/com/android/server/notification/NotificationIntrusivenessExtractor.java +5 −1 Original line number Diff line number Diff line Loading @@ -66,8 +66,12 @@ public class NotificationIntrusivenessExtractor implements NotificationSignalExt @Override public void applyChangesLocked(NotificationRecord record) { // there will be another reconsideration in the message queue HANG_TIME_MS // from each time this record alerts, which can finally clear this flag. if ((System.currentTimeMillis() - record.getLastIntrusive()) >= HANG_TIME_MS) { record.setRecentlyIntrusive(false); } } }; } Loading
services/core/java/com/android/server/notification/NotificationRecord.java +8 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ public final class NotificationRecord { // to communicate with the ranking module. private float mContactAffinity; private boolean mRecentlyIntrusive; private long mLastIntrusive; // is this notification currently being intercepted by Zen Mode? private boolean mIntercept; Loading Loading @@ -515,12 +516,19 @@ public final class NotificationRecord { public void setRecentlyIntrusive(boolean recentlyIntrusive) { mRecentlyIntrusive = recentlyIntrusive; if (recentlyIntrusive) { mLastIntrusive = System.currentTimeMillis(); } } public boolean isRecentlyIntrusive() { return mRecentlyIntrusive; } public long getLastIntrusive() { return mLastIntrusive; } public void setPackagePriority(int packagePriority) { mPackagePriority = packagePriority; } Loading