diff options
author | Charles Chen <clchen@google.com> | 2010-04-07 17:39:36 -0700 |
---|---|---|
committer | Charles Chen <clchen@google.com> | 2010-04-07 17:58:14 -0700 |
commit | d64ebdacdb42fcae607ce7942e810b6047f2368a (patch) | |
tree | 64db09e3abeba561969283290ed6814e1c20f4f1 /pico/src | |
parent | 094e4875c79a239aa1df445f83dc67fd3e644d3e (diff) | |
download | external_svox-d64ebdacdb42fcae607ce7942e810b6047f2368a.zip external_svox-d64ebdacdb42fcae607ce7942e810b6047f2368a.tar.gz external_svox-d64ebdacdb42fcae607ce7942e810b6047f2368a.tar.bz2 |
Fix for bug 2579445 - fix to use the correct strings for the Intent extras.
Change-Id: I26894c0029690bca05baeaee5198589242026130
Diffstat (limited to 'pico/src')
-rwxr-xr-x | pico/src/com/svox/pico/CheckVoiceData.java | 8 | ||||
-rwxr-xr-x | pico/src/com/svox/pico/EngineSettings.java | 5 |
2 files changed, 6 insertions, 7 deletions
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<String> 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<String> available = data.getStringArrayListExtra("TextToSpeech.Engine.EXTRA_AVAILABLE_VOICES"); - ArrayList<String> unavailable = data.getStringArrayListExtra("TextToSpeech.Engine.EXTRA_UNAVAILABLE_VOICES"); + ArrayList<String> available = data.getStringArrayListExtra(TextToSpeech.Engine.EXTRA_AVAILABLE_VOICES); + ArrayList<String> unavailable = data.getStringArrayListExtra(TextToSpeech.Engine.EXTRA_UNAVAILABLE_VOICES); addPreferencesFromResource(R.xml.voices_list); |