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

Commit 11679da5 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Update toggle logic

Bug: 111548033

Test: Builds
Change-Id: I591297940b48cffe61ca0279ff835ccacd2a625f
parent 93697136
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -58,9 +58,14 @@ public class FaceEnrollAccessibilityToggle extends LinearLayout {
            a.recycle();
        }
        mSwitch = findViewById(R.id.toggle);
        mSwitch.setChecked(false);
    }

    public boolean isChecked() {
        return mSwitch.isChecked();
    }

    public void setChecked(boolean checked) {
        mSwitch.setChecked(checked);
    }
}
+2 −1
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {
        final LinearLayout accessibilityLayout = findViewById(R.id.accessibility_layout);
        final Button accessibilityButton = findViewById(R.id.accessibility_button);
        accessibilityButton.setOnClickListener(view -> {
            mSwitchDiversity.setChecked(true);
            accessibilityButton.setVisibility(View.INVISIBLE);
            accessibilityLayout.setVisibility(View.VISIBLE);
        });
@@ -177,7 +178,7 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {
        } else {
            intent.setClass(this, FaceEnrollEnrolling.class);
        }
        intent.putExtra(EXTRA_KEY_REQUIRE_DIVERSITY, mSwitchDiversity.isChecked());
        intent.putExtra(EXTRA_KEY_REQUIRE_DIVERSITY, !mSwitchDiversity.isChecked());
        WizardManagerHelper.copyWizardManagerExtras(getIntent(), intent);
        return intent;
    }