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

Commit 97c15d1b authored by Nancy Chen's avatar Nancy Chen
Browse files

Pause playback when voicemail is deleted.

We don't want the voicemail to continue playing after deleted, so
perform the pause behavior when the delete button is pressed.

Bug: 22462516
Change-Id: I664c5aed0c2bd1910cdf1f20a33c0117dde8d0cc
parent 515575eb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -183,6 +183,7 @@ public class VoicemailPlaybackLayout extends LinearLayout
            if (mPresenter == null) {
                return;
            }
            mPresenter.pausePlayback();
            CallLogAsyncTaskUtil.deleteVoicemail(mContext, mVoicemailUri, null);
        }
    };
+5 −2
Original line number Diff line number Diff line
@@ -627,7 +627,8 @@ public class VoicemailPlaybackPresenter
            mMediaPlayer.pause();
        }

        mPosition = mMediaPlayer.getCurrentPosition();
        mPosition = mMediaPlayer == null ? 0 : mMediaPlayer.getCurrentPosition();

        Log.d(TAG, "Paused playback at " + mPosition + ".");

        if (mView != null) {
@@ -646,7 +647,9 @@ public class VoicemailPlaybackPresenter
     * playing to know whether to resume playback once the user selects a new position.
     */
    public void pausePlaybackForSeeking() {
        if (mMediaPlayer != null) {
            mShouldResumePlaybackAfterSeeking = mMediaPlayer.isPlaying();
        }
        pausePlayback();
    }