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

Commit f998add6 authored by Qi Wang's avatar Qi Wang Committed by Android (Google) Code Review
Browse files

Merge "Update seek position by using volume rocker in talkback mode." into nyc-dev

parents 79e26069 1900ad92
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -151,6 +151,11 @@ public class VoicemailPlaybackLayout extends LinearLayout
        @Override
        public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
            setClipPosition(progress, seekBar.getMax());
            // Update the seek position if user manually changed it. This makes sure position gets
            // updated when user use volume button to seek playback in talkback mode.
            if (fromUser) {
                mPresenter.seek(progress);
            }
        }
    };

+9 −0
Original line number Diff line number Diff line
@@ -747,6 +747,15 @@ public class VoicemailPlaybackPresenter implements MediaPlayer.OnPreparedListene
        }
    }

    /**
     * Seek to position. This is called when user manually seek the playback. It could be either
     * by touch or volume button while in talkback mode.
     * @param position
     */
    public void seek(int position) {
        mPosition = position;
    }

    private void enableProximitySensor() {
        if (mProximityWakeLock == null || mIsSpeakerphoneOn || !mIsPrepared
                || mMediaPlayer == null || !mMediaPlayer.isPlaying()) {