Merge "Update multi biometric flow for SUW" into sc-dev am: 19baf0df84
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14972625 Change-Id: I4e54f9189a9e47dc043ded6fbae1ce1e0656d9a3
This commit is contained in:
@@ -258,21 +258,6 @@ public class BiometricEnrollActivity extends InstrumentedActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setupForMultiBiometricEnroll() {
|
private void setupForMultiBiometricEnroll() {
|
||||||
final FingerprintManager fingerprintManager = getSystemService(FingerprintManager.class);
|
|
||||||
final FaceManager faceManager = getSystemService(FaceManager.class);
|
|
||||||
final List<FingerprintSensorPropertiesInternal> fpProperties =
|
|
||||||
fingerprintManager.getSensorPropertiesInternal();
|
|
||||||
final List<FaceSensorPropertiesInternal> faceProperties =
|
|
||||||
faceManager.getSensorPropertiesInternal();
|
|
||||||
|
|
||||||
// This would need to be updated for devices with multiple sensors of the same modality
|
|
||||||
mIsFaceEnrollable = !faceProperties.isEmpty() &&
|
|
||||||
faceManager.getEnrolledFaces(mUserId).size()
|
|
||||||
< faceProperties.get(0).maxEnrollmentsPerUser;
|
|
||||||
mIsFingerprintEnrollable = !fpProperties.isEmpty() &&
|
|
||||||
fingerprintManager.getEnrolledFingerprints(mUserId).size()
|
|
||||||
< fpProperties.get(0).maxEnrollmentsPerUser;
|
|
||||||
|
|
||||||
if (!mConfirmingCredentials) {
|
if (!mConfirmingCredentials) {
|
||||||
mConfirmingCredentials = true;
|
mConfirmingCredentials = true;
|
||||||
if (!userHasPassword(mUserId)) {
|
if (!userHasPassword(mUserId)) {
|
||||||
@@ -284,7 +269,33 @@ public class BiometricEnrollActivity extends InstrumentedActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void startMultiBiometricEnroll(Intent data) {
|
private void startMultiBiometricEnroll(Intent data) {
|
||||||
|
final boolean isSetupWizard = WizardManagerHelper.isAnySetupWizard(getIntent());
|
||||||
|
final FingerprintManager fingerprintManager = getSystemService(FingerprintManager.class);
|
||||||
|
final FaceManager faceManager = getSystemService(FaceManager.class);
|
||||||
|
final List<FingerprintSensorPropertiesInternal> fpProperties =
|
||||||
|
fingerprintManager.getSensorPropertiesInternal();
|
||||||
|
final List<FaceSensorPropertiesInternal> faceProperties =
|
||||||
|
faceManager.getSensorPropertiesInternal();
|
||||||
|
|
||||||
mGkPwHandle = BiometricUtils.getGatekeeperPasswordHandle(data);
|
mGkPwHandle = BiometricUtils.getGatekeeperPasswordHandle(data);
|
||||||
|
|
||||||
|
if (isSetupWizard) {
|
||||||
|
// This would need to be updated for devices with multiple sensors of the same modality
|
||||||
|
mIsFaceEnrollable = !faceProperties.isEmpty()
|
||||||
|
&& faceManager.getEnrolledFaces(mUserId).size() == 0;
|
||||||
|
mIsFingerprintEnrollable = !fpProperties.isEmpty()
|
||||||
|
&& fingerprintManager.getEnrolledFingerprints(mUserId).size() == 0;
|
||||||
|
} else {
|
||||||
|
// This would need to be updated for devices with multiple sensors of the same modality
|
||||||
|
mIsFaceEnrollable = !faceProperties.isEmpty()
|
||||||
|
&& faceManager.getEnrolledFaces(mUserId).size()
|
||||||
|
< faceProperties.get(0).maxEnrollmentsPerUser;
|
||||||
|
mIsFingerprintEnrollable = !fpProperties.isEmpty()
|
||||||
|
&& fingerprintManager.getEnrolledFingerprints(mUserId).size()
|
||||||
|
< fpProperties.get(0).maxEnrollmentsPerUser;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
mMultiBiometricEnrollHelper = new MultiBiometricEnrollHelper(this, mUserId,
|
mMultiBiometricEnrollHelper = new MultiBiometricEnrollHelper(this, mUserId,
|
||||||
mIsFaceEnrollable, mIsFingerprintEnrollable, mGkPwHandle);
|
mIsFaceEnrollable, mIsFingerprintEnrollable, mGkPwHandle);
|
||||||
mMultiBiometricEnrollHelper.startNextStep();
|
mMultiBiometricEnrollHelper.startNextStep();
|
||||||
|
Reference in New Issue
Block a user