summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeve <deveee@gmail.com>2021-04-21 11:33:59 +0200
committerMichael W <baddaemon87@gmail.com>2021-09-07 21:51:13 +0200
commit5d4222ae0575a5393077f45a6f898bc76124fbdf (patch)
tree802433a254d206d6f109307b2974007003839948
parent422769ab9aaeea94693c2c8e394be47979bdaf18 (diff)
Fixed a crash in settings in tts engine selection screen.
The crash happens when you try to uninstall current tts engine and install a different one and then engine name may be null. If engine name is null then you can't select new engine because of that crash, so that whole tts feature becomes unusable. Change-Id: Ie31a947eb6444242e8536db2dae1452ef74cc1ce
-rw-r--r--core/java/android/speech/tts/TtsEngines.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/speech/tts/TtsEngines.java b/core/java/android/speech/tts/TtsEngines.java
index a8aea7c1eb59..3697b9494949 100644
--- a/core/java/android/speech/tts/TtsEngines.java
+++ b/core/java/android/speech/tts/TtsEngines.java
@@ -498,7 +498,7 @@ public class TtsEngines {
* specific preference in the list.
*/
private static String parseEnginePrefFromList(String prefValue, String engineName) {
- if (TextUtils.isEmpty(prefValue)) {
+ if (TextUtils.isEmpty(prefValue) || TextUtils.isEmpty(engineName)) {
return null;
}