summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPresubmit Automerger Backend <android-build-presubmit-automerger-backend@system.gserviceaccount.com>2023-03-13 23:16:32 +0000
committerPresubmit Automerger Backend <android-build-presubmit-automerger-backend@system.gserviceaccount.com>2023-03-13 23:16:32 +0000
commit3b0ea1c17edf3e7129668ce4ec228b199cbfa03a (patch)
tree1fcfbd4443b74b1b5d958e1df01847ea47d2bcbf /tests
parent8b7acc568c61a5f958027524db177d371e9b92c8 (diff)
parentc68468cd47d084c13a8894782ef026fa0e22d561 (diff)
downloadCellBroadcastReceiver-3b0ea1c17edf3e7129668ce4ec228b199cbfa03a.tar.gz
[automerge] Make watch local alert breakthrough DND 2p: c68468cd47
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/CellBroadcastReceiver/+/21970387 Bug: 235258524 Change-Id: Ic5382ae85aa4a95f4d3b983e285f6c3c66a9ed59
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/src/com/android/cellbroadcastreceiver/unit/CellBroadcastAlertServiceTest.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/unit/src/com/android/cellbroadcastreceiver/unit/CellBroadcastAlertServiceTest.java b/tests/unit/src/com/android/cellbroadcastreceiver/unit/CellBroadcastAlertServiceTest.java
index eec1482d3..91e426a31 100644
--- a/tests/unit/src/com/android/cellbroadcastreceiver/unit/CellBroadcastAlertServiceTest.java
+++ b/tests/unit/src/com/android/cellbroadcastreceiver/unit/CellBroadcastAlertServiceTest.java
@@ -594,6 +594,8 @@ public class CellBroadcastAlertServiceTest extends
assertEquals(message.getMessageBody(),
mServiceIntentToVerify.getStringExtra(
CellBroadcastAlertAudio.ALERT_AUDIO_MESSAGE_BODY));
+ assertTrue(mServiceIntentToVerify.getBooleanExtra(
+ CellBroadcastAlertAudio.ALERT_AUDIO_OVERRIDE_DND_EXTRA, false));
ArgumentCaptor<NotificationChannel> notificationChannelCaptor =
ArgumentCaptor.forClass(NotificationChannel.class);
verify(mMockedNotificationManager, times(5))
@@ -605,12 +607,16 @@ public class CellBroadcastAlertServiceTest extends
assertTrue(notificationChannelCreated.get("broadcastMessages").shouldVibrate());
assertTrue(notificationChannelCreated.get("broadcastMessagesNonEmergency").shouldVibrate());
assertTrue(notificationChannelCreated.get("broadcastMessagesInVoiceCall").shouldVibrate());
- assertEquals(NotificationManager.IMPORTANCE_HIGH,
+ assertEquals(NotificationManager.IMPORTANCE_MAX,
notificationChannelCreated.get("broadcastMessagesHighPriority")
.getImportance());
+ assertTrue(notificationChannelCreated.get("broadcastMessagesHighPriority")
+ .canBypassDnd());
assertEquals(NotificationManager.IMPORTANCE_HIGH,
notificationChannelCreated.get("broadcastMessages")
.getImportance());
+ assertTrue(notificationChannelCreated.get("broadcastMessages")
+ .canBypassDnd());
assertEquals(NotificationManager.IMPORTANCE_HIGH,
notificationChannelCreated.get("broadcastMessagesNonEmergency")
.getImportance());