am 88ec7ebf
: 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".
Merge commit '88ec7ebfe935c0541df3289c31574adbc01bd8bb' * commit '88ec7ebfe935c0541df3289c31574adbc01bd8bb': Fix bug 1943785 where the default country string could be accessed while
This commit is contained in:
committed by
The Android Open Source Project
commit
5070b88af4
@@ -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
|
||||
|
Reference in New Issue
Block a user