diff options
author | 2024-06-30 17:47:14 +0000 | |
---|---|---|
committer | 2024-07-01 10:06:12 +0000 | |
commit | 9c94e671b12cd3f65ad385a0e27cbde377d1bf94 (patch) | |
tree | 176b206f97b6ad3b6a87366e34523d8f1611aee2 | |
parent | 6f0ecaa40b6ffb01634e2a0161d0cfeead4bb856 (diff) |
Add trunk stable flags for stable uris for public volume
Test: n/a
Bug: 213931581
Flag: com.android.providers.media.flags.enable_stable_uris_for_public_volume
Change-Id: Ic2190ef7f952737c8939b71b364a16f25adb760c
-rw-r--r-- | mediaprovider_flags.aconfig | 8 | ||||
-rw-r--r-- | src/com/android/providers/media/DatabaseBackupAndRecovery.java | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/mediaprovider_flags.aconfig b/mediaprovider_flags.aconfig index 1cfe3b05a..f51825b08 100644 --- a/mediaprovider_flags.aconfig +++ b/mediaprovider_flags.aconfig @@ -80,3 +80,11 @@ flag { description: "This flag will enable stable uris for external primary volume" bug: "213931581" } + +flag { + name: "enable_stable_uris_for_public_volume" + is_exported: true + namespace: "mediaprovider" + description: "This flag will enable stable uris for public volume" + bug: "213931581" +} diff --git a/src/com/android/providers/media/DatabaseBackupAndRecovery.java b/src/com/android/providers/media/DatabaseBackupAndRecovery.java index e8336b1fd..8009225f3 100644 --- a/src/com/android/providers/media/DatabaseBackupAndRecovery.java +++ b/src/com/android/providers/media/DatabaseBackupAndRecovery.java @@ -26,6 +26,7 @@ import static com.android.providers.media.MediaProviderStatsLog.MEDIA_PROVIDER_V import static com.android.providers.media.MediaProviderStatsLog.MEDIA_PROVIDER_VOLUME_RECOVERY_REPORTED__VOLUME__PUBLIC; import static com.android.providers.media.util.Logging.TAG; import static com.android.providers.media.flags.Flags.enableStableUrisForExternalPrimaryVolume; +import static com.android.providers.media.flags.Flags.enableStableUrisForPublicVolume; import android.content.ContentValues; import android.database.Cursor; @@ -235,8 +236,8 @@ public class DatabaseBackupAndRecovery { default: // public volume return mIsStableUrisEnabledForPublic - || isStableUrisEnabled(MediaStore.VOLUME_EXTERNAL_PRIMARY) - && mConfigStore.isStableUrisForPublicVolumeEnabled() + || mConfigStore.isStableUrisForPublicVolumeEnabled() + || enableStableUrisForPublicVolume() || SystemProperties.getBoolean(STABLE_URI_PUBLIC_PROPERTY, /* defaultValue */ STABLE_URI_PUBLIC_PROPERTY_VALUE); } |