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

Commit 5ac36909 authored by Kevin Chyn's avatar Kevin Chyn Committed by Android (Google) Code Review
Browse files

Merge "Do not allow toggle to be clickable/focusable" into qt-r1-dev

parents 8ca571f9 92d2aae3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -60,6 +60,8 @@ public class FaceEnrollAccessibilityToggle extends LinearLayout {
        }
        mSwitch = findViewById(R.id.toggle);
        mSwitch.setChecked(false);
        mSwitch.setClickable(false);
        mSwitch.setFocusable(false);
    }

    public boolean isChecked() {
+3 −4
Original line number Diff line number Diff line
@@ -159,13 +159,12 @@ public class FaceEnrollEducation extends BiometricEnrollBase {

        mSwitchDiversity = findViewById(R.id.toggle_diversity);
        mSwitchDiversity.setListener(mSwitchDiversityListener);

        if (accessibilityEnabled) {
            accessibilityButton.callOnClick();
            mSwitchDiversity.setClickable(true);
        mSwitchDiversity.setOnClickListener(v -> {
            mSwitchDiversity.getSwitch().toggle();
        });

        if (accessibilityEnabled) {
            accessibilityButton.callOnClick();
        }
    }