Restore original importance when unblocking notif channel

Test: atest
Fixes: 62355992
Change-Id: I5d764d0ade68b2ce5708ae79e9ef488ab57bb141
(cherry picked from commit e2a8266328)
This commit is contained in:
Julia Reynolds
2020-07-08 15:09:41 -04:00
parent ffda931026
commit 2700b83c48
3 changed files with 9 additions and 26 deletions

View File

@@ -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());
}