pull/1212/head
gedoor 3 years ago
parent 29475f2cee
commit 3465a79349
  1. 5
      app/src/main/java/io/legado/app/service/AudioPlayService.kt

@ -161,6 +161,7 @@ class AudioPlayService : BaseService(),
} }
private fun resume() { private fun resume() {
try {
pause = false pause = false
if (!mediaPlayer.isPlaying) { if (!mediaPlayer.isPlaying) {
mediaPlayer.start() mediaPlayer.start()
@ -172,6 +173,10 @@ class AudioPlayService : BaseService(),
AudioPlay.status = Status.PLAY AudioPlay.status = Status.PLAY
postEvent(EventBus.AUDIO_STATE, Status.PLAY) postEvent(EventBus.AUDIO_STATE, Status.PLAY)
upNotification() upNotification()
} catch (e: Exception) {
e.printStackTrace()
stopSelf()
}
} }
private fun adjustProgress(position: Int) { private fun adjustProgress(position: Int) {

Loading…
Cancel
Save