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

Commit aefcef11 authored by Valentin Iftime's avatar Valentin Iftime Committed by Iavor-Valentin Iftime
Browse files

Add cross-app notification cooldown

 Add a new cooldown strategy that applies to all notifications
  across apps.

 Adjust the original cooldown strategy to apply to all notifications
  per app instread of per channel. Except for channels that have
  user-set sounds.

 Adjust cooldown timers to: t1=60 seconds and t2=5 seconds.

Test: atest NotificationAttentionHelperTest
Bug: 270456865
Change-Id: I1a536c48d4cd9285aa0446d9f630e82667418f9d
parent 66d709f9
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -68,10 +68,10 @@ public class SystemUiSystemPropertiesFlags {
        // TODO b/291899544: for released flags, use resource config values
        /** Value used by polite notif. feature */
        public static final Flag NOTIF_COOLDOWN_T1 = devFlag(
                "persist.debug.sysui.notification.notif_cooldown_t1", 5000);
                "persist.debug.sysui.notification.notif_cooldown_t1", 60000);
        /** Value used by polite notif. feature */
        public static final Flag NOTIF_COOLDOWN_T2 = devFlag(
                "persist.debug.sysui.notification.notif_cooldown_t2", 3000);
                "persist.debug.sysui.notification.notif_cooldown_t2", 5000);
        /** Value used by polite notif. feature */
        public static final Flag NOTIF_VOLUME1 = devFlag(
                "persist.debug.sysui.notification.notif_volume1", 30);
@@ -80,12 +80,6 @@ public class SystemUiSystemPropertiesFlags {
        /** Value used by polite notif. feature. -1 to ignore the counter */
        public static final Flag NOTIF_COOLDOWN_COUNTER_RESET = devFlag(
                "persist.debug.sysui.notification.notif_cooldown_counter_reset", 10);
        /**
         * Value used by polite notif. feature: cooldown behavior/strategy. Valid values: rule1,
         * rule2
         */
        public static final Flag NOTIF_COOLDOWN_RULE = devFlag(
                "persist.debug.sysui.notification.notif_cooldown_rule", "rule1");

        /** b/303716154: For debugging only: use short bitmap duration. */
        public static final Flag DEBUG_SHORT_BITMAP_DURATION = devFlag(
+198 −104

File changed.

Preview size limit exceeded, changes collapsed.

+152 −36

File changed.

Preview size limit exceeded, changes collapsed.