Add ability to finish() ConfirmDeviceCredential if it loses foreground am: e27a304b97 am: 7baab69bdc

am: bdebaf4396

Change-Id: I34626608c014668887e33da40b80585aa5e66d7c
This commit is contained in:
Kevin Chyn
2019-07-26 18:46:38 -07:00
committed by android-build-merger
5 changed files with 47 additions and 23 deletions

View File

@@ -172,11 +172,11 @@ public abstract class BiometricEnrollBase extends InstrumentedActivity {
if (mUserId == UserHandle.USER_NULL) {
launchedConfirmationActivity = helper.launchConfirmationActivity(CONFIRM_REQUEST,
getString(titleResId),
null, null, challenge);
null, null, challenge, true /* foregroundOnly */);
} else {
launchedConfirmationActivity = helper.launchConfirmationActivity(CONFIRM_REQUEST,
getString(titleResId),
null, null, challenge, mUserId);
null, null, challenge, mUserId, true /* foregroundOnly */);
}
if (!launchedConfirmationActivity) {
// This shouldn't happen, as we should only end up at this step if a lock thingy is

View File

@@ -179,7 +179,7 @@ public class FaceSettings extends DashboardFragment {
mConfirmingPassword = true;
if (!helper.launchConfirmationActivity(CONFIRM_REQUEST,
getString(R.string.security_settings_face_preference_title),
null, null, challenge, mUserId)) {
null, null, challenge, mUserId, true /* foregroundOnly */)) {
Log.e(TAG, "Password not set");
finish();
}

View File

@@ -617,7 +617,7 @@ public class FingerprintSettings extends SubSettings {
ChooseLockSettingsHelper helper = new ChooseLockSettingsHelper(getActivity(), this);
if (!helper.launchConfirmationActivity(CONFIRM_REQUEST,
getString(R.string.security_settings_fingerprint_preference_title),
null, null, challenge, mUserId)) {
null, null, challenge, mUserId, true /* foregroundOnly */)) {
intent.setClassName(SETTINGS_PACKAGE_NAME, ChooseLockGeneric.class.getName());
intent.putExtra(ChooseLockGeneric.ChooseLockGenericFragment.MINIMUM_QUALITY_KEY,
DevicePolicyManager.PASSWORD_QUALITY_SOMETHING);