Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43c9dcc1 authored by Justin Ho's avatar Justin Ho Committed by Android (Google) Code Review
Browse files

Merge "Fix a pseudo race condition in TtsEngineSettingsFragment." into ics-mr1

parents 999f23e2 2d8101bc
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -155,13 +155,22 @@ public class TtsEnginePreference extends Preference {
            }
        });

        if (mVoiceCheckData != null) {
            mSettingsIcon.setEnabled(mRadioButton.isChecked());
        }

        return view;
    }

    public void setVoiceDataDetails(Intent data) {
        mVoiceCheckData = data;
        // 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) {
        if (mPreventRadioButtonCallbacks) {