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