summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dennis Shen <dzshen@google.com> 2024-12-02 15:29:46 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-12-02 15:29:46 +0000
commit27ea7e68028d269ab0d062e007b9a3161a985b1e (patch)
tree81f0fce4a5f5d7e674da25694dd5448257383523
parentd928b27dac51083eb823cc499c20a8e0e81a127a (diff)
parentf235e5baa5ce2b2fd0c16a5185697683ce2637c4 (diff)
Merge "Remove new storage test mission marker file code now that new storage is launched" into main
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java31
1 files changed, 0 insertions, 31 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
index fc7802c9f9da..68b66dfa2657 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
@@ -178,11 +178,6 @@ final class SettingsState {
private static final String APEX_DIR = "/apex";
private static final String APEX_ACONFIG_PATH_SUFFIX = "/etc/aconfig_flags.pb";
- private static final String STORAGE_MIGRATION_FLAG =
- "core_experiments_team_internal/com.android.providers.settings.storage_test_mission_1";
- private static final String STORAGE_MIGRATION_MARKER_FILE =
- "/metadata/aconfig_test_missions/mission_1";
-
/**
* This tag is applied to all aconfig default value-loaded flags.
*/
@@ -1740,32 +1735,6 @@ final class SettingsState {
}
}
- if (isConfigSettingsKey(mKey) && name != null
- && name.equals(STORAGE_MIGRATION_FLAG)) {
- if (value.equals("true")) {
- Path path = Paths.get(STORAGE_MIGRATION_MARKER_FILE);
- if (!Files.exists(path)) {
- Files.createFile(path);
- }
-
- Set<PosixFilePermission> perms =
- Files.readAttributes(path, PosixFileAttributes.class).permissions();
- perms.add(PosixFilePermission.OWNER_WRITE);
- perms.add(PosixFilePermission.OWNER_READ);
- perms.add(PosixFilePermission.GROUP_READ);
- perms.add(PosixFilePermission.OTHERS_READ);
- try {
- Files.setPosixFilePermissions(path, perms);
- } catch (Exception e) {
- Slog.e(LOG_TAG, "failed to set permissions on migration marker", e);
- }
- } else {
- java.nio.file.Path path = Paths.get(STORAGE_MIGRATION_MARKER_FILE);
- if (Files.exists(path)) {
- Files.delete(path);
- }
- }
- }
mSettings.put(name, new Setting(name, value, defaultValue, packageName, tag,
fromSystem, id, isPreservedInRestore));