diff options
author | Andrei Popescu <andreip@google.com> | 2009-09-30 14:54:55 +0100 |
---|---|---|
committer | Andrei Popescu <andreip@google.com> | 2009-09-30 14:54:55 +0100 |
commit | 020d2e3453b98ae435c4c21b849a2fe0a8842be7 (patch) | |
tree | 85e5627a8eea8ab7b39e6aaa7aa8cb46eee88b9f /core/java/android/widget/VideoView.java | |
parent | b386a86c1c131832c8f9955a5a57a2fa13609d15 (diff) | |
download | frameworks_base-020d2e3453b98ae435c4c21b849a2fe0a8842be7.zip frameworks_base-020d2e3453b98ae435c4c21b849a2fe0a8842be7.tar.gz frameworks_base-020d2e3453b98ae435c4c21b849a2fe0a8842be7.tar.bz2 |
Invoke the OnErrorListener callback when MediaPlayer.setDataSource() throws.
Fixes http://b/issue?id=2156505
Diffstat (limited to 'core/java/android/widget/VideoView.java')
-rw-r--r-- | core/java/android/widget/VideoView.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/widget/VideoView.java b/core/java/android/widget/VideoView.java index 549f984..8142a82 100644 --- a/core/java/android/widget/VideoView.java +++ b/core/java/android/widget/VideoView.java @@ -222,11 +222,13 @@ public class VideoView extends SurfaceView implements MediaPlayerControl { Log.w(TAG, "Unable to open content: " + mUri, ex); mCurrentState = STATE_ERROR; mTargetState = STATE_ERROR; + mErrorListener.onError(mMediaPlayer, MediaPlayer.MEDIA_ERROR_UNKNOWN, 0); return; } catch (IllegalArgumentException ex) { Log.w(TAG, "Unable to open content: " + mUri, ex); mCurrentState = STATE_ERROR; mTargetState = STATE_ERROR; + mErrorListener.onError(mMediaPlayer, MediaPlayer.MEDIA_ERROR_UNKNOWN, 0); return; } } |