Loading biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/ISession.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ package android.hardware.biometrics.fingerprint; @VintfStability interface ISession { void generateChallenge(in int cookie, in int timeoutSec); void generateChallenge(in int cookie); void revokeChallenge(in int cookie, in long challenge); android.hardware.biometrics.common.ICancellationSignal enroll(in int cookie, in android.hardware.keymaster.HardwareAuthToken hat); android.hardware.biometrics.common.ICancellationSignal authenticate(in int cookie, in long operationId); Loading biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/ISession.aidl +6 −8 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ interface ISession { * to allow addition of biometric enrollments. * To secure this path, the following path is taken: * 1) Upon user requesting fingerprint enroll, the framework requests * IFingerprint#generateChallenge * ISession#generateChallenge * 2) Framework sends the challenge to the credential subsystem, and upon credential * confirmation, a HAT is created, containing the challenge in the "challenge" field. * 3) Framework sends the HAT to the HAL, e.g. ISession#enroll. Loading @@ -69,10 +69,9 @@ interface ISession { * 5) Implementation now has confidence that the user entered their credential to allow * biometric enrollment. * * Note that the interface allows multiple in-flight challenges. For example, invoking * generateChallenge(0, 0, timeoutSec, cb) twice does not invalidate the first challenge. The * challenge is invalidated only when: * 1) The provided timeout expires, or * Note that this interface allows multiple in-flight challenges. Invoking generateChallenge * twice does not invalidate the first challenge. The challenge is invalidated only when: * 1) Its lifespan exceeds the HAL's internal challenge timeout * 2) IFingerprint#revokeChallenge is invoked * * For example, the following is a possible table of valid challenges: Loading @@ -86,9 +85,8 @@ interface ISession { * ---------------------------------------------- * * @param cookie A unique number identifying this operation * @param timeoutSec Duration for which the challenge is valid for */ void generateChallenge(in int cookie, in int timeoutSec); void generateChallenge(in int cookie); /** * revokeChallenge: Loading Loading @@ -117,7 +115,7 @@ interface ISession { * * Before capturing fingerprint data, the implementation must first verify the authenticity and * integrity of the provided HardwareAuthToken. In addition, it must check that the challenge * within the provided HardwareAuthToken is valid. See IFingerprint#generateChallenge. If any of * within the provided HardwareAuthToken is valid. See ISession#generateChallenge. If any of * the above checks fail, the framework must be notified via ISessionCallback#onError and the * HAL must notify the framework when it returns to the idle state. See * Error::UNABLE_TO_PROCESS. Loading biometrics/fingerprint/aidl/default/Session.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -60,13 +60,13 @@ bool Session::isClosed() { return mCurrentState == SessionState::CLOSED; } ndk::ScopedAStatus Session::generateChallenge(int32_t cookie, int32_t timeoutSec) { ndk::ScopedAStatus Session::generateChallenge(int32_t cookie) { LOG(INFO) << "generateChallenge"; scheduleStateOrCrash(SessionState::GENERATING_CHALLENGE); mWorker->schedule(Callable::from([this, cookie, timeoutSec] { mWorker->schedule(Callable::from([this, cookie] { enterStateOrCrash(cookie, SessionState::GENERATING_CHALLENGE); mEngine->generateChallengeImpl(mCb.get(), timeoutSec); mEngine->generateChallengeImpl(mCb.get()); enterIdling(cookie); })); Loading biometrics/fingerprint/aidl/default/include/FakeFingerprintEngine.h +2 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ namespace aidl::android::hardware::biometrics::fingerprint { class FakeFingerprintEngine { public: void generateChallengeImpl(ISessionCallback* cb, int32_t /*timeoutSec*/) { void generateChallengeImpl(ISessionCallback* cb) { LOG(INFO) << "generateChallengeImpl"; cb->onChallengeGenerated(0 /* challenge */); } Loading biometrics/fingerprint/aidl/default/include/Session.h +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ class Session : public BnSession { Session(int sensorId, int userId, std::shared_ptr<ISessionCallback> cb, FakeFingerprintEngine* engine, WorkerThread* worker); ndk::ScopedAStatus generateChallenge(int32_t cookie, int32_t timeoutSec) override; ndk::ScopedAStatus generateChallenge(int32_t cookie) override; ndk::ScopedAStatus revokeChallenge(int32_t cookie, int64_t challenge) override; Loading Loading
biometrics/fingerprint/aidl/aidl_api/android.hardware.biometrics.fingerprint/current/android/hardware/biometrics/fingerprint/ISession.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ package android.hardware.biometrics.fingerprint; @VintfStability interface ISession { void generateChallenge(in int cookie, in int timeoutSec); void generateChallenge(in int cookie); void revokeChallenge(in int cookie, in long challenge); android.hardware.biometrics.common.ICancellationSignal enroll(in int cookie, in android.hardware.keymaster.HardwareAuthToken hat); android.hardware.biometrics.common.ICancellationSignal authenticate(in int cookie, in long operationId); Loading
biometrics/fingerprint/aidl/android/hardware/biometrics/fingerprint/ISession.aidl +6 −8 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ interface ISession { * to allow addition of biometric enrollments. * To secure this path, the following path is taken: * 1) Upon user requesting fingerprint enroll, the framework requests * IFingerprint#generateChallenge * ISession#generateChallenge * 2) Framework sends the challenge to the credential subsystem, and upon credential * confirmation, a HAT is created, containing the challenge in the "challenge" field. * 3) Framework sends the HAT to the HAL, e.g. ISession#enroll. Loading @@ -69,10 +69,9 @@ interface ISession { * 5) Implementation now has confidence that the user entered their credential to allow * biometric enrollment. * * Note that the interface allows multiple in-flight challenges. For example, invoking * generateChallenge(0, 0, timeoutSec, cb) twice does not invalidate the first challenge. The * challenge is invalidated only when: * 1) The provided timeout expires, or * Note that this interface allows multiple in-flight challenges. Invoking generateChallenge * twice does not invalidate the first challenge. The challenge is invalidated only when: * 1) Its lifespan exceeds the HAL's internal challenge timeout * 2) IFingerprint#revokeChallenge is invoked * * For example, the following is a possible table of valid challenges: Loading @@ -86,9 +85,8 @@ interface ISession { * ---------------------------------------------- * * @param cookie A unique number identifying this operation * @param timeoutSec Duration for which the challenge is valid for */ void generateChallenge(in int cookie, in int timeoutSec); void generateChallenge(in int cookie); /** * revokeChallenge: Loading Loading @@ -117,7 +115,7 @@ interface ISession { * * Before capturing fingerprint data, the implementation must first verify the authenticity and * integrity of the provided HardwareAuthToken. In addition, it must check that the challenge * within the provided HardwareAuthToken is valid. See IFingerprint#generateChallenge. If any of * within the provided HardwareAuthToken is valid. See ISession#generateChallenge. If any of * the above checks fail, the framework must be notified via ISessionCallback#onError and the * HAL must notify the framework when it returns to the idle state. See * Error::UNABLE_TO_PROCESS. Loading
biometrics/fingerprint/aidl/default/Session.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -60,13 +60,13 @@ bool Session::isClosed() { return mCurrentState == SessionState::CLOSED; } ndk::ScopedAStatus Session::generateChallenge(int32_t cookie, int32_t timeoutSec) { ndk::ScopedAStatus Session::generateChallenge(int32_t cookie) { LOG(INFO) << "generateChallenge"; scheduleStateOrCrash(SessionState::GENERATING_CHALLENGE); mWorker->schedule(Callable::from([this, cookie, timeoutSec] { mWorker->schedule(Callable::from([this, cookie] { enterStateOrCrash(cookie, SessionState::GENERATING_CHALLENGE); mEngine->generateChallengeImpl(mCb.get(), timeoutSec); mEngine->generateChallengeImpl(mCb.get()); enterIdling(cookie); })); Loading
biometrics/fingerprint/aidl/default/include/FakeFingerprintEngine.h +2 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ namespace aidl::android::hardware::biometrics::fingerprint { class FakeFingerprintEngine { public: void generateChallengeImpl(ISessionCallback* cb, int32_t /*timeoutSec*/) { void generateChallengeImpl(ISessionCallback* cb) { LOG(INFO) << "generateChallengeImpl"; cb->onChallengeGenerated(0 /* challenge */); } Loading
biometrics/fingerprint/aidl/default/include/Session.h +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ class Session : public BnSession { Session(int sensorId, int userId, std::shared_ptr<ISessionCallback> cb, FakeFingerprintEngine* engine, WorkerThread* worker); ndk::ScopedAStatus generateChallenge(int32_t cookie, int32_t timeoutSec) override; ndk::ScopedAStatus generateChallenge(int32_t cookie) override; ndk::ScopedAStatus revokeChallenge(int32_t cookie, int64_t challenge) override; Loading