Loading services/core/java/com/android/server/notification/NotificationManagerService.java +2 −3 Original line number Diff line number Diff line Loading @@ -1873,10 +1873,9 @@ public class NotificationManagerService extends SystemService { } } // let zen mode evaluate this record and then make note of that for the future // let zen mode evaluate this record private void applyZenModeLocked(NotificationRecord record) { record.setIntercepted(mZenModeHelper.shouldIntercept(record, record.wasTouchedByZen())); record.setTouchedByZen(); record.setIntercepted(mZenModeHelper.shouldIntercept(record)); } // lock on mNotificationList Loading services/core/java/com/android/server/notification/NotificationRecord.java +0 −11 Original line number Diff line number Diff line Loading @@ -51,8 +51,6 @@ public final class NotificationRecord { // is this notification currently being intercepted by Zen Mode? private boolean mIntercept; // InterceptedNotifications needs to know if this has been previously evaluated. private boolean mTouchedByZen; // The timestamp used for ranking. private long mRankingTimeMs; Loading @@ -71,7 +69,6 @@ public final class NotificationRecord { public void copyRankingInformation(NotificationRecord previous) { mContactAffinity = previous.mContactAffinity; mRecentlyIntrusive = previous.mRecentlyIntrusive; mTouchedByZen = previous.mTouchedByZen; mIntercept = previous.mIntercept; mRankingTimeMs = calculateRankingTimeMs(previous.getRankingTimeMs()); } Loading Loading @@ -204,14 +201,6 @@ public final class NotificationRecord { return mIntercept; } public boolean wasTouchedByZen() { return mTouchedByZen; } public void setTouchedByZen() { mTouchedByZen = true; } /** * Returns the timestamp to use for time-based sorting in the ranker. */ Loading services/core/java/com/android/server/notification/ZenModeHelper.java +1 −5 Original line number Diff line number Diff line Loading @@ -129,12 +129,8 @@ public class ZenModeHelper { mCallbacks.add(callback); } public boolean shouldIntercept(NotificationRecord record, boolean previouslySeen) { public boolean shouldIntercept(NotificationRecord record) { if (mZenMode != Global.ZEN_MODE_OFF) { if (previouslySeen && !record.isIntercepted()) { // notifications never transition from not intercepted to intercepted return false; } if (isSystem(record)) { return false; } Loading Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +2 −3 Original line number Diff line number Diff line Loading @@ -1873,10 +1873,9 @@ public class NotificationManagerService extends SystemService { } } // let zen mode evaluate this record and then make note of that for the future // let zen mode evaluate this record private void applyZenModeLocked(NotificationRecord record) { record.setIntercepted(mZenModeHelper.shouldIntercept(record, record.wasTouchedByZen())); record.setTouchedByZen(); record.setIntercepted(mZenModeHelper.shouldIntercept(record)); } // lock on mNotificationList Loading
services/core/java/com/android/server/notification/NotificationRecord.java +0 −11 Original line number Diff line number Diff line Loading @@ -51,8 +51,6 @@ public final class NotificationRecord { // is this notification currently being intercepted by Zen Mode? private boolean mIntercept; // InterceptedNotifications needs to know if this has been previously evaluated. private boolean mTouchedByZen; // The timestamp used for ranking. private long mRankingTimeMs; Loading @@ -71,7 +69,6 @@ public final class NotificationRecord { public void copyRankingInformation(NotificationRecord previous) { mContactAffinity = previous.mContactAffinity; mRecentlyIntrusive = previous.mRecentlyIntrusive; mTouchedByZen = previous.mTouchedByZen; mIntercept = previous.mIntercept; mRankingTimeMs = calculateRankingTimeMs(previous.getRankingTimeMs()); } Loading Loading @@ -204,14 +201,6 @@ public final class NotificationRecord { return mIntercept; } public boolean wasTouchedByZen() { return mTouchedByZen; } public void setTouchedByZen() { mTouchedByZen = true; } /** * Returns the timestamp to use for time-based sorting in the ranker. */ Loading
services/core/java/com/android/server/notification/ZenModeHelper.java +1 −5 Original line number Diff line number Diff line Loading @@ -129,12 +129,8 @@ public class ZenModeHelper { mCallbacks.add(callback); } public boolean shouldIntercept(NotificationRecord record, boolean previouslySeen) { public boolean shouldIntercept(NotificationRecord record) { if (mZenMode != Global.ZEN_MODE_OFF) { if (previouslySeen && !record.isIntercepted()) { // notifications never transition from not intercepted to intercepted return false; } if (isSystem(record)) { return false; } Loading