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

Commit 5a25a84b authored by Stanislav Zholnin's avatar Stanislav Zholnin
Browse files

Add WRITE_DEVICE_CONFIG permission check to DeviceConfig API.

Test: atest FrameworksCoreTests:DeviceConfigTest
      atest FrameworksCoreTests:SettingsProviderTest
      atest SettingsProviderTest:DeviceConfigServiceTest

Bug:117663715
Change-Id: Iab7dd7959891ebc29fbbf773ce6ab28ba4e05f1d
parent c7f498fe
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1103,9 +1103,7 @@ public class SettingsProvider extends ContentProvider {

    private boolean mutateConfigSetting(String name, String value, String prefix,
            boolean makeDefault, int operation, int mode) {

        // TODO(b/117663715): Ensure the caller can access the setting.
        // enforceReadPermission(WRITE_DEVICE_CONFIG);
        enforceWritePermission(Manifest.permission.WRITE_DEVICE_CONFIG);

        // Perform the mutation.
        synchronized (mLock) {