diff options
| author | Ben Murdoch <benm@google.com> | 2011-02-28 16:15:33 +0000 |
|---|---|---|
| committer | Ben Murdoch <benm@google.com> | 2011-02-28 16:33:10 +0000 |
| commit | 35381518d0511d1860adea0183f425cdfb4245d4 (patch) | |
| tree | 9c7e14904a344ea58f791b72c23c67e1b64f9a5d /core/java/android/webkit/HTML5Audio.java | |
| parent | d2e91d1dc7c9fcbf792cbc21d283a5915b32cb54 (diff) | |
Don't try to output really long URLs HTML5Audio exception handler.
If we catch an IOException in HTML5Audio.setDataSource, do not try
and output the URL if it's really long as this will likely lead to
an OOM exception being thrown.
Bug: 3486963
Change-Id: If10a489b03ec215e078490a81910b02d68190612
Diffstat (limited to 'core/java/android/webkit/HTML5Audio.java')
| -rw-r--r-- | core/java/android/webkit/HTML5Audio.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/webkit/HTML5Audio.java b/core/java/android/webkit/HTML5Audio.java index a3906ddb76c4..6fc0d119f9c9 100644 --- a/core/java/android/webkit/HTML5Audio.java +++ b/core/java/android/webkit/HTML5Audio.java @@ -173,7 +173,8 @@ class HTML5Audio extends Handler mState = INITIALIZED; mMediaPlayer.prepareAsync(); } catch (IOException e) { - Log.e(LOGTAG, "couldn't load the resource: " + url + " exc: " + e); + String debugUrl = url.length() > 128 ? url.substring(0, 128) + "..." : url; + Log.e(LOGTAG, "couldn't load the resource: "+ debugUrl +" exc: " + e); resetMediaPlayer(); } } |
