Call finish() when enrollment loses focus
Bug: 134971919 Test: Entering keyguard on any enrollment screen finishes enrollment now Test: Going back/forward works Change-Id: I2c80a5586c10fa3feb780a5eadfe203abed52dea
This commit is contained in:
@@ -61,6 +61,7 @@ public class FaceEnrollEducation extends BiometricEnrollBase {
|
||||
private Handler mHandler;
|
||||
private Intent mResultIntent;
|
||||
private TextView mDescriptionText;
|
||||
private boolean mNextClicked;
|
||||
|
||||
private CompoundButton.OnCheckedChangeListener mSwitchDiversityListener =
|
||||
new CompoundButton.OnCheckedChangeListener() {
|
||||
@@ -184,6 +185,17 @@ public class FaceEnrollEducation extends BiometricEnrollBase {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
|
||||
if (!isChangingConfigurations() && !WizardManagerHelper.isAnySetupWizard(getIntent())
|
||||
&& !mNextClicked) {
|
||||
setResult(RESULT_SKIP);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNextButtonClick(View view) {
|
||||
final Intent intent = new Intent();
|
||||
@@ -193,6 +205,7 @@ public class FaceEnrollEducation extends BiometricEnrollBase {
|
||||
if (mUserId != UserHandle.USER_NULL) {
|
||||
intent.putExtra(Intent.EXTRA_USER_ID, mUserId);
|
||||
}
|
||||
intent.putExtra(EXTRA_FROM_SETTINGS_SUMMARY, mFromSettingsSummary);
|
||||
final String flattenedString = getString(R.string.config_face_enroll);
|
||||
if (!TextUtils.isEmpty(flattenedString)) {
|
||||
ComponentName componentName = ComponentName.unflattenFromString(flattenedString);
|
||||
@@ -204,6 +217,7 @@ public class FaceEnrollEducation extends BiometricEnrollBase {
|
||||
if (mResultIntent != null) {
|
||||
intent.putExtras(mResultIntent);
|
||||
}
|
||||
mNextClicked = true;
|
||||
WizardManagerHelper.copyWizardManagerExtras(getIntent(), intent);
|
||||
startActivityForResult(intent, BIOMETRIC_FIND_SENSOR_REQUEST);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user