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:
@@ -66,9 +66,9 @@ public class ImportancePreferenceController extends NotificationPreferenceContro
|
||||
@Override
|
||||
public void updateState(Preference preference) {
|
||||
if (mAppRow!= null && mChannel != null) {
|
||||
preference.setEnabled(mAdmin == null && !mChannel.isImportanceLockedByOEM());
|
||||
preference.setEnabled(mAdmin == null && isChannelConfigurable(mChannel));
|
||||
ImportancePreference pref = (ImportancePreference) preference;
|
||||
pref.setConfigurable(!mChannel.isImportanceLockedByOEM());
|
||||
pref.setConfigurable(isChannelConfigurable(mChannel));
|
||||
pref.setImportance(mChannel.getImportance());
|
||||
pref.setDisplayInStatusBar(mBackend.showSilentInStatusBar(mContext.getPackageName()));
|
||||
pref.setDisplayOnLockscreen(Settings.Secure.getInt(mContext.getContentResolver(),
|
||||
|
Reference in New Issue
Block a user