mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
check if lang is empty
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user