diff options
Diffstat (limited to 'src/com/android/dialer/voicemail')
-rw-r--r-- | src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java index 93ff00270..2bb4de932 100644 --- a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java +++ b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java @@ -36,6 +36,7 @@ import android.view.WindowManager.LayoutParams; import android.widget.SeekBar; import com.android.dialer.R; +import com.android.dialer.calllog.CallLogAsyncTaskUtil; import com.android.dialer.util.AsyncTaskExecutor; import com.android.dialer.util.AsyncTaskExecutors; import com.android.common.io.MoreCloseables; @@ -557,6 +558,12 @@ public class VoicemailPlaybackPresenter implements MediaPlayer.OnPreparedListene Log.d(TAG, "onPrepared"); mIsPrepared = true; + // Update the duration in the database if it was not previously retrieved + if (mDuration.get() == 0) { + CallLogAsyncTaskUtil.updateVoicemailDuration(mContext, mVoicemailUri, + mMediaPlayer.getDuration() / 1000); + } + mDuration.set(mMediaPlayer.getDuration()); Log.d(TAG, "onPrepared: mPosition=" + mPosition); |