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

Commit 601c3c63 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Fix getMediaUri() bug on secondary devices.

We need to return visible paths for MediaProvider to work with,
instead of internal paths.

Bug: 133730441
Test: atest android.providerui.cts.MediaStoreUiTest
Change-Id: If06dc635b22032761626cf54b37b7bc15ace7b2e
parent 190e99cf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -638,7 +638,7 @@ public class ExternalStorageProvider extends FileSystemProvider {
                    final String docId = DocumentsContract.getDocumentId(documentUri);
                    try {
                        final Bundle out = new Bundle();
                        final Uri uri = Uri.fromFile(getFileForDocId(docId));
                        final Uri uri = Uri.fromFile(getFileForDocId(docId, true));
                        out.putParcelable(DocumentsContract.EXTRA_URI, uri);
                        return out;
                    } catch (FileNotFoundException e) {