Merge "Introduce new preference indicating user control."

This commit is contained in:
Manish Singh
2020-12-07 06:50:22 +00:00
committed by Android (Google) Code Review
2 changed files with 10 additions and 3 deletions

View File

@@ -1436,7 +1436,8 @@ public final class FileUtils {
public static FileDescriptor convertToModernFd(FileDescriptor fd) {
try {
Context context = AppGlobals.getInitialApplication();
if (!SystemProperties.getBoolean("persist.sys.fuse.transcode", false)
// TODO(b/169327180): Consider device config.
if (!SystemProperties.getBoolean("persist.sys.fuse.transcode_enabled", false)
|| !SystemProperties.getBoolean("persist.sys.fuse.transcode_optimize", true)
|| UserHandle.getAppId(Process.myUid()) == getMediaProviderAppId(context)) {
// If transcode is enabled we optimize by default, unless explicitly disabled.

View File

@@ -995,8 +995,14 @@
<!-- Settings item title for media transcoding settings. [CHAR LIMIT=85] -->
<string name="transcode_settings_title">Media transcoding settings</string>
<!-- Settings item title to disable transcoding globally. [CHAR LIMIT=85] -->
<string name="transcode_enable_all">Disable transcoding</string>
<!-- Settings item title to enable user's control over further transcoding preferences. [CHAR LIMIT=85] -->
<string name="transcode_user_control">Override transcoding defaults</string>
<!-- Settings item title to enable transcoding globally. [CHAR LIMIT=85] -->
<string name="transcode_enable_all">Enable transcoding</string>
<!-- Settings item title to select the default behavior for transcoding if an encodig is not supported by an app. [CHAR LIMIT=85] -->
<string name="transcode_default">Assume apps support modern formats</string>
<!-- Settings category title for selecting apps to be enabled for transcoding. [CHAR LIMIT=85] -->
<string name="transcode_skip_apps">Enable transcoding for apps</string>