Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63064782 authored by Zim's avatar Zim Committed by Zimuzo Ezeozue
Browse files

Use accept_original_media_format constant

Bug: 158465539
Test: m
Change-Id: I82b9f3b740d295cfa927987783e5fe1bab562070
parent 8bf124b0
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -1463,8 +1463,7 @@ public final class FileUtils {
            Uri uri = MediaStore.scanFile(resolver, realFile);
            Uri uri = MediaStore.scanFile(resolver, realFile);
            if (uri != null) {
            if (uri != null) {
                Bundle opts = new Bundle();
                Bundle opts = new Bundle();
                // TODO(b/158465539): Use API constant
                opts.putBoolean(MediaStore.EXTRA_ACCEPT_ORIGINAL_MEDIA_FORMAT, true);
                opts.putBoolean("android.provider.extra.ACCEPT_ORIGINAL_MEDIA_FORMAT", true);
                AssetFileDescriptor afd = resolver.openTypedAssetFileDescriptor(uri, "*/*", opts);
                AssetFileDescriptor afd = resolver.openTypedAssetFileDescriptor(uri, "*/*", opts);
                Log.i(TAG, "Changed to modern format dataSource for: " + realFile);
                Log.i(TAG, "Changed to modern format dataSource for: " + realFile);
                return afd.getFileDescriptor();
                return afd.getFileDescriptor();