From 50aeb530e8a5b27edbc2dc7bebc82b42752080b8 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 4 Nov 2019 20:26:04 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/service/AudioPlayService.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/io/legado/app/service/AudioPlayService.kt b/app/src/main/java/io/legado/app/service/AudioPlayService.kt index 082804095..dc8f6d26d 100644 --- a/app/src/main/java/io/legado/app/service/AudioPlayService.kt +++ b/app/src/main/java/io/legado/app/service/AudioPlayService.kt @@ -116,6 +116,7 @@ class AudioPlayService : BaseService(), private fun pause(pause: Boolean) { this.pause = pause + handler.removeCallbacks(mpRunnable) position = mediaPlayer.currentPosition mediaPlayer.pause() upMediaSessionPlaybackState(PlaybackStateCompat.STATE_PAUSED) @@ -127,6 +128,7 @@ class AudioPlayService : BaseService(), pause = false mediaPlayer.start() mediaPlayer.seekTo(position) + handler.postDelayed(mpRunnable, 1000) upMediaSessionPlaybackState(PlaybackStateCompat.STATE_PLAYING) postEvent(Bus.AUDIO_STATE, Status.PLAY) upNotification()