mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 09:49:21 +02:00
check if lang is empty
This commit is contained in:
parent
f8d0fd3f77
commit
cfdfab1716
1 changed files with 1 additions and 1 deletions
|
@ -630,7 +630,7 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE
|
|||
|
||||
@JavascriptInterface
|
||||
public void ttsSpeak(String text, String lang) {
|
||||
tts.setLanguage(Locale.forLanguageTag(lang));
|
||||
if (lang != null && !lang.isEmpty()) tts.setLanguage(Locale.forLanguageTag(lang));
|
||||
tts.speak(text, TextToSpeech.QUEUE_FLUSH, null, null);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue