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

Commit 4fa85b7c authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Better logging of MediaPlayer failure reason.

Otherwise exception details are dropped on the floor, making it
hard to debug.

Bug: 22525550
Change-Id: I6ab9eb8461a23b9d9b8a0ea6dd1ae8ee2495dd01
parent b3cf9533
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1017,16 +1017,14 @@ public class MediaPlayer implements SubtitleController.Listener
                setDataSource(fd.getFileDescriptor(), fd.getStartOffset(), fd.getDeclaredLength());
            }
            return;
        } catch (SecurityException ex) {
        } catch (IOException ex) {
        } catch (SecurityException | IOException ex) {
            Log.w(TAG, "Couldn't open file on client side; trying server side: " + ex);
        } finally {
            if (fd != null) {
                fd.close();
            }
        }

        Log.d(TAG, "Couldn't open file on client side, trying server side");

        setDataSource(uri.toString(), headers);
    }