Restore original importance when unblocking notif channel
Test: atest
Fixes: 62355992
Change-Id: I5d764d0ade68b2ce5708ae79e9ef488ab57bb141
(cherry picked from commit e2a8266328
)
This commit is contained in:
@@ -368,6 +368,7 @@ public class BlockPreferenceControllerTest {
|
||||
public void testOnSwitchChanged_channel_nonDefault() {
|
||||
NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
|
||||
NotificationChannel channel = new NotificationChannel("a", "a", IMPORTANCE_HIGH);
|
||||
channel.setOriginalImportance(IMPORTANCE_HIGH);
|
||||
mController.onResume(appRow, channel, null, null, null, null);
|
||||
mController.updateState(mPreference);
|
||||
|
||||
@@ -375,7 +376,7 @@ public class BlockPreferenceControllerTest {
|
||||
assertEquals(IMPORTANCE_NONE, channel.getImportance());
|
||||
|
||||
mController.onSwitchChanged(null, true);
|
||||
assertEquals(IMPORTANCE_DEFAULT, channel.getImportance());
|
||||
assertEquals(IMPORTANCE_HIGH, channel.getImportance());
|
||||
|
||||
verify(mBackend, times(2)).updateChannel(any(), anyInt(), any());
|
||||
}
|
||||
|
Reference in New Issue
Block a user