pull/32/head
kunfei 5 years ago
parent 9a5758634c
commit 75fce76f62
  1. 3
      app/src/main/java/io/legado/app/App.kt
  2. 1
      app/src/main/java/io/legado/app/service/ReadAloudService.kt

@ -144,13 +144,13 @@ class App : Application() {
private fun registerActivityLife(){
registerActivityLifecycleCallbacks(object : ActivityLifecycleCallbacks{
override fun onActivityPaused(activity: Activity) {
ActivityHelp.add(activity)
}
override fun onActivityResumed(activity: Activity) {
}
override fun onActivityStarted(activity: Activity) {
}
override fun onActivityDestroyed(activity: Activity) {
@ -164,6 +164,7 @@ class App : Application() {
}
override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) {
ActivityHelp.add(activity)
}
})

@ -219,6 +219,7 @@ class ReadAloudService : BaseService(), TextToSpeech.OnInitListener, AudioManage
}
private fun pauseReadAloud(pause: Boolean) {
if (pause) postEvent(Bus.ALOUD_STATE, Status.PAUSE)
this.pause = pause
textToSpeech?.stop()
ReadAloudNotification.upNotification(this)

Loading…
Cancel
Save