Fix channel configurability check
Test: atest Fixes: 128669244 Change-Id: Ib4bc666262426ea1fb8fc034a361c93bdd5afb36
This commit is contained in:
@@ -218,6 +218,20 @@ public class NotificationPreferenceControllerTest {
|
||||
assertTrue(mController.isChannelConfigurable());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsConfigurable_appLevel() {
|
||||
NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
|
||||
appRow.lockedChannelId = "something";
|
||||
appRow.lockedImportance = true;
|
||||
|
||||
mController.onResume(appRow, mock(NotificationChannel.class), null, null);
|
||||
assertFalse(mController.isChannelConfigurable());
|
||||
|
||||
appRow.lockedImportance = false;
|
||||
mController.onResume(appRow, mock(NotificationChannel.class), null, null);
|
||||
assertTrue(mController.isChannelConfigurable());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsChannelBlockable_nonSystemAppsBlockable() {
|
||||
NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
|
||||
|
Reference in New Issue
Block a user