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

Commit e503481f authored by Ilya Matyukhin's avatar Ilya Matyukhin
Browse files

Remove sensorId and userId from all Session methods

Bug: 168730443
Test: m android.hardware.biometrics.face-update-api
Test: atest VtsHalBiometricsFaceTargetTest
Change-Id: Icc4545f46e5de625127553373128663b9b5c9dbe
parent d4815747
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -18,8 +18,8 @@
package android.hardware.biometrics.face;
@VintfStability
interface ISession {
  void generateChallenge(in int cookie, in int sensorId, in int userId, in int timeoutSec);
  void revokeChallenge(in int cookie, in int sensorId, in int userId, in long challenge);
  void generateChallenge(in int cookie, in int timeoutSec);
  void revokeChallenge(in int cookie, in long challenge);
  android.hardware.biometrics.common.ICancellationSignal enroll(in int cookie, in android.hardware.keymaster.HardwareAuthToken hat, in android.hardware.common.NativeHandle previewSurface);
  android.hardware.biometrics.common.ICancellationSignal authenticate(in int cookie, in long operationId);
  android.hardware.biometrics.common.ICancellationSignal detectInteraction(in int cookie);
+2 −6
Original line number Diff line number Diff line
@@ -68,11 +68,9 @@ interface ISession {
     * ----------------------------------------------
     *
     * @param cookie A unique number identifying this operation
     * @param sensorId Sensor to associate the challenge with
     * @param userId User to associate the challenge with
     * @param timeoutSec Duration for which the challenge is valid for
     */
    void generateChallenge(in int cookie, in int sensorId, in int userId, in int timeoutSec);
    void generateChallenge(in int cookie, in int timeoutSec);

    /**
     * revokeChallenge:
@@ -82,11 +80,9 @@ interface ISession {
     * provided callback.
     *
     * @param cookie A unique number identifying this operation
     * @param sensorId Sensor that the revocation should apply to.
     * @param userId User that the revocation should apply to.
     * @param challenge Challenge that should be revoked.
     */
    void revokeChallenge(in int cookie, in int sensorId, in int userId, in long challenge);
    void revokeChallenge(in int cookie, in long challenge);

    /**
     * enroll:
+2 −4
Original line number Diff line number Diff line
@@ -27,13 +27,11 @@ class CancellationSignal : public common::BnCancellationSignal {

Session::Session(std::shared_ptr<ISessionCallback> cb) : cb_(std::move(cb)) {}

ndk::ScopedAStatus Session::generateChallenge(int32_t /*cookie*/, int32_t /*sensorId*/,
                                              int32_t /*userId*/, int32_t /*timeoutSec*/) {
ndk::ScopedAStatus Session::generateChallenge(int32_t /*cookie*/, int32_t /*timeoutSec*/) {
    return ndk::ScopedAStatus::ok();
}

ndk::ScopedAStatus Session::revokeChallenge(int32_t /*cookie*/, int32_t /*sensorId*/,
                                            int32_t /*userId*/, int64_t /*challenge*/) {
ndk::ScopedAStatus Session::revokeChallenge(int32_t /*cookie*/, int64_t /*challenge*/) {
    return ndk::ScopedAStatus::ok();
}

+2 −4
Original line number Diff line number Diff line
@@ -30,11 +30,9 @@ class Session : public BnSession {
  public:
    explicit Session(std::shared_ptr<ISessionCallback> cb);

    ndk::ScopedAStatus generateChallenge(int32_t cookie, int32_t sensorId, int32_t userId,
                                         int32_t timeoutSec) override;
    ndk::ScopedAStatus generateChallenge(int32_t cookie, int32_t timeoutSec) override;

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

    ndk::ScopedAStatus enroll(
            int32_t cookie, const keymaster::HardwareAuthToken& hat,