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

Commit f2944383 authored by Dennis Shen's avatar Dennis Shen
Browse files

Stop propagate aconfig flag values to sys prop when new storage is on

Bug: b/357687527
Test: m and AVD test
Flag: com.android.aconfig_new_storage.enable_aconfig_storage_daemon
Change-Id: I6c99315f5825e755d96d1943ddfc38d86d6cd3e6
parent ee1835d1
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -382,6 +382,12 @@ public class SettingsToPropertiesMapper {
            newSingleThreadScheduledExecutor(),
            (DeviceConfig.Properties properties) -> {

              // send prop stage request to new storage
              if (enableAconfigStorageDaemon()) {
                  stageFlagsInNewStorage(properties);
                  return;
              }

              for (String flagName : properties.getKeyset()) {
                  String flagValue = properties.getString(flagName, null);
                  if (flagName == null || flagValue == null) {
@@ -409,11 +415,6 @@ public class SettingsToPropertiesMapper {
                  setProperty(propertyName, flagValue);
              }

              // send prop stage request to new storage
              if (enableAconfigStorageDaemon()) {
                  stageFlagsInNewStorage(properties);
              }

        });

        // add prop sync callback for flag local overrides
@@ -423,6 +424,7 @@ public class SettingsToPropertiesMapper {
            (DeviceConfig.Properties properties) -> {
                if (enableAconfigStorageDaemon()) {
                    setLocalOverridesInNewStorage(properties);
                    return;
                }

                if (Flags.supportLocalOverridesSysprops()) {