summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/tts
diff options
context:
space:
mode:
authorJustin Ho <justinho@google.com>2012-01-20 14:40:04 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-01-20 14:40:04 -0800
commit43c9dcc18e4e1137c59b847eadde7ae27302b08f (patch)
tree69c964e7fc0065633036f087fe5f512ad8daa7ed /src/com/android/settings/tts
parent999f23e2c304bde3a5c27f7f882d4616f5abdf9e (diff)
parent2d8101bc8bb27c3c7e090f706ac40a3612507813 (diff)
downloadpackages_apps_Settings-43c9dcc18e4e1137c59b847eadde7ae27302b08f.zip
packages_apps_Settings-43c9dcc18e4e1137c59b847eadde7ae27302b08f.tar.gz
packages_apps_Settings-43c9dcc18e4e1137c59b847eadde7ae27302b08f.tar.bz2
Merge "Fix a pseudo race condition in TtsEngineSettingsFragment." into ics-mr1
Diffstat (limited to 'src/com/android/settings/tts')
-rw-r--r--src/com/android/settings/tts/TtsEnginePreference.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/settings/tts/TtsEnginePreference.java b/src/com/android/settings/tts/TtsEnginePreference.java
index b98a239..196882f 100644
--- a/src/com/android/settings/tts/TtsEnginePreference.java
+++ b/src/com/android/settings/tts/TtsEnginePreference.java
@@ -155,12 +155,21 @@ public class TtsEnginePreference extends Preference {
}
});
+ if (mVoiceCheckData != null) {
+ mSettingsIcon.setEnabled(mRadioButton.isChecked());
+ }
+
return view;
}
public void setVoiceDataDetails(Intent data) {
mVoiceCheckData = data;
- mSettingsIcon.setEnabled(mRadioButton.isChecked());
+ // This might end up running before getView aboive, in which
+ // case mSettingsIcon && mRadioButton will be null. In this case
+ // getView will set the right values.
+ if (mSettingsIcon != null && mRadioButton != null) {
+ mSettingsIcon.setEnabled(mRadioButton.isChecked());
+ }
}
private void onRadioButtonClicked(CompoundButton buttonView, boolean isChecked) {