From 54545f7e655f4dc3d9f75440a440950006fdaffd Mon Sep 17 00:00:00 2001 From: Niels Egberts Date: Wed, 5 Aug 2015 15:41:18 +0100 Subject: 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 --- core/java/android/speech/tts/TextToSpeechService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/java/android/speech/tts/TextToSpeechService.java b/core/java/android/speech/tts/TextToSpeechService.java index fa015b230069..c3aed753efbd 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 onGetFeaturesForLanguage(String lang, String country, String variant) { - return null; + return new HashSet(); } private int getExpectedLanguageAvailableStatus(Locale locale) { -- cgit v1.2.3-59-g8ed1b