Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2301cb4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Prevent users from blocking system notifications." into nyc-dev

parents fb87919f cdd1a264
Loading
Loading
Loading
Loading
+29 −25
Original line number Diff line number Diff line
@@ -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);