Android Q 指纹录入流程
// Enroll finger Schedule:
// package/apps/Settings
// FingerprintEnrollIntroduction extends BiometricEnrollIntroduction
onNextButtonClick( # launchNextEnrollingActivity(mToken);
// FingerprintEnrollFindSensor#
startLookingForFingerprint()
// FingerprintEnrollEnrolling extens BiometricsEnrollEnrolling
startEnrollment() # mSidecar.setListener(this);
// BiometricEnrollSidecar#onStart()
startEnrollment()
// FingerprintEnrollSidecar
startEnrollment()
// FingerprintManager
mFingerprintManager.enroll(mToken, mEnrollmentCancel,0 /* flags */, mUserId, mEnrollmentCallback);
// FingerprintService
enroll(final IBinder token, final byte[] cryptoToken, final int userId,
enrollInternal(
startClient(client, true /* initiatedByClient */);
startCurrentClient(mCurrentClient.getCookie());
mCurrentClient.start();
// EnrollClient
final int result = getDaemonWrapper().enroll(mCryptoToken, getGroupId(), timeout,disabledFeatures);
// FingerprintService
IBiometricsFingerprint daemon = getFingerprintDaemon();
public void onEnrollResult(final long deviceId, final int fingerId, final int groupId,
FingerprintService.super.handleEnrollResult(fingerprint, remaining);
client.onEnrollResult(identifier, remaining)
// EnrollClient
mBiometricUtils.addBiometricForUser(getContext(), getTargetUserId(), identifier);
// FingerprintUtils
getStateForUser(context, userId).addBiometric(identifier);
// FingerprintUserState
super.addBiometric(identifier);
// BiometricUserState
scheduleWriteStateLocked()
// FingerprintUserState
doWriteState()
destination.finishWrite(out);
File(Environment.getUserSystemDirectory(userId), getBiometricFile());