diff options
author | Justin Ho <justinho@google.com> | 2012-01-20 14:40:04 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-01-20 14:40:04 -0800 |
commit | 43c9dcc18e4e1137c59b847eadde7ae27302b08f (patch) | |
tree | 69c964e7fc0065633036f087fe5f512ad8daa7ed /src/com/android/settings/tts | |
parent | 999f23e2c304bde3a5c27f7f882d4616f5abdf9e (diff) | |
parent | 2d8101bc8bb27c3c7e090f706ac40a3612507813 (diff) | |
download | packages_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.java | 11 |
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) { |