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

Commit 579be20a authored by Michael Groover's avatar Michael Groover Committed by Android (Google) Code Review
Browse files

Merge "Enforce adb shell DeviceConfig flags restrictions" into main

parents e0cb1adc 02dc1fb0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2470,7 +2470,7 @@ public class SettingsProvider extends ContentProvider {
        boolean isRestrictedShell = android.security.Flags.protectDeviceConfigFlags()
                && hasAllowlistPermission;

        if (!isRestrictedShell && hasWritePermission) {
        if (hasWritePermission) {
            assertCallingUserDenyList(flags);
        } else if (hasAllowlistPermission) {
            Set<String> allowlistedDeviceConfigNamespaces = null;
@@ -2500,7 +2500,7 @@ public class SettingsProvider extends ContentProvider {
                }

                if (!namespaceAllowed && !DeviceConfig.getAdbWritableFlags().contains(flag)) {
                    Slog.wtf(LOG_TAG, "Permission denial for flag '" + flag
                    throw new SecurityException("Permission denial for flag '" + flag
                            + "'; allowlist permission granted, but must add flag to the "
                            + "allowlist");
                }