소스 검색

修复重复进入无法朗读入账信息

zengjiebin 7 년 전
부모
커밋
dfaa159712
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      app/src/main/java/com/sheep/gamegroup/util/TextToSpeechUtil.java

+ 2 - 2
app/src/main/java/com/sheep/gamegroup/util/TextToSpeechUtil.java

@@ -3,7 +3,6 @@ package com.sheep.gamegroup.util;
 import android.speech.tts.TextToSpeech;
 import android.text.TextUtils;
 
-import com.bumptech.glide.Glide;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
 
@@ -24,7 +23,7 @@ public class TextToSpeechUtil {
      */
     public static TextToSpeechUtil get() {
         if (instance == null) {
-            synchronized (Glide.class) {
+            synchronized (TextToSpeechUtil.class) {
                 if (instance == null) {
                     instance = new TextToSpeechUtil();
                 }
@@ -168,6 +167,7 @@ public class TextToSpeechUtil {
     public static void stopTTS(){
         if(instance != null){
             instance.stopAndShutdownTTS();
+            instance = null;
         }
     }
 }