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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user