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

Commit c66a8788 authored by Fabrice Di Meglio's avatar Fabrice Di Meglio
Browse files

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
parent ba53a846
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -110,7 +110,9 @@ public final class VoiceInputPreference extends Preference {
        textLayout.setOnClickListener(new View.OnClickListener() {
        textLayout.setOnClickListener(new View.OnClickListener() {
            @Override
            @Override
            public void onClick(View v) {
            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());
        mSharedState.setCurrentKey(getKey());
        updateCheckedState(true);
        updateCheckedState(true);
        callChangeListener(mSharedState.getCurrentKey());
        callChangeListener(mSharedState.getCurrentKey());
        current.setChecked(true);
    }
    }


    /**
    /**