This commit is contained in:
Horis
2024-09-10 15:48:44 +08:00
parent 6dfd42a351
commit eefc7c2818
@@ -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)