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

Commit b01504da authored by Ian Baker's avatar Ian Baker
Browse files

Log exception when MediaPlayer.attemptDataSource fails

This gives more context when a subsequent fallback call to
setDataSource(String, Map<String, String>, List<HttpCookie>) fails
(which is often expected, especially for content:// URIs). These logs
should help to see more detail of the unexpected failure from
ContentResolver in this case.

Bug: 313263440
Test: Presubmit
Change-Id: I77df208d796c92596a5c28d845aaaf71546173b5
parent 9c8f5c1f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1156,6 +1156,7 @@ public class MediaPlayer extends PlayerBase
            setDataSource(afd);
            return true;
        } catch (NullPointerException | SecurityException | IOException ex) {
            Log.w(TAG, "Error setting data source via ContentResolver", ex);
            return false;
        }
    }