commit | 61f15e59407a9dc15550955d6803750db000fb3b | [log] [tgz] |
---|---|---|
author | Valentin Iftime <valiiftime@google.com> | Thu Jul 04 12:33:40 2024 +0200 |
committer | Valentin Iftime <valiiftime@google.com> | Thu Jul 04 12:33:40 2024 +0200 |
tree | 16020651cfd1d8ba6bc8a83f33908f546a6fa2b6 | |
parent | 46de7bfccac1ad469c3f59d53e863fa3a2cbac65 [diff] |
Mock System Settings for NotificationAttentionHelperTest Always enable Settings.System.NOTIFICATION_COOLDOWN_ENABLED so it does not depend on DUT settings. Flag: EXEMPT bugfix Test: atest NotificationAttentionHelperTest Bug: 343696778 Change-Id: I46b109156a016c41e379ab66fb51a0c324b09736
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationAttentionHelperTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationAttentionHelperTest.java index 3da8031..7f6a81f 100644 --- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationAttentionHelperTest.java +++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationAttentionHelperTest.java
@@ -221,6 +221,10 @@ Settings.System.putInt(getContext().getContentResolver(), Settings.System.NOTIFICATION_LIGHT_PULSE, 1); + // Enable notification cooldown independent of device Settings + Settings.System.putInt(getContext().getContentResolver(), + Settings.System.NOTIFICATION_COOLDOWN_ENABLED, 1); + Resources resources = spy(getContext().getResources()); when(resources.getBoolean(R.bool.config_useAttentionLight)).thenReturn(true); when(resources.getBoolean(