From 00ab464c43686f92241550140ee6ee9530b09ffa Mon Sep 17 00:00:00 2001 From: Zim Date: Tue, 8 Dec 2020 17:09:09 +0000 Subject: [PATCH] Revert "Set transcode DeviceConfigs" This reverts commit a99ab83e432b0958ab40ea4a28030db0f270f931. Server side flag will be added, and in the meantime, these strings will be added as a resource in MediaProvider Bug: 174161238 Test: atest TranscodeTest Change-Id: I2d3d9abc1ee5dc230e15f76aed2cc97064013ed5 --- .../android/server/StorageManagerService.java | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java index dbd27af49b17c..c95bfd031af47 100644 --- a/services/core/java/com/android/server/StorageManagerService.java +++ b/services/core/java/com/android/server/StorageManagerService.java @@ -108,7 +108,6 @@ import android.os.storage.StorageManagerInternal; import android.os.storage.StorageVolume; import android.os.storage.VolumeInfo; import android.os.storage.VolumeRecord; -import android.provider.DeviceConfig; import android.provider.DocumentsContract; import android.provider.Downloads; import android.provider.MediaStore; @@ -206,27 +205,6 @@ class StorageManagerService extends IStorageManager.Stub private static final String ANDROID_VOLD_APP_DATA_ISOLATION_ENABLED_PROPERTY = "persist.sys.vold_app_data_isolation_enabled"; - // TODO(b/169327180): Will be fetched from the server, but for now, we emulate this in - // the system_server since it can write to DeviceConfig and MediaProvider can read it - private static final String PROP_TRANSCODE_ENABLED = "transcode_enabled"; - private static final String PROP_TRANSCODE_DEFAULT = "transcode_default"; - private static final String PROP_TRANSCODE_COMPAT_MANIFEST = "transcode_compat_manifest"; - private static final boolean TRANSCODE_ENABLED_VALUE = false; - // Determines the default behavior of apps when transcode is enabled, AKA, Option A/Option B. - // If true, transcode by default (Option B). If false, don't transcode by default (Option A) - // For dogfood, we go with Option B - private static final boolean TRANSCODE_DEFAULT_VALUE = true; - // Format is ,,... - // media_capability_bit_mask is defined in MediaProvider/../TranscodeHelper.java: - // FLAG_HEVC = 1 << 0; - // FLAG_SLOW_MOTION = 1 << 1; - // FLAG_HDR_10 = 1 << 2; - // FLAG_HDR_10_PLUS = 1 << 3; - // FLAG_HDR_HLG = 1 << 4; - // FLAG_HDR_DOLBY_VISION = 1 << 5; - private static final String TRANSCODE_COMPAT_MANIFEST_VALUE = - "com.google.android.apps.photos,1"; - // How long we wait to reset storage, if we failed to call onMount on the // external storage service. public static final int FAILED_MOUNT_RESET_TIMEOUT_SECONDS = 10; @@ -901,18 +879,6 @@ class StorageManagerService extends IStorageManager.Stub com.android.internal.R.bool.config_zramWriteback)) { ZramWriteback.scheduleZramWriteback(mContext); } - - // TODO(b/169327180): Remove after setting up server-side DeviceConfig flags - // Set DeviceConfig values for transcoding that will be read by MediaProvider - DeviceConfig.setProperty(DeviceConfig.NAMESPACE_STORAGE_NATIVE_BOOT, - PROP_TRANSCODE_ENABLED, String.valueOf(TRANSCODE_ENABLED_VALUE), - false /* makeDefault */); - DeviceConfig.setProperty(DeviceConfig.NAMESPACE_STORAGE_NATIVE_BOOT, - PROP_TRANSCODE_DEFAULT, String.valueOf(TRANSCODE_DEFAULT_VALUE), - false /* makeDefault */); - DeviceConfig.setProperty(DeviceConfig.NAMESPACE_STORAGE_NATIVE_BOOT, - PROP_TRANSCODE_COMPAT_MANIFEST, TRANSCODE_COMPAT_MANIFEST_VALUE, - false /* makeDefault */); } /**