Loading services/core/java/com/android/server/notification/NotificationManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -396,7 +396,7 @@ public class NotificationManagerService extends SystemService { static final int MESSAGE_FINISH_TOKEN_TIMEOUT = 7; static final int MESSAGE_ON_PACKAGE_CHANGED = 8; static final long BITMAP_EXPIRATION_TIME_MS = TimeUnit.HOURS.toMillis(24); static final Duration BITMAP_DURATION = Duration.ofHours(24); // ranking thread messages private static final int MESSAGE_RECONSIDER_RANKING = 1000; Loading Loading @@ -6705,7 +6705,7 @@ public class NotificationManagerService extends SystemService { final long timePostedMs = r.getSbn().getPostTime(); final long timeNowMs = System.currentTimeMillis(); if (isBitmapExpired(timePostedMs, timeNowMs, BITMAP_EXPIRATION_TIME_MS)) { if (isBitmapExpired(timePostedMs, timeNowMs, BITMAP_DURATION.toMillis())) { removeBitmapAndRepost(r); } } Loading services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STR import static com.android.server.am.PendingIntentRecord.FLAG_ACTIVITY_SENDER; import static com.android.server.am.PendingIntentRecord.FLAG_BROADCAST_SENDER; import static com.android.server.am.PendingIntentRecord.FLAG_SERVICE_SENDER; import static com.android.server.notification.NotificationManagerService.BITMAP_EXPIRATION_TIME_MS; import static com.android.server.notification.NotificationManagerService.BITMAP_DURATION; import static com.android.server.notification.NotificationManagerService.DEFAULT_MAX_NOTIFICATION_ENQUEUE_RATE; import static com.android.server.notification.NotificationRecordLogger.NotificationReportedEvent.NOTIFICATION_ADJUSTED; import static com.android.server.notification.NotificationRecordLogger.NotificationReportedEvent.NOTIFICATION_POSTED; Loading Loading @@ -11381,7 +11381,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { long timePostedMs = System.currentTimeMillis(); if (isExpired) { timePostedMs -= BITMAP_EXPIRATION_TIME_MS; timePostedMs -= BITMAP_DURATION.toMillis(); } StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 8, "tag", mUid, 0, notification, UserHandle.getUserHandleForUid(mUid), null, timePostedMs); Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -396,7 +396,7 @@ public class NotificationManagerService extends SystemService { static final int MESSAGE_FINISH_TOKEN_TIMEOUT = 7; static final int MESSAGE_ON_PACKAGE_CHANGED = 8; static final long BITMAP_EXPIRATION_TIME_MS = TimeUnit.HOURS.toMillis(24); static final Duration BITMAP_DURATION = Duration.ofHours(24); // ranking thread messages private static final int MESSAGE_RECONSIDER_RANKING = 1000; Loading Loading @@ -6705,7 +6705,7 @@ public class NotificationManagerService extends SystemService { final long timePostedMs = r.getSbn().getPostTime(); final long timeNowMs = System.currentTimeMillis(); if (isBitmapExpired(timePostedMs, timeNowMs, BITMAP_EXPIRATION_TIME_MS)) { if (isBitmapExpired(timePostedMs, timeNowMs, BITMAP_DURATION.toMillis())) { removeBitmapAndRepost(r); } } Loading
services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STR import static com.android.server.am.PendingIntentRecord.FLAG_ACTIVITY_SENDER; import static com.android.server.am.PendingIntentRecord.FLAG_BROADCAST_SENDER; import static com.android.server.am.PendingIntentRecord.FLAG_SERVICE_SENDER; import static com.android.server.notification.NotificationManagerService.BITMAP_EXPIRATION_TIME_MS; import static com.android.server.notification.NotificationManagerService.BITMAP_DURATION; import static com.android.server.notification.NotificationManagerService.DEFAULT_MAX_NOTIFICATION_ENQUEUE_RATE; import static com.android.server.notification.NotificationRecordLogger.NotificationReportedEvent.NOTIFICATION_ADJUSTED; import static com.android.server.notification.NotificationRecordLogger.NotificationReportedEvent.NOTIFICATION_POSTED; Loading Loading @@ -11381,7 +11381,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { long timePostedMs = System.currentTimeMillis(); if (isExpired) { timePostedMs -= BITMAP_EXPIRATION_TIME_MS; timePostedMs -= BITMAP_DURATION.toMillis(); } StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 8, "tag", mUid, 0, notification, UserHandle.getUserHandleForUid(mUid), null, timePostedMs);