Merge "Cannot switch between multiple TTS engines" into qt-dev

This commit is contained in:
TreeHugger Robot
2019-06-20 04:42:23 +00:00
committed by Android (Google) Code Review
2 changed files with 107 additions and 0 deletions

View File

@@ -30,6 +30,8 @@ import androidx.preference.PreferenceViewHolder;
import com.android.settings.R;
import androidx.annotation.VisibleForTesting;
public class TtsEnginePreference extends Preference {
@@ -45,6 +47,7 @@ public class TtsEnginePreference extends Preference {
* The shared radio button state, which button is checked etc.
*/
private final RadioButtonGroupState mSharedState;
private RadioButton mRadioButton;
/**
* When true, the change callbacks on the radio button will not
@@ -95,6 +98,12 @@ public class TtsEnginePreference extends Preference {
mPreventRadioButtonCallbacks = true;
rb.setChecked(isChecked);
mPreventRadioButtonCallbacks = false;
mRadioButton = rb;
}
@Override
public void onClick() {
mRadioButton.setChecked(true);
}
private boolean shouldDisplayDataAlert() {