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

Commit c058a380 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Open file:// Uris on client side of MediaPlayer.

Bug: 7962739
Change-Id: I674b437593fa083eb66ff3ca57b898cf9bd4a3e9
parent 736ef1e9
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -948,7 +948,12 @@ public class MediaPlayer

    private void setDataSource(String path, String[] keys, String[] values)
            throws IOException, IllegalArgumentException, SecurityException, IllegalStateException {
        File file = new File(path);
        final Uri uri = Uri.parse(path);
        if ("file".equals(uri.getScheme())) {
            path = uri.getPath();
        }

        final File file = new File(path);
        if (file.exists()) {
            FileInputStream is = new FileInputStream(file);
            FileDescriptor fd = is.getFD();