diff options
| author | Narayan Kamath <narayan@google.com> | 2011-11-08 02:09:18 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-11-08 02:09:18 -0800 |
| commit | 98f5500c71754dad428e00d569007e0b98dc8aee (patch) | |
| tree | e124fad53db9d4080c1a877eeec982b974716d93 /core/java/android | |
| parent | 39896f52a84947ffc2062a2584033ff749d90534 (diff) | |
| parent | 6c07a2028505e28abd601870f05d4752e92a4b7b (diff) | |
| download | frameworks_base-98f5500c71754dad428e00d569007e0b98dc8aee.zip frameworks_base-98f5500c71754dad428e00d569007e0b98dc8aee.tar.gz frameworks_base-98f5500c71754dad428e00d569007e0b98dc8aee.tar.bz2 | |
Merge "Fix a bug in the network TTS api." into ics-mr1
Diffstat (limited to 'core/java/android')
| -rwxr-xr-x | core/java/android/speech/tts/TextToSpeech.java | 1 | ||||
| -rw-r--r-- | core/java/android/speech/tts/TextToSpeechService.java | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java index 954a6fe..fdc2570 100755 --- a/core/java/android/speech/tts/TextToSpeech.java +++ b/core/java/android/speech/tts/TextToSpeech.java @@ -1089,6 +1089,7 @@ public class TextToSpeech { // Copy feature strings defined by the framework. copyStringParam(bundle, params, Engine.KEY_FEATURE_NETWORK_SYNTHESIS); + copyStringParam(bundle, params, Engine.KEY_FEATURE_EMBEDDED_SYNTHESIS); // Copy over all parameters that start with the name of the // engine that we are currently connected to. The engine is diff --git a/core/java/android/speech/tts/TextToSpeechService.java b/core/java/android/speech/tts/TextToSpeechService.java index 245271d..83b6d4c 100644 --- a/core/java/android/speech/tts/TextToSpeechService.java +++ b/core/java/android/speech/tts/TextToSpeechService.java @@ -792,8 +792,13 @@ public abstract class TextToSpeechService extends Service { public String[] getFeaturesForLanguage(String lang, String country, String variant) { Set<String> features = onGetFeaturesForLanguage(lang, country, variant); - String[] featuresArray = new String[features.size()]; - features.toArray(featuresArray); + String[] featuresArray = null; + if (features != null) { + featuresArray = new String[features.size()]; + features.toArray(featuresArray); + } else { + featuresArray = new String[0]; + } return featuresArray; } |
