diff options
| author | 2024-02-02 17:27:43 +0100 | |
|---|---|---|
| committer | 2024-02-02 17:27:43 +0100 | |
| commit | 83249f452ccc20a639127453f298db29e5cc4905 (patch) | |
| tree | 34c85115f71c889e72e97397d28a9bf917bad77c | |
| parent | 5dbd01f05119cb8eb2725bdfec9f7da2ddf74121 (diff) | |
Enable polite notifications by default for work profiles
Also set correct notification posted timestamp to child strategy when
using a wrapped strategy (avalanche mode).
Test: atest PoliteNotifWorkProfileToggleControllerTest
Bug: 323337417
Change-Id: If2a81e4be74206fb17bf7a7a44ad53272a9b9493
| -rw-r--r-- | services/core/java/com/android/server/notification/NotificationAttentionHelper.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/notification/NotificationAttentionHelper.java b/services/core/java/com/android/server/notification/NotificationAttentionHelper.java index f852b8173f30..097daf2e51e6 100644 --- a/services/core/java/com/android/server/notification/NotificationAttentionHelper.java +++ b/services/core/java/com/android/server/notification/NotificationAttentionHelper.java @@ -97,7 +97,7 @@ public final class NotificationAttentionHelper { private static final float DEFAULT_VOLUME = 1.0f; // TODO (b/291899544): remove for release private static final int DEFAULT_NOTIFICATION_COOLDOWN_ENABLED = 1; - private static final int DEFAULT_NOTIFICATION_COOLDOWN_ENABLED_FOR_WORK = 0; + private static final int DEFAULT_NOTIFICATION_COOLDOWN_ENABLED_FOR_WORK = 1; private static final int DEFAULT_NOTIFICATION_COOLDOWN_ALL = 1; private static final int DEFAULT_NOTIFICATION_COOLDOWN_VIBRATE_UNLOCKED = 0; @@ -1405,6 +1405,7 @@ public final class NotificationAttentionHelper { long timestampMillis) { super.setLastNotificationUpdateTimeMs(record, timestampMillis); mLastNotificationTimestamp = timestampMillis; + mAppStrategy.setLastNotificationUpdateTimeMs(record, timestampMillis); } long getLastNotificationUpdateTimeMs(final NotificationRecord record) { |