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

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

Merge "Update toggle logic"

parents 63820288 11679da5
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;
    }