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

Commit 284342e0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "VideoView: Check state before calling suspend"

parents 7869582f 0862a9f9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -782,7 +782,8 @@ public class VideoView extends SurfaceView

    public void suspend() {
        // HTTP streaming will call MediaPlayer::suspend() for suspend operation, others will call release()
        if (isHTTPStreaming(mUri) && mCurrentState > STATE_PREPARING && mMediaPlayer != null) {
        if (isHTTPStreaming(mUri) && mCurrentState > STATE_PREPARING &&
                mCurrentState < STATE_PLAYBACK_COMPLETED && mMediaPlayer != null) {
            if (mMediaPlayer.suspend()) {
                mTargetState = mCurrentState;
                mCurrentState = STATE_SUSPENDED;