Revert "Refactor BiometricEnrollBase::onStop()"

This reverts commit 6b6d8c0d6d.

Reason for revert: Should use shouldFinishWhenBackgrounded() to
control the behavior during onStop()

Bug: 197717071
Change-Id: I6aeacd5fb0d4400911a2e3d1567db660a0f1798a
This commit is contained in:
Milton Wu
2022-08-04 09:27:41 +00:00
parent ab8624c6ef
commit da7f6fca7a
8 changed files with 12 additions and 63 deletions

View File

@@ -181,6 +181,16 @@ public abstract class BiometricEnrollBase extends InstrumentedActivity {
getWindow().setStatusBarColor(getBackgroundColor());
}
@Override
protected void onStop() {
super.onStop();
if (!isChangingConfigurations() && shouldFinishWhenBackgrounded()
&& !BiometricUtils.isAnyMultiBiometricFlow(this)) {
setResult(RESULT_TIMEOUT);
finish();
}
}
protected boolean shouldFinishWhenBackgrounded() {
return !WizardManagerHelper.isAnySetupWizard(getIntent());
}