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

Commit 61f15e59 authored by Valentin Iftime's avatar Valentin Iftime
Browse files

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
parent 46de7bfc
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -221,6 +221,10 @@ public class NotificationAttentionHelperTest extends UiServiceTestCase {
        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(