private IllustrationVideoView mIllustrationNormal;
private View mIllustrationAccessibility;
private Handler mHandler;
+ private Intent mResultIntent;
private CompoundButton.OnCheckedChangeListener mSwitchDiversityListener =
new CompoundButton.OnCheckedChangeListener() {
mHandler = new Handler();
mFaceManager = Utils.getFaceManagerOrNull(this);
- final Button accessibilityButton = findViewById(R.id.accessibility_button);
- accessibilityButton.setOnClickListener(view -> {
- mSwitchDiversity.setChecked(true);
- accessibilityButton.setVisibility(View.GONE);
- mSwitchDiversity.setVisibility(View.VISIBLE);
- });
-
- mSwitchDiversity = findViewById(R.id.toggle_diversity);
- mSwitchDiversity.setListener(mSwitchDiversityListener);
mIllustrationNormal = findViewById(R.id.illustration_normal);
mIllustrationAccessibility = findViewById(R.id.illustration_accessibility);
footerButton.setEnabled(true);
}, FACE_ENROLL_EDUCATION_DELAY);
}
+
+ final Button accessibilityButton = findViewById(R.id.accessibility_button);
+ accessibilityButton.setOnClickListener(view -> {
+ footerButton.setEnabled(true);
+ mSwitchDiversity.setChecked(true);
+ accessibilityButton.setVisibility(View.GONE);
+ mSwitchDiversity.setVisibility(View.VISIBLE);
+ });
+
+ mSwitchDiversity = findViewById(R.id.toggle_diversity);
+ mSwitchDiversity.setListener(mSwitchDiversityListener);
}
@Override
intent.setClass(this, FaceEnrollEnrolling.class);
}
intent.putExtra(EXTRA_KEY_REQUIRE_DIVERSITY, !mSwitchDiversity.isChecked());
+ if (mResultIntent != null) {
+ intent.putExtras(mResultIntent);
+ }
WizardManagerHelper.copyWizardManagerExtras(getIntent(), intent);
startActivityForResult(intent, BIOMETRIC_FIND_SENSOR_REQUEST);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ mResultIntent = data;
if (requestCode == BIOMETRIC_FIND_SENSOR_REQUEST) {
- setResult(resultCode);
- finish();
+ // If the user finished or skipped enrollment, finish this activity
+ if (resultCode == RESULT_SKIP || resultCode == RESULT_FINISHED) {
+ setResult(resultCode);
+ finish();
+ }
}
}