Revert "Add VTS tests for biometrics.face@1.1" am: 32142e7c41 am: 2cf5ddd2f7

Change-Id: I54fea62a341bcad9bf17274b0f88aae1de81e944
diff --git a/biometrics/face/1.1/Android.bp b/biometrics/face/1.1/Android.bp
deleted file mode 100644
index 2206597..0000000
--- a/biometrics/face/1.1/Android.bp
+++ /dev/null
@@ -1,17 +0,0 @@
-// This file is autogenerated by hidl-gen -Landroidbp.
-
-hidl_interface {
-    name: "android.hardware.biometrics.face@1.1",
-    root: "android.hardware",
-    vndk: {
-        enabled: true,
-    },
-    srcs: [
-        "IBiometricsFace.hal",
-    ],
-    interfaces: [
-        "android.hardware.biometrics.face@1.0",
-        "android.hidl.base@1.0",
-    ],
-    gen_java: true,
-}
diff --git a/biometrics/face/1.1/IBiometricsFace.hal b/biometrics/face/1.1/IBiometricsFace.hal
deleted file mode 100644
index 975001f..0000000
--- a/biometrics/face/1.1/IBiometricsFace.hal
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.biometrics.face@1.1;
-import @1.0::IBiometricsFace;
-import @1.0::Status;
-import @1.0::Feature;
-
-/**
- * The HAL interface for biometric face authentication.
- */
-interface IBiometricsFace extends @1.0::IBiometricsFace {
-    /**
-     * Enrolls a user's face for a remote client, for example Android Auto.
-     *
-     * The HAL implementation is responsible for creating a secure communication
-     * channel and receiving the enrollment images from a mobile device with
-     * face authentication hardware.
-     *
-     * Note that the Hardware Authentication Token must be valid for the
-     * duration of enrollment and thus should be explicitly invalidated by a
-     * call to revokeChallenge() when enrollment is complete, to reduce the
-     * window of opportunity to re-use the challenge and HAT. For example,
-     * Settings calls generateChallenge() once to allow the user to enroll one
-     * or more faces or toggle secure settings without having to re-enter the
-     * PIN/pattern/password. Once the user completes the operation, Settings
-     * invokes revokeChallenge() to close the transaction. If the HAT is expired,
-     * the implementation must invoke onError with UNABLE_TO_PROCESS.
-     *
-     * Requirements for using this API:
-     * - Mobile devices MUST NOT delegate enrollment to another device by calling
-     * this API. This feature is intended only to allow enrollment on devices
-     * where it is impossible to enroll locally on the device.
-     * - The path MUST be protected by a secret key with rollback protection.
-     * - Synchronizing between devices MUST be accomplished by having both
-     * devices agree on a secret PIN entered by the user (similar to BT
-     * pairing procedure) and use a salted version of that PIN plus other secret
-     * to encrypt traffic.
-     * - All communication to/from the remote device MUST be encrypted and signed
-     * to prevent image injection and other man-in-the-middle type attacks.
-     * - generateChallenge() and revokeChallenge() MUST be implemented on both
-     * remote and local host (e.g. hash the result of the remote host with a
-     * local secret before responding to the API call) and any transmission of
-     * the challenge between hosts MUST be signed to prevent man-in-the-middle
-     * attacks.
-     * - In the event of a lost connection, the result of the last
-     * generateChallenge() MUST be invalidated and the process started over.
-     * - Both the remote and local host MUST honor the timeout and invalidate the
-     * challenge.
-     *
-     * This method triggers the IBiometricsFaceClientCallback#onEnrollResult()
-     * method.
-     *
-     * @param hat A valid Hardware Authentication Token, generated as a result
-     *     of a generateChallenge() challenge being wrapped by the gatekeeper
-     *     after a successful strong authentication request.
-     * @param timeoutSec A timeout in seconds, after which this enroll
-     *     attempt is cancelled. Note that the framework can continue
-     *     enrollment by calling this again with a valid HAT. This timeout is
-     *     expected to be used to limit power usage if the device becomes idle
-     *     during enrollment. The implementation is expected to send
-     *     ERROR_TIMEOUT if this happens.
-     * @param disabledFeatures A list of features to be disabled during
-     *     enrollment. Note that all features are enabled by default.
-     * @return status The status of this method call.
-     */
-    enrollRemotely(vec<uint8_t> hat, uint32_t timeoutSec,
-        vec<Feature> disabledFeatures) generates (Status status);
-};
diff --git a/biometrics/fingerprint/2.2/IBiometricsFingerprint.hal b/biometrics/fingerprint/2.2/IBiometricsFingerprint.hal
index 0651034..249830a 100644
--- a/biometrics/fingerprint/2.2/IBiometricsFingerprint.hal
+++ b/biometrics/fingerprint/2.2/IBiometricsFingerprint.hal
@@ -17,42 +17,12 @@
 package android.hardware.biometrics.fingerprint@2.2;
 
 import @2.1::IBiometricsFingerprint;
-import @2.1::RequestStatus;
 
+/**
+ * The HAL interface for biometric fingerprint authentication.
+ *
+ * This interface is required because all top-level interfaces need to be
+ * updated in a minor uprev.
+ */
 interface IBiometricsFingerprint extends @2.1::IBiometricsFingerprint {
-    /**
-     * Fingerprint enroll request:
-     * Switches the HAL state machine to collect and store a new fingerprint
-     * template. Switches back as soon as enroll is complete, signalled by
-     * (fingerprintMsg.type == FINGERPRINT_TEMPLATE_ENROLLING &&
-     *  fingerprintMsg.data.enroll.samplesRemaining == 0)
-     * or after timeoutSec seconds.
-     * The fingerprint template must be assigned to the group gid.
-     *
-     * @param hat a valid Hardware Authentication Token (HAT), generated
-     * as a result of a preEnroll() call.
-     * @param gid a framework defined fingerprint set (group) id.
-     * @param timeoutSec a timeout in seconds.
-     * @param windowId optional ID of an illumination window for optical under
-     * display fingerprint sensors. Must contain a null pointer if not used.
-     *
-     * @return debugErrno is a value the framework logs in case it is not 0.
-     *
-     * A notify() function may be called with a more detailed error structure.
-     */
-    enroll_2_2(vec<uint8_t> hat, uint32_t gid, uint32_t timeoutSec, handle windowId)
-        generates (RequestStatus debugErrno);
-
-    /**
-     * Authenticates an operation identified by operationId
-     *
-     * @param operationId operation id.
-     * @param gid fingerprint group id.
-     * @param windowId optional ID of an illumination window for optical under
-     * display fingerprint sensors. Must contain a null pointer if not used.
-     *
-     * @return debugErrno is a value the framework logs in case it is not 0.
-     */
-    authenticate_2_2(uint64_t operationId, uint32_t gid, handle windowId)
-        generates (RequestStatus debugErrno);
 };
diff --git a/biometrics/fingerprint/2.2/vts/functional/VtsHalBiometricsFingerprintV2_2TargetTest.cpp b/biometrics/fingerprint/2.2/vts/functional/VtsHalBiometricsFingerprintV2_2TargetTest.cpp
index 50bd4ab..df29fd4 100644
--- a/biometrics/fingerprint/2.2/vts/functional/VtsHalBiometricsFingerprintV2_2TargetTest.cpp
+++ b/biometrics/fingerprint/2.2/vts/functional/VtsHalBiometricsFingerprintV2_2TargetTest.cpp
@@ -18,65 +18,66 @@
 
 #include <VtsHalHidlTargetCallbackBase.h>
 #include <android-base/properties.h>
-#include <android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprintClientCallback.h>
-#include <android/hardware/biometrics/fingerprint/2.2/IBiometricsFingerprint.h>
+#include <android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprint.h>
+#include <android/hardware/biometrics/fingerprint/2.2/IBiometricsFingerprintClientCallback.h>
 #include <gtest/gtest.h>
 #include <hidl/GtestPrinter.h>
 #include <hidl/HidlSupport.h>
 #include <hidl/ServiceManagement.h>
 
 #include <cinttypes>
-#include <random>
+
+namespace {
+
+namespace hidl_interface = android::hardware::biometrics::fingerprint::V2_1;
+namespace hidl_interface_2_2 = android::hardware::biometrics::fingerprint::V2_2;
+
+using hidl_interface::FingerprintError;
+using hidl_interface::IBiometricsFingerprint;
+using hidl_interface::RequestStatus;
 
 using android::sp;
 using android::base::GetUintProperty;
-using android::hardware::hidl_handle;
 using android::hardware::hidl_vec;
 using android::hardware::Return;
 using android::hardware::Void;
-using android::hardware::biometrics::fingerprint::V2_1::FingerprintAcquiredInfo;
-using android::hardware::biometrics::fingerprint::V2_1::FingerprintError;
-using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprintClientCallback;
-using android::hardware::biometrics::fingerprint::V2_1::RequestStatus;
-using android::hardware::biometrics::fingerprint::V2_2::IBiometricsFingerprint;
-
-namespace {
 
 constexpr uint32_t kTimeoutSec = 3;
 constexpr auto kTimeout = std::chrono::seconds(kTimeoutSec);
 constexpr uint32_t kGroupId = 99;
-constexpr char kCallbackNameOnError[] = "onError";
+constexpr char kCallbackNameOnAcquired[] = "onAcquired";
 
 // Callback arguments that need to be captured for the tests.
 struct FingerprintCallbackArgs {
-    // The error passed to the last onError() callback.
-    FingerprintError error;
-
-    // The deviceId passed to the last callback.
-    uint64_t deviceId;
+    // The info passed to the last onAcquired() callback.
+    hidl_interface_2_2::FingerprintAcquiredInfo info;
 };
 
 // Test callback class for the BiometricsFingerprint HAL.
 // The HAL will call these callback methods to notify about completed operations
 // or encountered errors.
 class FingerprintCallback : public ::testing::VtsHalHidlTargetCallbackBase<FingerprintCallbackArgs>,
-                            public IBiometricsFingerprintClientCallback {
+                            public hidl_interface_2_2::IBiometricsFingerprintClientCallback {
   public:
     Return<void> onEnrollResult(uint64_t, uint32_t, uint32_t, uint32_t) override { return Void(); }
 
-    Return<void> onAcquired(uint64_t, FingerprintAcquiredInfo, int32_t) override { return Void(); }
+    Return<void> onAcquired(uint64_t, hidl_interface::FingerprintAcquiredInfo, int32_t) override {
+        return Void();
+    }
+
+    Return<void> onAcquired_2_2(uint64_t, hidl_interface_2_2::FingerprintAcquiredInfo info,
+                                int32_t) override {
+        FingerprintCallbackArgs args = {};
+        args.info = info;
+        NotifyFromCallback(kCallbackNameOnAcquired, args);
+        return Void();
+    }
 
     Return<void> onAuthenticated(uint64_t, uint32_t, uint32_t, const hidl_vec<uint8_t>&) override {
         return Void();
     }
 
-    Return<void> onError(uint64_t deviceId, FingerprintError error, int32_t) override {
-        FingerprintCallbackArgs args = {};
-        args.error = error;
-        args.deviceId = deviceId;
-        NotifyFromCallback(kCallbackNameOnError, args);
-        return Void();
-    }
+    Return<void> onError(uint64_t, FingerprintError, int32_t) override { return Void(); }
 
     Return<void> onRemoved(uint64_t, uint32_t, uint32_t, uint32_t) override { return Void(); }
 
@@ -121,41 +122,16 @@
     sp<FingerprintCallback> mCallback;
 };
 
-// Enroll with an invalid (all zeroes) HAT should fail.
-TEST_P(FingerprintHidlTest, EnrollZeroHatTest) {
-    // Filling HAT with zeros
-    hidl_vec<uint8_t> token(69);
-    for (size_t i = 0; i < 69; i++) {
-        token[i] = 0;
-    }
-
-    hidl_handle windowId = nullptr;
-    Return<RequestStatus> ret = mService->enroll_2_2(token, kGroupId, kTimeoutSec, windowId);
-    ASSERT_EQ(RequestStatus::SYS_OK, static_cast<RequestStatus>(ret));
-
-    // At least one call to onError should occur
-    auto res = mCallback->WaitForCallback(kCallbackNameOnError);
-    ASSERT_NE(FingerprintError::ERROR_NO_ERROR, res.args->error);
-}
-
-// Enroll with an invalid (null) HAT should fail.
-TEST_P(FingerprintHidlTest, EnrollGarbageHatTest) {
-    // Filling HAT with pseudorandom invalid data.
-    // Using default seed to make the test reproducible.
-    std::mt19937 gen(std::mt19937::default_seed);
-    std::uniform_int_distribution<uint8_t> dist;
-    hidl_vec<uint8_t> token(69);
-    for (size_t i = 0; i < 69; ++i) {
-        token[i] = dist(gen);
-    }
-
-    hidl_handle windowId = nullptr;
-    Return<RequestStatus> ret = mService->enroll_2_2(token, kGroupId, kTimeoutSec, windowId);
-    ASSERT_EQ(RequestStatus::SYS_OK, static_cast<RequestStatus>(ret));
-
-    // At least one call to onError should occur
-    auto res = mCallback->WaitForCallback(kCallbackNameOnError);
-    ASSERT_NE(FingerprintError::ERROR_NO_ERROR, res.args->error);
+// The START message and onAcquired_2_2 method should exist and work together correctly.
+// Note, this test doesn't use the HAL. It just makes sure that the newly added constant and
+// callback compile. Unfortunately, there is no way to test the usage of the constant within the
+// actual HAL.
+TEST_P(FingerprintHidlTest, acquiredInfoStartTest) {
+    mCallback->SetWaitTimeoutDefault(kTimeout);
+    mCallback->onAcquired_2_2(0 /* deviceId */, hidl_interface_2_2::FingerprintAcquiredInfo::START,
+                              0 /* vendorCode */);
+    auto res = mCallback->WaitForCallback(kCallbackNameOnAcquired);
+    ASSERT_EQ(hidl_interface_2_2::FingerprintAcquiredInfo::START, res.args->info);
 }
 
 }  // anonymous namespace
diff --git a/current.txt b/current.txt
index 79f5eba..9c0a776 100644
--- a/current.txt
+++ b/current.txt
@@ -631,7 +631,7 @@
 282193799d60bff27a84c65a36218c1e7d8f582f5828e2e059383d1b90aa56bd android.hardware.audio.effect@6.0::IVirtualizerEffect
 0868e00f7c5ee16723bda1a8f57099763d04100ae7126a1c2d3a9a87c844a7e8 android.hardware.audio.effect@6.0::IVisualizerEffect
 817930d58412d662cb45e641c50cb62c727e4a3e3ffe7029a53cad9677b97d58 android.hardware.audio.effect@6.0::types
-6828bbf18dc5d0f00c73341a10c8e4d574346c1abb1c2ed682ba5e9f8a3240d9 android.hardware.biometrics.fingerprint@2.2::IBiometricsFingerprint
+140f8f62100ccf9cd282ae3685a0f4ef0a9f971d77dfbc7350ccb4e04cf295ec android.hardware.biometrics.fingerprint@2.2::IBiometricsFingerprint
 82cad99f5feb2ea9bcd4579055edf4af8feb9fc602a6e4827ddd727d254d4991 android.hardware.biometrics.fingerprint@2.2::IBiometricsFingerprintClientCallback
 ae6315fd42196478ac08441cb489d854118001bca5b9b9fd58af5110952be30e android.hardware.biometrics.fingerprint@2.2::types
 362fd1c21641c2224f3b80c30d9797b988fa3f344243d531ba73c553779a5763 android.hardware.bluetooth@1.1::IBluetoothHci