Merge "Rename NotificationChannel#setBlockableSystem" into rvc-dev
This commit is contained in:
@@ -467,7 +467,7 @@ public class NotificationChannelSlice implements CustomSliceable {
|
||||
return true;
|
||||
}
|
||||
|
||||
return channel.isBlockableSystem()
|
||||
return channel.isBlockable()
|
||||
|| channel.getImportance() == IMPORTANCE_NONE;
|
||||
}
|
||||
|
||||
|
@@ -134,7 +134,7 @@ public abstract class NotificationPreferenceController extends AbstractPreferenc
|
||||
return channel.getImportance() == IMPORTANCE_NONE;
|
||||
}
|
||||
|
||||
return channel.isBlockableSystem() || !mAppRow.systemApp
|
||||
return channel.isBlockable() || !mAppRow.systemApp
|
||||
|| channel.getImportance() == IMPORTANCE_NONE;
|
||||
}
|
||||
return false;
|
||||
|
@@ -200,7 +200,7 @@ public class BlockPreferenceControllerTest {
|
||||
NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
|
||||
appRow.systemApp = true;
|
||||
NotificationChannel channel = new NotificationChannel("", "", IMPORTANCE_DEFAULT);
|
||||
channel.setBlockableSystem(true);
|
||||
channel.setBlockable(true);
|
||||
mController.onResume(appRow, channel, null, null, null, null);
|
||||
mController.updateState(mPreference);
|
||||
assertTrue(mSwitch.isEnabled());
|
||||
|
@@ -236,7 +236,7 @@ public class NotificationPreferenceControllerTest {
|
||||
NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
|
||||
appRow.systemApp = false;
|
||||
NotificationChannel channel = mock(NotificationChannel.class);
|
||||
when(channel.isBlockableSystem()).thenReturn(false);
|
||||
when(channel.isBlockable()).thenReturn(false);
|
||||
|
||||
mController.onResume(appRow, channel, null, null, null, null);
|
||||
assertTrue(mController.isChannelBlockable());
|
||||
@@ -247,7 +247,7 @@ public class NotificationPreferenceControllerTest {
|
||||
NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
|
||||
appRow.systemApp = true;
|
||||
NotificationChannel channel = mock(NotificationChannel.class);
|
||||
when(channel.isBlockableSystem()).thenReturn(false);
|
||||
when(channel.isBlockable()).thenReturn(false);
|
||||
when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH);
|
||||
|
||||
mController.onResume(appRow, channel, null, null, null, null);
|
||||
@@ -259,7 +259,7 @@ public class NotificationPreferenceControllerTest {
|
||||
NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
|
||||
appRow.systemApp = true;
|
||||
NotificationChannel channel = mock(NotificationChannel.class);
|
||||
when(channel.isBlockableSystem()).thenReturn(true);
|
||||
when(channel.isBlockable()).thenReturn(true);
|
||||
|
||||
mController.onResume(appRow, channel, null, null, null, null);
|
||||
assertTrue(mController.isChannelBlockable());
|
||||
@@ -270,7 +270,7 @@ public class NotificationPreferenceControllerTest {
|
||||
NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
|
||||
appRow.systemApp = true;
|
||||
NotificationChannel channel = mock(NotificationChannel.class);
|
||||
when(channel.isBlockableSystem()).thenReturn(false);
|
||||
when(channel.isBlockable()).thenReturn(false);
|
||||
when(channel.getImportance()).thenReturn(IMPORTANCE_NONE);
|
||||
|
||||
mController.onResume(appRow, channel, null, null, null, null);
|
||||
|
Reference in New Issue
Block a user