Horis 2 лет назад
Родитель
Сommit
eefc7c2818
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      app/src/main/java/io/legado/app/service/BaseReadAloudService.kt

+ 3 - 0
app/src/main/java/io/legado/app/service/BaseReadAloudService.kt

@@ -275,6 +275,7 @@ abstract class BaseReadAloudService : BaseService(),
         isRun = true
         isRun = true
         pause = false
         pause = false
         needResumeOnAudioFocusGain = false
         needResumeOnAudioFocusGain = false
+        needResumeOnCallStateIdle = false
         upReadAloudNotification()
         upReadAloudNotification()
         postEvent(EventBus.ALOUD_STATE, Status.PLAY)
         postEvent(EventBus.ALOUD_STATE, Status.PLAY)
     }
     }
@@ -302,6 +303,8 @@ abstract class BaseReadAloudService : BaseService(),
     @CallSuper
     @CallSuper
     open fun resumeReadAloud() {
     open fun resumeReadAloud() {
         pause = false
         pause = false
+        needResumeOnAudioFocusGain = false
+        needResumeOnCallStateIdle = false
         upReadAloudNotification()
         upReadAloudNotification()
         upMediaSessionPlaybackState(PlaybackStateCompat.STATE_PLAYING)
         upMediaSessionPlaybackState(PlaybackStateCompat.STATE_PLAYING)
         postEvent(EventBus.ALOUD_STATE, Status.PLAY)
         postEvent(EventBus.ALOUD_STATE, Status.PLAY)