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

Commit bfedd950 authored by Nate Myren's avatar Nate Myren
Browse files

Unrestrict granted ECM setting for A11Y

Other RestrictedPreference users' behavior is kept the same, for now.

Bug: 390196024
Test: manual
Flag: EXEMPT: minor bugfix
Change-Id: I4efe26d254b44defc15778271d9ff6d7270ec443
parent f362378c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ public class RestrictedPreferenceHelper {
                && android.security.Flags.extendEcmToAllSettings()) {
            preference.checkEcmRestrictionAndSetDisabled(
                    AppOpsManager.OPSTR_BIND_ACCESSIBILITY_SERVICE,
                    preference.getPackageName());
                    preference.getPackageName(), serviceEnabled);
            if (preference.isDisabledByEcm()) {
                serviceAllowed = false;
            }
+3 −2
Original line number Diff line number Diff line
@@ -136,11 +136,12 @@ public class RestrictedAppPreference extends AppPreference implements
    /**
     * Checks if the given setting is subject to Enhanced Confirmation Mode restrictions for this
     * package. Marks the preference as disabled if so.
     * TODO b/390196024: remove this and update all callers to use the "settingEnabled" version
     * @param settingIdentifier The key identifying the setting
     * @param packageName the package to check the settingIdentifier for
     */
    public void checkEcmRestrictionAndSetDisabled(@NonNull String settingIdentifier,
            @NonNull String packageName) {
        mHelper.checkEcmRestrictionAndSetDisabled(settingIdentifier, packageName);
        mHelper.checkEcmRestrictionAndSetDisabled(settingIdentifier, packageName, false);
    }
}