summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2009-06-30 15:09:23 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2009-06-30 15:14:30 -0700
commit88ec7ebfe935c0541df3289c31574adbc01bd8bb (patch)
treeaa460dc861ea0d602f3e3f6f72ace042e6a00a39 /src/com/android/settings
parent311356dd71eb33a383fb9a5b470517103ea1f424 (diff)
downloadpackages_apps_settings-88ec7ebfe935c0541df3289c31574adbc01bd8bb.zip
packages_apps_settings-88ec7ebfe935c0541df3289c31574adbc01bd8bb.tar.gz
packages_apps_settings-88ec7ebfe935c0541df3289c31574adbc01bd8bb.tar.bz2
Fix bug 1943785 where the default country string could be accessed while
still being null. This was due to Settings.Secure.getString() returning null when a property isn't found, instead of a string with the value "null".
Diffstat (limited to 'src/com/android/settings')
-rw-r--r--src/com/android/settings/TextToSpeechSettings.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/settings/TextToSpeechSettings.java b/src/com/android/settings/TextToSpeechSettings.java
index 94b256f..ec0fc8c 100644
--- a/src/com/android/settings/TextToSpeechSettings.java
+++ b/src/com/android/settings/TextToSpeechSettings.java
@@ -188,7 +188,7 @@ public class TextToSpeechSettings extends PreferenceActivity implements
if (country == null) {
// country wasn't initialized yet because a default language was found
country = Settings.Secure.getString(resolver, KEY_TTS_DEFAULT_COUNTRY);
- if (country.compareTo("null") != 0) {
+ if (country != null) {
mDefaultCountry = country;
} else {
// default country setting not found, initialize it, as well as the variant;
@@ -201,7 +201,7 @@ public class TextToSpeechSettings extends PreferenceActivity implements
if (variant == null) {
// variant wasn't initialized yet because a default country was found
variant = Settings.Secure.getString(resolver, KEY_TTS_DEFAULT_VARIANT);
- if (variant.compareTo("null") != 0) {
+ if (variant != null) {
mDefaultLocVariant = variant;
} else {
// default variant setting not found, initialize it