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() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
isRun = false isRun = false
handler.removeCallbacks(dsRunnable)
handler.removeCallbacks(mpRunnable)
mediaPlayer.release() mediaPlayer.release()
mediaSessionCompat?.release() mediaSessionCompat?.release()
unregisterReceiver(broadcastReceiver)
upMediaSessionPlaybackState(PlaybackStateCompat.STATE_STOPPED) upMediaSessionPlaybackState(PlaybackStateCompat.STATE_STOPPED)
postEvent(Bus.AUDIO_STATE, Status.STOP) postEvent(Bus.AUDIO_STATE, Status.STOP)
} }

Loading…
Cancel
Save