Skip to content

Commit

Permalink
fix on check boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
raffysommy committed Jun 7, 2015
1 parent d92d3eb commit 82f9362
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/src/main/java/com/educationet/k12/app/TTSManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import android.util.Log;

public class TTSManager{
private final boolean ttsenable;
private boolean ttsenable;
private TextToSpeech myTTS;
private boolean readyToSpeak = false;
private Context context;
Expand All @@ -20,6 +20,7 @@ public TTSManager(Context baseContext)
SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(baseContext);
ttsenable=SP.getBoolean("tts.enable",false);
this.context = baseContext;
Log.d("TTS","Status:"+ttsenable);
}

public void initOrInstallTTS(){
Expand Down Expand Up @@ -52,9 +53,8 @@ public void destroy(){
Log.d("Activity", "TTS Destroyed");
}
}
public void speak(String text)
{
if (readyToSpeak&&ttsenable) ;
public void speak(String text){
if ((readyToSpeak)&&(ttsenable=true))
myTTS.speak(text, TextToSpeech.QUEUE_FLUSH, null);
}

Expand Down

0 comments on commit 82f9362

Please sign in to comment.