feat: 修复崩溃bug

pull/238/head
gedoor 5 years ago
parent b02c81f89d
commit 2a3d8f3402
  1. 4
      app/src/main/java/io/legado/app/service/AudioPlayService.kt

@ -146,6 +146,7 @@ class AudioPlayService : BaseService(),
if (url.contains(".m3u8", false)) {
stopSelf()
} else {
try {
AudioPlayService.pause = pause
handler.removeCallbacks(mpRunnable)
position = mediaPlayer.currentPosition
@ -154,6 +155,9 @@ class AudioPlayService : BaseService(),
AudioPlay.status = Status.PAUSE
postEvent(EventBus.AUDIO_STATE, Status.PAUSE)
upNotification()
} catch (e: Exception) {
e.printStackTrace()
}
}
}

Loading…
Cancel
Save