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

Commit 8214d201 authored by Narayan Kamath's avatar Narayan Kamath Committed by Android (Google) Code Review
Browse files

Merge "Fix two bug in the TTS settings." into ics-mr1

parents 9c4f31c1 fdd94d87
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -717,7 +717,7 @@
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.TextToSpeechSettings" />
                android:value="com.android.settings.tts.TextToSpeechSettings" />
            <meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
                android:resource="@id/language_settings" />
        </activity>
+5 −2
Original line number Diff line number Diff line
@@ -95,12 +95,15 @@ public class TtsEngineSettingsFragment extends SettingsPreferenceFragment implem
        ArrayList<String> unavailable = voiceDataDetails.getStringArrayListExtra(
                TextToSpeech.Engine.EXTRA_UNAVAILABLE_VOICES);

        if (available == null || unavailable == null){
        if (available == null){
            Log.e(TAG, "TTS data check failed (available == null).");
            final CharSequence[] empty = new CharSequence[0];
            mLocalePreference.setEntries(empty);
            mLocalePreference.setEntryValues(empty);
            return;
        }

        if (unavailable.size() > 0) {
        if (unavailable != null && unavailable.size() > 0) {
            mInstallVoicesPreference.setEnabled(true);
            getPreferenceScreen().addPreference(mInstallVoicesPreference);
        } else {