Rewire BiometricEnrollActivity to setup pages

When running in setup flow:
- If fingerprint enrollment is desired, go to
  SetupFingerprintEnrollIntroduction
- Makes sure WizardManagerHelper.copyWizardManagerExtras is called
  to propagate the extras from the incoming intent, propagating
  extras like whether we are in initial / deferred setup flow, theme,
  etc.
- Forward the result code in BiometricEnrollActivity using
  FLAG_ACTIVITY_FORWARD_RESULT

Bug: 120797018
Test: Manual
Change-Id: Ibc0ecc035141d62339f5f664346ed108570e0905
This commit is contained in:
pastychang
2019-03-07 11:27:31 +08:00
committed by Maurice Lam
parent f574d22f23
commit 046a97edde
3 changed files with 36 additions and 7 deletions

View File

@@ -27,8 +27,10 @@ import android.widget.TextView;
import com.android.settings.R;
import com.android.settings.password.ChooseLockGeneric;
import com.android.settings.password.ChooseLockSettingsHelper;
import com.android.settings.password.SetupChooseLockGeneric;
import com.google.android.setupcompat.template.FooterButton;
import com.google.android.setupcompat.util.WizardManagerHelper;
import com.google.android.setupdesign.span.LinkSpan;
/**
@@ -199,7 +201,13 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
}
protected Intent getChooseLockIntent() {
return new Intent(this, ChooseLockGeneric.class);
if (WizardManagerHelper.isAnySetupWizard(getIntent())) {
Intent intent = new Intent(this, SetupChooseLockGeneric.class);
WizardManagerHelper.copyWizardManagerExtras(getIntent(), intent);
return intent;
} else {
return new Intent(this, ChooseLockGeneric.class);
}
}
@Override