|
|
|
@ -1,6 +1,7 @@ |
|
|
|
|
package io.legado.app.service |
|
|
|
|
|
|
|
|
|
import android.app.PendingIntent |
|
|
|
|
import android.content.Intent |
|
|
|
|
import android.media.MediaPlayer |
|
|
|
|
import io.legado.app.constant.EventBus |
|
|
|
|
import io.legado.app.help.AppConfig |
|
|
|
@ -36,6 +37,11 @@ class HttpReadAloudService : BaseReadAloudService(), |
|
|
|
|
mediaPlayer.setOnCompletionListener(this) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun onTaskRemoved(rootIntent: Intent?) { |
|
|
|
|
super.onTaskRemoved(rootIntent) |
|
|
|
|
stopSelf() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun onDestroy() { |
|
|
|
|
super.onDestroy() |
|
|
|
|
task?.cancel() |
|
|
|
|