Migrate to using fixed permissions
When deciding which app/group/channel level fields are editable. If an app has a fixed notification permission, no importance type fields (including blocking, importance, minimizing, popping on screen, or prioirty conversions) can be edited. Test: Robotests Bug: 194833441 Change-Id: Idc198ea05cd2ab6e43387ae4e8290f446ccfa0c6
This commit is contained in:
@@ -80,7 +80,7 @@ public class BlockPreferenceController extends NotificationPreferenceController
|
||||
}
|
||||
bar.setDisabledByAdmin(mAdmin);
|
||||
|
||||
if (mChannel != null && !isChannelBlockable()) {
|
||||
if (mChannel != null && (!isChannelBlockable() || !isChannelConfigurable(mChannel))) {
|
||||
bar.setSwitchBarEnabled(false);
|
||||
}
|
||||
|
||||
@@ -88,8 +88,7 @@ public class BlockPreferenceController extends NotificationPreferenceController
|
||||
bar.setSwitchBarEnabled(false);
|
||||
}
|
||||
|
||||
if (mChannel == null && mAppRow.systemApp
|
||||
&& (!mAppRow.banned || mAppRow.lockedImportance)) {
|
||||
if (mChannel == null && !isAppBlockable()) {
|
||||
bar.setSwitchBarEnabled(false);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user