Fixed TTS issues on earlier android versions #411

This commit is contained in:
mhutti1 2017-01-01 14:01:10 +00:00
parent 1bb65fa8b8
commit 5d364d8c5c
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,6 @@
2.2
FIX: Text To Speech issues on earlier Android versions
2.1
FIX: Display of storage devices
FIX: External SD cards detection

View File

@ -78,6 +78,7 @@ public class KiwixTextToSpeech {
currentTTSTask = null;
} else if (tts.isSpeaking()) {
if (tts.stop() == TextToSpeech.SUCCESS) {
tts.setOnUtteranceProgressListener(null);
onSpeakingListener.onSpeakingEnded();
}
} else {
@ -113,6 +114,7 @@ public class KiwixTextToSpeech {
public void stop() {
if (tts.stop() == TextToSpeech.SUCCESS) {
currentTTSTask = null;
tts.setOnUtteranceProgressListener(null);
onSpeakingListener.onSpeakingEnded();
}
}
@ -186,6 +188,7 @@ public class KiwixTextToSpeech {
public void pause() {
paused = true;
currentPiece.decrementAndGet();
tts.setOnUtteranceProgressListener(null);
tts.stop();
}