Fix visibility and editability of importance fields
- Block field should always be visible - Locked by OEM: cannot block or change importance - Locked by default app: cannot block, can change importance - Locked by system app: cannot block, can change importance - system app but blockable: can block, can change importance Test: robotests Fixes: 131248127 Change-Id: Ifa718c84573dd5125aefa4f672a79dc4f267d515
This commit is contained in:
@@ -203,11 +203,9 @@ public class BubblePreferenceControllerTest {
|
||||
|
||||
@Test
|
||||
public void testUpdateState_channelNotBlockable() {
|
||||
String lockedId = "locked";
|
||||
NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
|
||||
appRow.lockedChannelId = lockedId;
|
||||
NotificationChannel channel = mock(NotificationChannel.class);
|
||||
when(channel.getId()).thenReturn(lockedId);
|
||||
when(channel.isImportanceLockedByCriticalDeviceFunction()).thenReturn(true);
|
||||
mController.onResume(appRow, channel, null, null);
|
||||
|
||||
Preference pref = new RestrictedSwitchPreference(mContext);
|
||||
@@ -219,7 +217,6 @@ public class BubblePreferenceControllerTest {
|
||||
@Test
|
||||
public void testUpdateState_channel() {
|
||||
NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
|
||||
appRow.lockedChannelId = "a";
|
||||
NotificationChannel channel = mock(NotificationChannel.class);
|
||||
when(channel.canBubble()).thenReturn(true);
|
||||
mController.onResume(appRow, channel, null, null);
|
||||
|
Reference in New Issue
Block a user