|
|
@ -7,7 +7,6 @@ import android.support.v4.media.session.PlaybackStateCompat |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.constant.AppConst |
|
|
|
import io.legado.app.constant.AppConst |
|
|
|
import io.legado.app.constant.Bus |
|
|
|
import io.legado.app.constant.Bus |
|
|
|
import io.legado.app.constant.Status |
|
|
|
|
|
|
|
import io.legado.app.help.IntentHelp |
|
|
|
import io.legado.app.help.IntentHelp |
|
|
|
import io.legado.app.utils.getPrefBoolean |
|
|
|
import io.legado.app.utils.getPrefBoolean |
|
|
|
import io.legado.app.utils.getPrefInt |
|
|
|
import io.legado.app.utils.getPrefInt |
|
|
@ -67,9 +66,7 @@ class TTSReadAloudService : BaseReadAloudService(), TextToSpeech.OnInitListener |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
if (requestFocus()) { |
|
|
|
if (requestFocus()) { |
|
|
|
upMediaSessionPlaybackState(PlaybackStateCompat.STATE_PLAYING) |
|
|
|
super.play() |
|
|
|
postEvent(Bus.ALOUD_STATE, Status.PLAY) |
|
|
|
|
|
|
|
upNotification() |
|
|
|
|
|
|
|
for (i in nowSpeak until contentList.size) { |
|
|
|
for (i in nowSpeak until contentList.size) { |
|
|
|
if (i == 0) { |
|
|
|
if (i == 0) { |
|
|
|
speak(contentList[i], TextToSpeech.QUEUE_FLUSH, AppConst.APP_TAG + i) |
|
|
|
speak(contentList[i], TextToSpeech.QUEUE_FLUSH, AppConst.APP_TAG + i) |
|
|
|