Merge "[ECM] Legacy code: treat DEFAULT as ALLOWED (st)" into main

This commit is contained in:
Jay Sullivan
2024-03-22 19:30:56 +00:00
committed by Android (Google) Code Review

View File

@@ -267,7 +267,8 @@ public class RestrictedPreferenceHelper {
preference.getUid(), preference.getPackageName());
final boolean ecmEnabled = mContext.getResources().getBoolean(
com.android.internal.R.bool.config_enhancedConfirmationModeEnabled);
appOpsAllowed = !ecmEnabled || mode == AppOpsManager.MODE_ALLOWED;
appOpsAllowed = !ecmEnabled || mode == AppOpsManager.MODE_ALLOWED
|| mode == AppOpsManager.MODE_DEFAULT;
serviceAllowed = appOpsAllowed;
} catch (Exception e) {
// Allow service in case if app ops is not available in testing.