feat: 优化

pull/209/head
kunfei 5 years ago
parent a3ddf6a435
commit dd53f0a260
  1. 4
      app/src/main/java/io/legado/app/service/TTSReadAloudService.kt

@ -21,6 +21,7 @@ class TTSReadAloudService : BaseReadAloudService(), TextToSpeech.OnInitListener
companion object {
private var textToSpeech: TextToSpeech? = null
private var ttsInitFinish = false
fun clearTTS() {
textToSpeech?.let {
@ -28,11 +29,10 @@ class TTSReadAloudService : BaseReadAloudService(), TextToSpeech.OnInitListener
it.shutdown()
}
textToSpeech = null
ttsInitFinish = false
}
}
private var ttsInitFinish = false
override fun onCreate() {
super.onCreate()
textToSpeech = TextToSpeech(this, this)

Loading…
Cancel
Save