Introduce new preference indicating user control.
If the user enables this, then that means that we will respect user's choices for all the preferences, i.e. we will not update the preferences based on the updates from server. On the other hand, if it's disabled, then the rest of the preferences would not be considered. And we'd decide their values based on the values from the DeviceConfig (which in turn come from the server). Also, renaming the set prop key for enabling-transcode to match the one in DeviceConfig - transcode_enabled. Also, the "transcode_enable_all" controller now enables (instead of disabling) the global level transcoding. BUG:169327180 Test: manual testing. Change-Id: I183b3b5496b647943be377c02c8c9e2a0df71752
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user