diff options
| author | Manish Singh <psych@google.com> | 2020-12-02 06:27:29 +0000 |
|---|---|---|
| committer | Manish Singh <psych@google.com> | 2020-12-06 23:37:15 +0000 |
| commit | 3b8d8bc7813a803fb2183c96ec404a541b6ba9b0 (patch) | |
| tree | 89b30cd215992375a316618ee03b991cce8fc38e /core/java/android/os/FileUtils.java | |
| parent | c43d935c42a55f7498a89d52a7df8592e7f06477 (diff) | |
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
Diffstat (limited to 'core/java/android/os/FileUtils.java')
| -rw-r--r-- | core/java/android/os/FileUtils.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/os/FileUtils.java b/core/java/android/os/FileUtils.java index 5db4107f02f1..379d6e6f5dfe 100644 --- a/core/java/android/os/FileUtils.java +++ b/core/java/android/os/FileUtils.java @@ -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. |
