Merge "Restore original importance when unblocking notif channel" into rvc-qpr-dev am: 8fca94f56c

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12139829

Change-Id: I3a2a93b4cc2f0e5630f51635cc9313845bb05015
This commit is contained in:
TreeHugger Robot
2020-07-13 23:46:24 +00:00
committed by Automerger Merge Worker
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());
}