Loading src/com/android/settings/notification/BlockPreferenceController.java +4 −2 Original line number Diff line number Diff line Loading @@ -103,9 +103,11 @@ public class BlockPreferenceController extends NotificationPreferenceController saveChannel(); } if (mBackend.onlyHasDefaultChannel(mAppRow.pkg, mAppRow.uid)) { if (mAppRow.banned != blocked) { mAppRow.banned = blocked; mBackend.setNotificationsEnabledForPackage(mAppRow.pkg, mAppRow.uid, !blocked); } } } else if (mChannelGroup != null) { mChannelGroup.setBlocked(blocked); mBackend.updateChannelGroup(mAppRow.pkg, mAppRow.uid, mChannelGroup); Loading tests/robotests/src/com/android/settings/notification/BlockPreferenceControllerTest.java +1 −2 Original line number Diff line number Diff line Loading @@ -250,8 +250,7 @@ public class BlockPreferenceControllerTest { verify(mBackend, times(2)).updateChannel(any(), anyInt(), any()); // 2 calls for onSwitchChanged + once when calling updateState originally verify(mBackend, times(3)).setNotificationsEnabledForPackage( verify(mBackend, times(2)).setNotificationsEnabledForPackage( anyString(), anyInt(), anyBoolean()); } Loading Loading
src/com/android/settings/notification/BlockPreferenceController.java +4 −2 Original line number Diff line number Diff line Loading @@ -103,9 +103,11 @@ public class BlockPreferenceController extends NotificationPreferenceController saveChannel(); } if (mBackend.onlyHasDefaultChannel(mAppRow.pkg, mAppRow.uid)) { if (mAppRow.banned != blocked) { mAppRow.banned = blocked; mBackend.setNotificationsEnabledForPackage(mAppRow.pkg, mAppRow.uid, !blocked); } } } else if (mChannelGroup != null) { mChannelGroup.setBlocked(blocked); mBackend.updateChannelGroup(mAppRow.pkg, mAppRow.uid, mChannelGroup); Loading
tests/robotests/src/com/android/settings/notification/BlockPreferenceControllerTest.java +1 −2 Original line number Diff line number Diff line Loading @@ -250,8 +250,7 @@ public class BlockPreferenceControllerTest { verify(mBackend, times(2)).updateChannel(any(), anyInt(), any()); // 2 calls for onSwitchChanged + once when calling updateState originally verify(mBackend, times(3)).setNotificationsEnabledForPackage( verify(mBackend, times(2)).setNotificationsEnabledForPackage( anyString(), anyInt(), anyBoolean()); } Loading