diff options
author | Jeff Sharkey <jsharkey@android.com> | 2015-07-20 09:38:02 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2015-07-20 09:38:02 -0700 |
commit | 4fa85b7cadfb2a2e8584f99a8b316f33d56bee75 (patch) | |
tree | 04944859b9cf89cb3eccaa35fc1cd8ebfd61da1b /media | |
parent | b3cf95334551e55e068bf6f9d7640681cdc05e07 (diff) | |
download | frameworks_base-4fa85b7cadfb2a2e8584f99a8b316f33d56bee75.zip frameworks_base-4fa85b7cadfb2a2e8584f99a8b316f33d56bee75.tar.gz frameworks_base-4fa85b7cadfb2a2e8584f99a8b316f33d56bee75.tar.bz2 |
Better logging of MediaPlayer failure reason.
Otherwise exception details are dropped on the floor, making it
hard to debug.
Bug: 22525550
Change-Id: I6ab9eb8461a23b9d9b8a0ea6dd1ae8ee2495dd01
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/MediaPlayer.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java index 6dd855d..a4d3485 100644 --- a/media/java/android/media/MediaPlayer.java +++ b/media/java/android/media/MediaPlayer.java @@ -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); } |