Move [generate|revoke]Challenge under ISession.aidl

Bug: 171002801
Test: m android.hardware.biometrics.fingerprint-update-api
Test: atest VtsHalBiometricsFingerprintTargetTest
Change-Id: I2aa266b7b81003b7fd0ab0328833e5500de99908
diff --git a/biometrics/fingerprint/aidl/default/Fingerprint.cpp b/biometrics/fingerprint/aidl/default/Fingerprint.cpp
index b907bf1..18ce0c8 100644
--- a/biometrics/fingerprint/aidl/default/Fingerprint.cpp
+++ b/biometrics/fingerprint/aidl/default/Fingerprint.cpp
@@ -60,17 +60,4 @@
     *return_val = SharedRefBase::make<Session>(cb);
     return ndk::ScopedAStatus::ok();
 }
-
-ndk::ScopedAStatus Fingerprint::generateChallenge(
-        int32_t /*sensorId*/, int32_t /*userId*/, int32_t /*timeoutSec*/,
-        const std::shared_ptr<IGenerateChallengeCallback>& /*cb*/) {
-    return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus Fingerprint::revokeChallenge(
-        int32_t /*sensorId*/, int32_t /*userId*/, int64_t /*challenge*/,
-        const std::shared_ptr<IRevokeChallengeCallback>& /*cb*/) {
-    return ndk::ScopedAStatus::ok();
-}
-
 }  // namespace aidl::android::hardware::biometrics::fingerprint
diff --git a/biometrics/fingerprint/aidl/default/Fingerprint.h b/biometrics/fingerprint/aidl/default/Fingerprint.h
index 59cdd44..4e952ba 100644
--- a/biometrics/fingerprint/aidl/default/Fingerprint.h
+++ b/biometrics/fingerprint/aidl/default/Fingerprint.h
@@ -27,14 +27,6 @@
     ndk::ScopedAStatus createSession(int32_t sensorId, int32_t userId,
                                      const std::shared_ptr<ISessionCallback>& cb,
                                      std::shared_ptr<ISession>* _aidl_return) override;
-
-    ndk::ScopedAStatus generateChallenge(
-            int32_t sensorId, int32_t userId, int32_t timeoutSec,
-            const std::shared_ptr<IGenerateChallengeCallback>& cb) override;
-
-    ndk::ScopedAStatus revokeChallenge(
-            int32_t sensorId, int32_t userId, int64_t challenge,
-            const std::shared_ptr<IRevokeChallengeCallback>& cb) override;
 };
 
 }  // namespace aidl::android::hardware::biometrics::fingerprint
diff --git a/biometrics/fingerprint/aidl/default/Session.cpp b/biometrics/fingerprint/aidl/default/Session.cpp
index c2934a8..372066d 100644
--- a/biometrics/fingerprint/aidl/default/Session.cpp
+++ b/biometrics/fingerprint/aidl/default/Session.cpp
@@ -27,6 +27,14 @@
 
 Session::Session(std::shared_ptr<ISessionCallback> cb) : cb_(std::move(cb)) {}
 
+ndk::ScopedAStatus Session::generateChallenge(int32_t /*cookie*/, int32_t /*timeoutSec*/) {
+    return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus Session::revokeChallenge(int32_t /*cookie*/, int64_t /*challenge*/) {
+    return ndk::ScopedAStatus::ok();
+}
+
 ndk::ScopedAStatus Session::enroll(int32_t /*cookie*/, const keymaster::HardwareAuthToken& /*hat*/,
                                    std::shared_ptr<common::ICancellationSignal>* /*return_val*/) {
     return ndk::ScopedAStatus::ok();
@@ -60,7 +68,7 @@
 }
 
 ndk::ScopedAStatus Session::invalidateAuthenticatorId(int32_t /*cookie*/,
-                                        const keymaster::HardwareAuthToken& /*hat*/) {
+                                                      const keymaster::HardwareAuthToken& /*hat*/) {
     return ndk::ScopedAStatus::ok();
 }
 
@@ -81,5 +89,4 @@
 ndk::ScopedAStatus Session::onUiReady() {
     return ndk::ScopedAStatus::ok();
 }
-
 }  // namespace aidl::android::hardware::biometrics::fingerprint
diff --git a/biometrics/fingerprint/aidl/default/Session.h b/biometrics/fingerprint/aidl/default/Session.h
index f7cba1b..05c570c 100644
--- a/biometrics/fingerprint/aidl/default/Session.h
+++ b/biometrics/fingerprint/aidl/default/Session.h
@@ -28,14 +28,19 @@
   public:
     explicit Session(std::shared_ptr<ISessionCallback> cb);
 
+    ndk::ScopedAStatus generateChallenge(int32_t cookie, int32_t timeoutSec) override;
+
+    ndk::ScopedAStatus revokeChallenge(int32_t cookie, int64_t challenge) override;
+
     ndk::ScopedAStatus enroll(int32_t cookie, const keymaster::HardwareAuthToken& hat,
                               std::shared_ptr<common::ICancellationSignal>* return_val) override;
 
-    ndk::ScopedAStatus authenticate(int32_t cookie, int64_t keystoreOperationId,
-                                    std::shared_ptr<common::ICancellationSignal>* return_val) override;
+    ndk::ScopedAStatus authenticate(
+            int32_t cookie, int64_t keystoreOperationId,
+            std::shared_ptr<common::ICancellationSignal>* return_val) override;
 
-    ndk::ScopedAStatus detectInteraction(int32_t cookie,
-                                         std::shared_ptr<common::ICancellationSignal>* return_val) override;
+    ndk::ScopedAStatus detectInteraction(
+            int32_t cookie, std::shared_ptr<common::ICancellationSignal>* return_val) override;
 
     ndk::ScopedAStatus enumerateEnrollments(int32_t cookie) override;
 
@@ -45,7 +50,7 @@
     ndk::ScopedAStatus getAuthenticatorId(int32_t cookie) override;
 
     ndk::ScopedAStatus invalidateAuthenticatorId(int32_t cookie,
-                                    const keymaster::HardwareAuthToken& hat) override;
+                                                 const keymaster::HardwareAuthToken& hat) override;
 
     ndk::ScopedAStatus resetLockout(int32_t cookie,
                                     const keymaster::HardwareAuthToken& hat) override;