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

Commit 7c794f07 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Do not override Admin restrict summary with ECM" into main

parents 8fc7dc55 7af5ef28
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());
        }
    }