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

Commit 103c8034 authored by Ilya Matyukhin's avatar Ilya Matyukhin Committed by Android (Google) Code Review
Browse files

Merge "Remove sensorId and userId from all Session methods"

parents cec3aa41 e503481f
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,