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

Commit 47af9190 authored by Ta-wei Yen's avatar Ta-wei Yen
Browse files

Clear voicemail status text when loading succeeded

In ag/874775, mStateText.setText(null) is removed from
VoicemailPlaybackLayout#setClipPosition(). This caused the error in
mStateText not to be cleared after the voicemail is sucessfully loaded.

This CL adds a setSuccess() method to the layout that clears the message,
which will be called from onPrepared() once the voicemail is loaded.

Fixes:27770842
Change-Id: Ic42e40b99d36f817532dec780b63311c1967300c
(cherry picked from commit f35cf6c6)
parent 5e530f2d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -426,6 +426,11 @@ public class VoicemailPlaybackLayout extends LinearLayout
        mTotalDurationText.setText(formatAsMinutesAndSeconds(durationMs));
    }

    @Override
    public void setSuccess() {
        mStateText.setText(null);
    }

    @Override
    public void setIsFetchingContent() {
        disableUiElements();
+2 −0
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@ public class VoicemailPlaybackPresenter implements MediaPlayer.OnPreparedListene
        void onPlaybackStopped();
        void onSpeakerphoneOn(boolean on);
        void setClipPosition(int clipPositionInMillis, int clipLengthInMillis);
        void setSuccess();
        void setFetchContentTimeout();
        void setIsFetchingContent();
        void onVoicemailArchiveSucceded(Uri voicemailUri);
@@ -606,6 +607,7 @@ public class VoicemailPlaybackPresenter implements MediaPlayer.OnPreparedListene
        Log.d(TAG, "onPrepared: mPosition=" + mPosition);
        mView.setClipPosition(mPosition, mDuration.get());
        mView.enableUiElements();
        mView.setSuccess();
        mMediaPlayer.seekTo(mPosition);

        if (mIsPlaying) {