diff options
author | Niels Egberts <nielse@google.com> | 2015-08-05 15:41:18 +0100 |
---|---|---|
committer | Niels Egberts <nielse@google.com> | 2015-08-05 15:48:26 +0100 |
commit | 54545f7e655f4dc3d9f75440a440950006fdaffd (patch) | |
tree | 6854f3c32c2566083c83661611903c91c96c56b6 /core/java/android/speech | |
parent | dbc4edccfced5cb739bae75e8cd15cecc39cf16e (diff) | |
download | frameworks_base-54545f7e655f4dc3d9f75440a440950006fdaffd.zip frameworks_base-54545f7e655f4dc3d9f75440a440950006fdaffd.tar.gz frameworks_base-54545f7e655f4dc3d9f75440a440950006fdaffd.tar.bz2 |
NPE occured when trying to parcel voice features.
The default features member should be an empty list instead of null.
Bug: 22404239
Change-Id: Ia39982f17fd3b3cd0f3556435170aed2fac14fb8
Diffstat (limited to 'core/java/android/speech')
-rw-r--r-- | core/java/android/speech/tts/TextToSpeechService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/speech/tts/TextToSpeechService.java b/core/java/android/speech/tts/TextToSpeechService.java index fa015b2..c3aed75 100644 --- a/core/java/android/speech/tts/TextToSpeechService.java +++ b/core/java/android/speech/tts/TextToSpeechService.java @@ -40,6 +40,7 @@ import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Locale; import java.util.MissingResourceException; @@ -247,7 +248,7 @@ public abstract class TextToSpeechService extends Service { * @return A list of features supported for the given language. */ protected Set<String> onGetFeaturesForLanguage(String lang, String country, String variant) { - return null; + return new HashSet<String>(); } private int getExpectedLanguageAvailableStatus(Locale locale) { |