mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-14 09:57:31 -04:00
formated code
This commit is contained in:
parent
a18eea8455
commit
34c6a6ced4
@ -154,14 +154,12 @@ class KiwixTextToSpeech internal constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun stop() {
|
fun stop() {
|
||||||
tts.let {
|
if (tts.stop() == SUCCESS) {
|
||||||
if (it.stop() == SUCCESS) {
|
|
||||||
currentTTSTask = null
|
currentTTSTask = null
|
||||||
it.setOnUtteranceProgressListener(null)
|
tts.setOnUtteranceProgressListener(null)
|
||||||
onSpeakingListener.onSpeakingEnded()
|
onSpeakingListener.onSpeakingEnded()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private fun requestAudioFocus(): Boolean {
|
private fun requestAudioFocus(): Boolean {
|
||||||
val audioFocusRequest = am.requestAudioFocus(
|
val audioFocusRequest = am.requestAudioFocus(
|
||||||
@ -230,7 +228,9 @@ class KiwixTextToSpeech internal constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun start() {
|
fun start() {
|
||||||
if (!paused) return
|
if (!paused) {
|
||||||
|
return
|
||||||
|
}
|
||||||
paused = false
|
paused = false
|
||||||
// The utterance ID isn't actually used anywhere, the param is passed only to force
|
// The utterance ID isn't actually used anywhere, the param is passed only to force
|
||||||
// the utterance listener to be notified
|
// the utterance listener to be notified
|
||||||
|
Loading…
x
Reference in New Issue
Block a user