Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26b20b9f authored by Ilya Matyukhin's avatar Ilya Matyukhin
Browse files

Update the default implementation

Bug: 172593978
Test: atest VtsHalBiometricsFaceTargetTest
Change-Id: Ic86c936df8513a6181134053c20fe145cf509f13
parent 666dc38d
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -55,8 +55,9 @@ ndk::ScopedAStatus Session::revokeChallenge(int32_t /*cookie*/, int64_t challeng
}

ndk::ScopedAStatus Session::enroll(
        int32_t /*cookie*/, biometrics::face::EnrollmentType /*enrollmentType*/,
        const keymaster::HardwareAuthToken& /*hat*/, const NativeHandle& /*previewSurface*/,
        int32_t /*cookie*/, const keymaster::HardwareAuthToken& /*hat*/,
        EnrollmentType /*enrollmentType*/, const std::vector<Feature>& /*features*/,
        const NativeHandle& /*previewSurface*/,
        std::shared_ptr<biometrics::common::ICancellationSignal>* /*return_val*/) {
    return ndk::ScopedAStatus::ok();
}
@@ -94,6 +95,17 @@ ndk::ScopedAStatus Session::removeEnrollments(int32_t /*cookie*/,
    return ndk::ScopedAStatus::ok();
}

ndk::ScopedAStatus Session::getFeatures(int32_t /*cookie*/, int32_t /*enrollmentId*/) {
    return ndk::ScopedAStatus::ok();
}

ndk::ScopedAStatus Session::setFeature(int32_t /*cookie*/,
                                       const keymaster::HardwareAuthToken& /*hat*/,
                                       int32_t /*enrollmentId*/, Feature /*feature*/,
                                       bool /*enabled*/) {
    return ndk::ScopedAStatus::ok();
}

ndk::ScopedAStatus Session::getAuthenticatorId(int32_t /*cookie*/) {
    if (cb_) {
        cb_->onStateChanged(0, SessionState::GETTING_AUTHENTICATOR_ID);
+9 −4
Original line number Diff line number Diff line
@@ -34,10 +34,10 @@ class Session : public BnSession {

    ndk::ScopedAStatus revokeChallenge(int32_t cookie, int64_t challenge) override;

    ndk::ScopedAStatus enroll(
            int32_t cookie, biometrics::face::EnrollmentType enrollmentType,
            const keymaster::HardwareAuthToken& hat, const NativeHandle& previewSurface,
            std::shared_ptr<biometrics::common::ICancellationSignal>* return_val) override;
    ndk::ScopedAStatus enroll(int32_t cookie, const keymaster::HardwareAuthToken& hat,
                              EnrollmentType enrollmentType, const std::vector<Feature>& features,
                              const NativeHandle& previewSurface,
                              std::shared_ptr<common::ICancellationSignal>* return_val) override;

    ndk::ScopedAStatus authenticate(
            int32_t cookie, int64_t keystoreOperationId,
@@ -51,6 +51,11 @@ class Session : public BnSession {
    ndk::ScopedAStatus removeEnrollments(int32_t cookie,
                                         const std::vector<int32_t>& enrollmentIds) override;

    ndk::ScopedAStatus getFeatures(int32_t cookie, int32_t enrollmentId) override;

    ndk::ScopedAStatus setFeature(int32_t cookie, const keymaster::HardwareAuthToken& hat,
                                  int32_t enrollmentId, Feature feature, bool enabled) override;

    ndk::ScopedAStatus getAuthenticatorId(int32_t cookie) override;

    ndk::ScopedAStatus invalidateAuthenticatorId(int32_t cookie) override;