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

Commit 7af5ef28 authored by Nate Myren's avatar Nate Myren
Browse files

Do not override Admin restrict summary with ECM

Fixes: 406951179
Test: manual
Flag: EXEMPT minor bugfix
Change-Id: I1846a1cbe6241b643b90a63a91da44df6a82a977
parent 90a077a3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -160,7 +160,6 @@ internal class RestrictedSwitchPreferenceModel(
                is NoRestricted -> summaryIfNoRestricted()
                is BaseUserRestricted ->
                    context.getString(com.android.settingslib.R.string.disabled)

                is BlockedByAdmin ->
                    restrictedMode.getSummary(checkedIfBlockedByAdmin ?: checkedIfNoRestricted())
                is BlockedByEcm -> if (restrictedMode.isBlockedByPhoneCall()) {
+2 −4
Original line number Diff line number Diff line
@@ -332,14 +332,12 @@ public class RestrictedPreferenceHelper {
            ((PrimarySwitchPreference) mPreference).setSwitchEnabled(isEnabled);
        }

        if (android.security.Flags.aapmApi() && !isEnabled && mDisabledByAdmin) {
        if (android.security.Flags.aapmApi() && mDisabledByAdmin) {
            String summary = getDisabledByAdminSummaryString();
            if (summary != null) {
                mPreference.setSummary(summary);
            }
        }

        if (!isEnabled && mDisabledByEcm) {
        } else if (mDisabledByEcm) {
            mPreference.setSummary(getEcmTextResId());
        }
    }