From dd53f0a260d25e67ccb1b5b8cc009347fd88c103 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 27 Apr 2020 20:47:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/service/TTSReadAloudService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt b/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt index 8d8c5f39f..5cdf939f3 100644 --- a/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt +++ b/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)