Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80c2b9b0 authored by Przemyslaw Szczepaniak's avatar Przemyslaw Szczepaniak
Browse files

Hide "Play TTS sample" when locale is not settable as default

Due to a bug, it's possible for settings to show status telling
that locale is available, despite locale not being in list of
locales settable as TTS default locale. This change fixes it.

Bug: 10630713
Change-Id: I21f8487fc6c1ea7812aeffbc26dfa5fc0a8afa3b
parent dd600b60
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -288,7 +288,7 @@ public class TextToSpeechSettings extends SettingsPreferenceFragment implements

        if (defaultAvailable == TextToSpeech.LANG_NOT_SUPPORTED ||
                defaultAvailable == TextToSpeech.LANG_MISSING_DATA ||
                mAvailableStrLocals != null && notInAvailableLangauges) {
                mAvailableStrLocals == null || notInAvailableLangauges) {
            if (DBG) Log.d(TAG, "Default locale for this TTS engine is not supported.");
            updateEngineStatus(R.string.tts_status_not_supported);
            updateWidgetState(false);