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

Commit 020d2e34 authored by Andrei Popescu's avatar Andrei Popescu
Browse files

Invoke the OnErrorListener callback when MediaPlayer.setDataSource() throws.

parent b386a86c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
        }
    }