Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83249f45 authored by Valentin Iftime's avatar Valentin Iftime
Browse files

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
parent 5dbd01f0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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) {