Fix NPE in TextToSpeech with setLanguage(null)

getLanguage() can return null, and pass it to setLanguage()
  in TextToSpeech.initTts()

Change-Id: I8046e94959404bd63b0a90bcc2dbf4018f77c110
This commit is contained in:
Jean-Michel Trivi
2010-07-26 16:11:58 -07:00
parent 00de721859
commit 4a60d61887

View File

@@ -1065,6 +1065,9 @@ public class TextToSpeech {
if (!mStarted) {
return result;
}
if (loc == null) {
return result;
}
try {
String language = loc.getISO3Language();
String country = loc.getISO3Country();