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

Commit 44d42093 authored by Wei Jia's avatar Wei Jia
Browse files

VideoView2Impl: use getState instead of isPlaying

Test: cts
Bug: 112549021
Change-Id: I751ae63d7844bea9379ea7922091f0afcff09968
parent 3d560e51
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -407,7 +407,7 @@ public class VideoView2Impl extends BaseLayout
            return;
        }
        mSpeed = speed;
        if (mMediaPlayer != null && mMediaPlayer.isPlaying()) {
        if (mMediaPlayer != null && mMediaPlayer.getState() == MediaPlayer2.PLAYER_STATE_PLAYING) {
            applySpeed();
        }
        updatePlaybackState();
@@ -1341,7 +1341,7 @@ public class VideoView2Impl extends BaseLayout
                if (isRemotePlayback()) {
                    mRoutePlayer.onPause();
                    mCurrentState = STATE_PAUSED;
                } else if (mMediaPlayer.isPlaying()) {
                } else if (mMediaPlayer.getState() == MediaPlayer2.PLAYER_STATE_PLAYING) {
                    mMediaPlayer.pause();
                    mCurrentState = STATE_PAUSED;
                    updatePlaybackState();