Fix bug #18104271 Tapping *name* of service in Voice input services does not fill in radio button

- prevent sending onRadioButtonClicked() if the radio button is already checked
- check the new current radio button

Change-Id: I7e4457bcba6eb1abf51fbe3902bc0f6df0f4bdcf
This commit is contained in:
Fabrice Di Meglio
2014-11-10 16:35:06 -08:00
parent ba53a846b1
commit c66a878813

View File

@@ -110,7 +110,9 @@ public final class VoiceInputPreference extends Preference {
textLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onRadioButtonClicked(rb, !rb.isChecked());
if (!rb.isChecked()) {
onRadioButtonClicked(rb, true);
}
}
});
@@ -216,6 +218,7 @@ public final class VoiceInputPreference extends Preference {
mSharedState.setCurrentKey(getKey());
updateCheckedState(true);
callChangeListener(mSharedState.getCurrentKey());
current.setChecked(true);
}
/**