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