|
|
@ -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) |
|
|
|
} |
|
|
|
} |
|
|
|