diff options
| author | 2019-10-18 18:10:49 +0000 | |
|---|---|---|
| committer | 2019-10-18 18:10:49 +0000 | |
| commit | 4aa9de9ba65a4c9f65803178e607b4260635a523 (patch) | |
| tree | 1c150f5bc97501033dd49acce7aa79a0d6a839b0 | |
| parent | fda800f66f3c3411c181706e7ce5752ae4700b00 (diff) | |
| parent | 181ff7c896c705e3d5659ef3e214a7f4eef8bdf3 (diff) | |
Merge "Fix flaky test"
| -rw-r--r-- | services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java b/services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java index 3ae5674e63a3..1e55b1521956 100644 --- a/services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java +++ b/services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java @@ -22,6 +22,7 @@ import static android.app.NotificationManager.IMPORTANCE_HIGH; import static android.app.NotificationManager.IMPORTANCE_LOW; import static android.app.NotificationManager.IMPORTANCE_MIN; import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_LIGHTS; +import static android.media.AudioAttributes.USAGE_NOTIFICATION; import static android.media.AudioAttributes.USAGE_NOTIFICATION_RINGTONE; import static junit.framework.Assert.assertFalse; @@ -1541,10 +1542,12 @@ public class BuzzBeepBlinkTest extends UiServiceTestCase { } @Test - public void testCanInterruptNonRingtoneInsistentBuzz() throws Exception { + public void testCanInterruptNonRingtoneInsistentBuzz() { NotificationChannel fakeRingtoneChannel = new NotificationChannel("ringtone", "", IMPORTANCE_HIGH); fakeRingtoneChannel.enableVibration(true); + fakeRingtoneChannel.setSound(null, + new AudioAttributes.Builder().setUsage(USAGE_NOTIFICATION).build()); NotificationRecord ringtoneNotification = getCallRecord(1, fakeRingtoneChannel, true); mService.buzzBeepBlinkLocked(ringtoneNotification); |