feat: 优化

pull/209/head
kunfei 5 years ago
parent 0dcc7ca840
commit bc4422a3ae
  1. 5
      app/src/main/java/io/legado/app/service/TTSReadAloudService.kt

@ -69,10 +69,7 @@ class TTSReadAloudService : BaseReadAloudService(), TextToSpeech.OnInitListener
@Synchronized @Synchronized
override fun play() { override fun play() {
if (contentList.isEmpty() || !ttsInitFinish) { if (contentList.isNotEmpty() && ttsInitFinish && requestFocus()) {
return
}
if (requestFocus()) {
MediaHelp.playSilentSound(this) MediaHelp.playSilentSound(this)
super.play() super.play()
textToSpeech?.stop() textToSpeech?.stop()

Loading…
Cancel
Save