pull/46/head
kunfei 5 years ago
parent 0bf3f8e7ab
commit e9e9d3b4c7
  1. 3
      app/src/main/java/io/legado/app/service/AudioPlayService.kt

@ -87,8 +87,11 @@ class AudioPlayService : BaseService(),
override fun onDestroy() {
super.onDestroy()
isRun = false
handler.removeCallbacks(dsRunnable)
handler.removeCallbacks(mpRunnable)
mediaPlayer.release()
mediaSessionCompat?.release()
unregisterReceiver(broadcastReceiver)
upMediaSessionPlaybackState(PlaybackStateCompat.STATE_STOPPED)
postEvent(Bus.AUDIO_STATE, Status.STOP)
}

Loading…
Cancel
Save