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

Commit a371de64 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Allow SettingsMainSwitchBars to be disabled" into sc-dev am: 81052064

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13887336

Change-Id: Id44284ef8988ebd80d3586fde4462aeab3754102
parents 334b01e9 81052064
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -84,9 +84,8 @@ public class SettingsMainSwitchBar extends MainSwitchBar {
    }

    /**
     * If admin is not null, disables the text and switch but keeps the view clickable.
     * Otherwise, calls setEnabled which will enables the entire view including
     * the text and switch.
     * If admin is not null, disables the text and switch but keeps the view clickable (unless the
     * switch is disabled for other reasons). Otherwise, calls setEnabled.
     */
    public void setDisabledByAdmin(RestrictedLockUtils.EnforcedAdmin admin) {
        mEnforcedAdmin = admin;
@@ -101,7 +100,7 @@ public class SettingsMainSwitchBar extends MainSwitchBar {
            mDisabledByAdmin = false;
            mSwitch.setVisibility(View.VISIBLE);
            mRestrictedIcon.setVisibility(View.GONE);
            setEnabled(true);
            setEnabled(isEnabled());
        }
    }

+1 −0
Original line number Diff line number Diff line
@@ -186,6 +186,7 @@ public class SettingsMainSwitchPreference extends TwoStatePreference {
     * Enable or disable the text and switch.
     */
    public void setSwitchBarEnabled(boolean enabled) {
        setEnabled(enabled);
        if (mMainSwitchBar != null) {
            mMainSwitchBar.setEnabled(enabled);
        }