Merge "Unrestrict granted ECM setting for A11Y" into main

This commit is contained in:
Treehugger Robot
2025-01-24 18:12:10 -08:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 3 deletions

View File

@@ -147,7 +147,7 @@ public class RestrictedPreferenceHelper {
&& android.security.Flags.extendEcmToAllSettings()) { && android.security.Flags.extendEcmToAllSettings()) {
preference.checkEcmRestrictionAndSetDisabled( preference.checkEcmRestrictionAndSetDisabled(
AppOpsManager.OPSTR_BIND_ACCESSIBILITY_SERVICE, AppOpsManager.OPSTR_BIND_ACCESSIBILITY_SERVICE,
preference.getPackageName()); preference.getPackageName(), serviceEnabled);
if (preference.isDisabledByEcm()) { if (preference.isDisabledByEcm()) {
serviceAllowed = false; serviceAllowed = false;
} }

View File

@@ -136,11 +136,12 @@ public class RestrictedAppPreference extends AppPreference implements
/** /**
* Checks if the given setting is subject to Enhanced Confirmation Mode restrictions for this * Checks if the given setting is subject to Enhanced Confirmation Mode restrictions for this
* package. Marks the preference as disabled if so. * 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 settingIdentifier The key identifying the setting
* @param packageName the package to check the settingIdentifier for * @param packageName the package to check the settingIdentifier for
*/ */
public void checkEcmRestrictionAndSetDisabled(@NonNull String settingIdentifier, public void checkEcmRestrictionAndSetDisabled(@NonNull String settingIdentifier,
@NonNull String packageName) { @NonNull String packageName) {
mHelper.checkEcmRestrictionAndSetDisabled(settingIdentifier, packageName); mHelper.checkEcmRestrictionAndSetDisabled(settingIdentifier, packageName, false);
} }
} }