From d64ebdacdb42fcae607ce7942e810b6047f2368a Mon Sep 17 00:00:00 2001 From: Charles Chen Date: Wed, 7 Apr 2010 17:39:36 -0700 Subject: Fix for bug 2579445 - fix to use the correct strings for the Intent extras. Change-Id: I26894c0029690bca05baeaee5198589242026130 --- pico/src/com/svox/pico/CheckVoiceData.java | 8 +++----- pico/src/com/svox/pico/EngineSettings.java | 5 +++-- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'pico/src/com') diff --git a/pico/src/com/svox/pico/CheckVoiceData.java b/pico/src/com/svox/pico/CheckVoiceData.java index abd85ab..054fca9 100755 --- a/pico/src/com/svox/pico/CheckVoiceData.java +++ b/pico/src/com/svox/pico/CheckVoiceData.java @@ -68,9 +68,8 @@ public class CheckVoiceData extends Activity { Bundle bundle = getIntent().getExtras(); if (bundle != null){ - // TODO (clchen): Add this intent to TextToSpeech.Engine ArrayList langCountryVars = bundle.getStringArrayList( - "TextToSpeech.Engine.EXTRA_CHECK_VOICE_DATA_FOR"); + TextToSpeech.Engine.EXTRA_CHECK_VOICE_DATA_FOR); if (langCountryVars != null){ for (int i = 0; i < langCountryVars.size(); i++){ if (langCountryVars.get(i).length() > 0){ @@ -105,9 +104,8 @@ public class CheckVoiceData extends Activity { returnData.putExtra(TextToSpeech.Engine.EXTRA_VOICE_DATA_FILES, dataFiles); returnData.putExtra(TextToSpeech.Engine.EXTRA_VOICE_DATA_FILES_INFO, dataFilesInfo); - // TODO (clchen): Add these intents to TextToSpeech.Engine - returnData.putStringArrayListExtra("TextToSpeech.Engine.EXTRA_AVAILABLE_VOICES", available); - returnData.putStringArrayListExtra("TextToSpeech.Engine.EXTRA_UNAVAILABLE_VOICES", unavailable); + returnData.putStringArrayListExtra(TextToSpeech.Engine.EXTRA_AVAILABLE_VOICES, available); + returnData.putStringArrayListExtra(TextToSpeech.Engine.EXTRA_UNAVAILABLE_VOICES, unavailable); setResult(result, returnData); finish(); } diff --git a/pico/src/com/svox/pico/EngineSettings.java b/pico/src/com/svox/pico/EngineSettings.java index dee798a..d7aa82e 100755 --- a/pico/src/com/svox/pico/EngineSettings.java +++ b/pico/src/com/svox/pico/EngineSettings.java @@ -22,6 +22,7 @@ import android.os.Bundle; import android.preference.Preference; import android.preference.PreferenceActivity; import android.preference.Preference.OnPreferenceClickListener; +import android.speech.tts.TextToSpeech; import android.util.Log; import java.util.ArrayList; @@ -47,8 +48,8 @@ public class EngineSettings extends PreferenceActivity { @Override public void onActivityResult(int requestCode, int resultCode, Intent data){ if (requestCode == VOICE_DATA_CHECK_CODE){ - ArrayList available = data.getStringArrayListExtra("TextToSpeech.Engine.EXTRA_AVAILABLE_VOICES"); - ArrayList unavailable = data.getStringArrayListExtra("TextToSpeech.Engine.EXTRA_UNAVAILABLE_VOICES"); + ArrayList available = data.getStringArrayListExtra(TextToSpeech.Engine.EXTRA_AVAILABLE_VOICES); + ArrayList unavailable = data.getStringArrayListExtra(TextToSpeech.Engine.EXTRA_UNAVAILABLE_VOICES); addPreferencesFromResource(R.xml.voices_list); -- cgit v1.1