Merge "Prevent users from blocking system notifications." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b2301cb4c2
@@ -175,6 +175,9 @@ abstract public class NotificationSettingsBase extends SettingsPreferenceFragmen
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
setVisible(mImportance, false);
|
setVisible(mImportance, false);
|
||||||
|
if (isSystemApp) {
|
||||||
|
setVisible(mBlock, false);
|
||||||
|
} else {
|
||||||
boolean blocked = importance == Ranking.IMPORTANCE_NONE || banned;
|
boolean blocked = importance == Ranking.IMPORTANCE_NONE || banned;
|
||||||
mBlock.setChecked(blocked);
|
mBlock.setChecked(blocked);
|
||||||
mBlock.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
|
mBlock.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
|
||||||
@@ -203,6 +206,7 @@ abstract public class NotificationSettingsBase extends SettingsPreferenceFragmen
|
|||||||
updateDependents(banned ? Ranking.IMPORTANCE_NONE : importance);
|
updateDependents(banned ? Ranking.IMPORTANCE_NONE : importance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected void setupPriorityPref(boolean priority) {
|
protected void setupPriorityPref(boolean priority) {
|
||||||
mPriority.setDisabledByAdmin(mSuspendedAppsAdmin);
|
mPriority.setDisabledByAdmin(mSuspendedAppsAdmin);
|
||||||
|
Reference in New Issue
Block a user