Merge \\"Prevent users from blocking system notifications.\\" into nyc-dev am: b2301cb4c2

am: f04499b2e1

Change-Id: I9253ee4788f3e3bf6918a98fc2a2c4927d920114
This commit is contained in:
Julia Reynolds
2016-06-14 22:33:34 +00:00
committed by android-build-merger

View File

@@ -175,6 +175,9 @@ abstract public class NotificationSettingsBase extends SettingsPreferenceFragmen
});
} else {
setVisible(mImportance, false);
if (isSystemApp) {
setVisible(mBlock, false);
} else {
boolean blocked = importance == Ranking.IMPORTANCE_NONE || banned;
mBlock.setChecked(blocked);
mBlock.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@@ -203,6 +206,7 @@ abstract public class NotificationSettingsBase extends SettingsPreferenceFragmen
updateDependents(banned ? Ranking.IMPORTANCE_NONE : importance);
}
}
}
protected void setupPriorityPref(boolean priority) {
mPriority.setDisabledByAdmin(mSuspendedAppsAdmin);