summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2011-11-08 02:09:18 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-11-08 02:09:18 -0800
commit98f5500c71754dad428e00d569007e0b98dc8aee (patch)
treee124fad53db9d4080c1a877eeec982b974716d93 /core/java/android
parent39896f52a84947ffc2062a2584033ff749d90534 (diff)
parent6c07a2028505e28abd601870f05d4752e92a4b7b (diff)
downloadframeworks_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-xcore/java/android/speech/tts/TextToSpeech.java1
-rw-r--r--core/java/android/speech/tts/TextToSpeechService.java9
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;
}