Merge "Fix file paths for DumpstateUtil calls in 1.0" into rvc-dev
diff --git a/automotive/can/1.0/default/libc++fs/Android.bp b/automotive/can/1.0/default/libc++fs/Android.bp
new file mode 100644
index 0000000..1fe324e
--- /dev/null
+++ b/automotive/can/1.0/default/libc++fs/Android.bp
@@ -0,0 +1,83 @@
+//
+// Copyright (C) 2020 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.
+//
+
+// TODO(152067309): Stop building this yourself once it's ABI stable and has
+// been made vendor available. Just use libc++fs instead of this.
+
+cc_defaults {
+ name: "android.hardware.automotive@libc++fsdefaults",
+ host_supported: true,
+ local_include_dirs: ["include"],
+ export_include_dirs: ["include"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wno-unused-parameter",
+ ],
+ cppflags: [
+ "-std=c++14",
+ "-fexceptions",
+ "-DLIBCXX_BUILDING_LIBCXXABI",
+ "-D_LIBCPP_BUILDING_LIBRARY",
+ ],
+ rtti: true,
+ stl: "none",
+ target: {
+ linux_bionic: {
+ enabled: true,
+ },
+ windows: {
+ enabled: true,
+ cflags: [
+ "-D_LIBCPP_HAS_THREAD_API_WIN32",
+ "-D_LIBCXXABI_BUILDING_LIBRARY",
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-UWIN32_LEAN_AND_MEAN",
+ ],
+ },
+ windows_x86: {
+ cflags: [
+ "-fsjlj-exceptions",
+ ],
+ },
+ },
+}
+
+cc_library_static {
+ name: "android.hardware.automotive@libc++fs",
+ recovery_available: true,
+ vendor: true,
+ defaults: ["android.hardware.automotive@libc++fsdefaults"],
+ srcs: [
+ "src/filesystem/directory_iterator.cpp",
+ "src/filesystem/operations.cpp",
+ ],
+ multilib: {
+ lib32: {
+ // off_t usage is constrained to within the libc++ source (not the
+ // headers), so we can build the filesystem library with a 64-bit
+ // off_t on LP32 to get large file support without needing all users
+ // of the library to match.
+ cflags: ["-D_FILE_OFFSET_BITS=64"],
+ },
+ },
+ target: {
+ windows: {
+ enabled: false,
+ },
+ },
+}
diff --git a/automotive/can/1.0/default/libc++fs/include b/automotive/can/1.0/default/libc++fs/include
new file mode 120000
index 0000000..346e659
--- /dev/null
+++ b/automotive/can/1.0/default/libc++fs/include
@@ -0,0 +1 @@
+../../../../../../../external/libcxx/include/
\ No newline at end of file
diff --git a/automotive/can/1.0/default/libc++fs/src b/automotive/can/1.0/default/libc++fs/src
new file mode 120000
index 0000000..7abb4ba
--- /dev/null
+++ b/automotive/can/1.0/default/libc++fs/src
@@ -0,0 +1 @@
+../../../../../../../external/libcxx/src/
\ No newline at end of file
diff --git a/biometrics/face/1.1/default/Android.bp b/biometrics/face/1.0/default/Android.bp
similarity index 84%
rename from biometrics/face/1.1/default/Android.bp
rename to biometrics/face/1.0/default/Android.bp
index 360071f..d6ff087 100644
--- a/biometrics/face/1.1/default/Android.bp
+++ b/biometrics/face/1.0/default/Android.bp
@@ -15,10 +15,10 @@
*/
cc_binary {
- name: "android.hardware.biometrics.face@1.1-service.example",
+ name: "android.hardware.biometrics.face@1.0-service.example",
defaults: ["hidl_defaults"],
vendor: true,
- init_rc: ["android.hardware.biometrics.face@1.1-service.rc"],
+ init_rc: ["android.hardware.biometrics.face@1.0-service.rc"],
vintf_fragments: ["manifest_face_default.xml"],
relative_install_path: "hw",
proprietary: true,
@@ -31,6 +31,5 @@
"libutils",
"liblog",
"android.hardware.biometrics.face@1.0",
- "android.hardware.biometrics.face@1.1",
],
}
diff --git a/biometrics/face/1.1/default/BiometricsFace.cpp b/biometrics/face/1.0/default/BiometricsFace.cpp
similarity index 81%
rename from biometrics/face/1.1/default/BiometricsFace.cpp
rename to biometrics/face/1.0/default/BiometricsFace.cpp
index 2143880..2dd6476 100644
--- a/biometrics/face/1.1/default/BiometricsFace.cpp
+++ b/biometrics/face/1.0/default/BiometricsFace.cpp
@@ -110,20 +110,4 @@
return Status::OK;
}
-// Methods from ::android::hardware::biometrics::face::V1_1::IBiometricsFace follow.
-Return<Status> BiometricsFace::enroll_1_1(const hidl_vec<uint8_t>& /* hat */,
- uint32_t /* timeoutSec */,
- const hidl_vec<Feature>& /* disabledFeatures */,
- const hidl_handle& /* windowId */) {
- mClientCallback->onError(kDeviceId, mUserId, FaceError::UNABLE_TO_PROCESS, 0 /* vendorCode */);
- return Status::OK;
-}
-
-Return<Status> BiometricsFace::enrollRemotely(const hidl_vec<uint8_t>& /* hat */,
- uint32_t /* timeoutSec */,
- const hidl_vec<Feature>& /* disabledFeatures */) {
- mClientCallback->onError(kDeviceId, mUserId, FaceError::UNABLE_TO_PROCESS, 0 /* vendorCode */);
- return Status::OK;
-}
-
} // namespace android::hardware::biometrics::face::implementation
diff --git a/biometrics/face/1.1/default/BiometricsFace.h b/biometrics/face/1.0/default/BiometricsFace.h
similarity index 81%
rename from biometrics/face/1.1/default/BiometricsFace.h
rename to biometrics/face/1.0/default/BiometricsFace.h
index 5ce5771..1d99ed2 100644
--- a/biometrics/face/1.1/default/BiometricsFace.h
+++ b/biometrics/face/1.0/default/BiometricsFace.h
@@ -16,7 +16,7 @@
#pragma once
-#include <android/hardware/biometrics/face/1.1/IBiometricsFace.h>
+#include <android/hardware/biometrics/face/1.0/IBiometricsFace.h>
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
#include <random>
@@ -34,7 +34,7 @@
using ::android::hardware::biometrics::face::V1_0::IBiometricsFaceClientCallback;
using ::android::hardware::biometrics::face::V1_0::Status;
-class BiometricsFace : public V1_1::IBiometricsFace {
+class BiometricsFace : public V1_0::IBiometricsFace {
public:
BiometricsFace();
@@ -71,14 +71,6 @@
Return<Status> resetLockout(const hidl_vec<uint8_t>& hat) override;
- // Methods from ::android::hardware::biometrics::face::V1_1::IBiometricsFace follow.
- Return<Status> enroll_1_1(const hidl_vec<uint8_t>& hat, uint32_t timeoutSec,
- const hidl_vec<Feature>& disabledFeatures,
- const hidl_handle& windowId) override;
-
- Return<Status> enrollRemotely(const hidl_vec<uint8_t>& hat, uint32_t timeoutSec,
- const hidl_vec<Feature>& disabledFeatures) override;
-
private:
std::mt19937 mRandom;
int32_t mUserId;
diff --git a/biometrics/face/1.1/default/android.hardware.biometrics.face@1.1-service.rc b/biometrics/face/1.0/default/android.hardware.biometrics.face@1.0-service.rc
similarity index 75%
rename from biometrics/face/1.1/default/android.hardware.biometrics.face@1.1-service.rc
rename to biometrics/face/1.0/default/android.hardware.biometrics.face@1.0-service.rc
index 687e2d8..6c7362f 100644
--- a/biometrics/face/1.1/default/android.hardware.biometrics.face@1.1-service.rc
+++ b/biometrics/face/1.0/default/android.hardware.biometrics.face@1.0-service.rc
@@ -1,4 +1,4 @@
-service vendor.face-hal-1-1-default /vendor/bin/hw/android.hardware.biometrics.face@1.1-service.example
+service vendor.face-hal-1-0-default /vendor/bin/hw/android.hardware.biometrics.face@1.0-service.example
# "class hal" causes a race condition on some devices due to files created
# in /data. As a workaround, postpone startup until later in boot once
# /data is mounted.
diff --git a/biometrics/face/1.1/default/manifest_face_default.xml b/biometrics/face/1.0/default/manifest_face_default.xml
similarity index 90%
rename from biometrics/face/1.1/default/manifest_face_default.xml
rename to biometrics/face/1.0/default/manifest_face_default.xml
index ec71d9c..380ae49 100644
--- a/biometrics/face/1.1/default/manifest_face_default.xml
+++ b/biometrics/face/1.0/default/manifest_face_default.xml
@@ -2,7 +2,7 @@
<hal format="hidl">
<name>android.hardware.biometrics.face</name>
<transport>hwbinder</transport>
- <version>1.1</version>
+ <version>1.0</version>
<interface>
<name>IBiometricsFace</name>
<instance>default</instance>
diff --git a/biometrics/face/1.1/default/service.cpp b/biometrics/face/1.0/default/service.cpp
similarity index 88%
rename from biometrics/face/1.1/default/service.cpp
rename to biometrics/face/1.0/default/service.cpp
index 344bdb9..9818c95 100644
--- a/biometrics/face/1.1/default/service.cpp
+++ b/biometrics/face/1.0/default/service.cpp
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-#define LOG_TAG "android.hardware.biometrics.face@1.1-service"
+#define LOG_TAG "android.hardware.biometrics.face@1.0-service"
#include <android/hardware/biometrics/face/1.0/types.h>
-#include <android/hardware/biometrics/face/1.1/IBiometricsFace.h>
+#include <android/hardware/biometrics/face/1.0/IBiometricsFace.h>
#include <android/log.h>
#include <hidl/HidlSupport.h>
#include <hidl/HidlTransportSupport.h>
@@ -27,7 +27,7 @@
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
using android::hardware::biometrics::face::implementation::BiometricsFace;
-using android::hardware::biometrics::face::V1_1::IBiometricsFace;
+using android::hardware::biometrics::face::V1_0::IBiometricsFace;
int main() {
ALOGI("BiometricsFace HAL is being started.");
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 84e7443..0000000
--- a/biometrics/face/1.1/IBiometricsFace.hal
+++ /dev/null
@@ -1,117 +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);
-
- /**
- * Enrolls a user's face.
- *
- * 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.
- *
- * 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.
- * @param windowId optional ID of a camera preview window for a
- * single-camera device. Must be null if not used.
- * @return status The status of this method call.
- */
- enroll_1_1(vec<uint8_t> hat, uint32_t timeoutSec, vec<Feature> disabledFeatures,
- handle windowId) generates (Status status);
-};
diff --git a/biometrics/face/1.1/vts/functional/Android.bp b/biometrics/face/1.1/vts/functional/Android.bp
deleted file mode 100644
index ccbb399..0000000
--- a/biometrics/face/1.1/vts/functional/Android.bp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2020 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.
- */
-
-cc_test {
- name: "VtsHalBiometricsFaceV1_1TargetTest",
- defaults: ["VtsHalTargetTestDefaults"],
- srcs: ["VtsHalBiometricsFaceV1_1TargetTest.cpp"],
- static_libs: [
- "android.hardware.biometrics.face@1.0",
- "android.hardware.biometrics.face@1.1",
- ],
- test_suites: [
- "general-tests",
- "vts-core",
- ],
-}
diff --git a/biometrics/face/1.1/vts/functional/VtsHalBiometricsFaceV1_1TargetTest.cpp b/biometrics/face/1.1/vts/functional/VtsHalBiometricsFaceV1_1TargetTest.cpp
deleted file mode 100644
index 6ada442..0000000
--- a/biometrics/face/1.1/vts/functional/VtsHalBiometricsFaceV1_1TargetTest.cpp
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Copyright 2020 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.
- */
-
-#define LOG_TAG "biometrics_face_hidl_hal_test"
-
-#include <android/hardware/biometrics/face/1.0/IBiometricsFaceClientCallback.h>
-#include <android/hardware/biometrics/face/1.1/IBiometricsFace.h>
-
-#include <VtsHalHidlTargetCallbackBase.h>
-#include <android-base/logging.h>
-#include <gtest/gtest.h>
-#include <hidl/GtestPrinter.h>
-#include <hidl/ServiceManagement.h>
-
-#include <chrono>
-#include <cstdint>
-#include <random>
-
-using android::sp;
-using android::hardware::hidl_handle;
-using android::hardware::hidl_vec;
-using android::hardware::Return;
-using android::hardware::Void;
-using android::hardware::biometrics::face::V1_0::FaceAcquiredInfo;
-using android::hardware::biometrics::face::V1_0::FaceError;
-using android::hardware::biometrics::face::V1_0::IBiometricsFaceClientCallback;
-using android::hardware::biometrics::face::V1_0::OptionalUint64;
-using android::hardware::biometrics::face::V1_0::Status;
-using android::hardware::biometrics::face::V1_1::IBiometricsFace;
-
-namespace {
-
-// Arbitrary, nonexistent userId
-constexpr uint32_t kUserId = 9;
-constexpr uint32_t kTimeoutSec = 3;
-constexpr auto kTimeout = std::chrono::seconds(kTimeoutSec);
-constexpr char kFacedataDir[] = "/data/vendor_de/0/facedata";
-constexpr char kCallbackNameOnError[] = "onError";
-
-// Callback arguments that need to be captured for the tests.
-struct FaceCallbackArgs {
- // The error passed to the last onError() callback.
- FaceError error;
-
- // The userId passed to the last callback.
- int32_t userId;
-};
-
-// Test callback class for the BiometricsFace HAL.
-// The HAL will call these callback methods to notify about completed operations
-// or encountered errors.
-class FaceCallback : public ::testing::VtsHalHidlTargetCallbackBase<FaceCallbackArgs>,
- public IBiometricsFaceClientCallback {
- public:
- Return<void> onEnrollResult(uint64_t, uint32_t, int32_t, uint32_t) override { return Void(); }
-
- Return<void> onAuthenticated(uint64_t, uint32_t, int32_t, const hidl_vec<uint8_t>&) override {
- return Void();
- }
-
- Return<void> onAcquired(uint64_t, int32_t, FaceAcquiredInfo, int32_t) override {
- return Void();
- }
-
- Return<void> onError(uint64_t, int32_t userId, FaceError error, int32_t) override {
- FaceCallbackArgs args = {};
- args.error = error;
- args.userId = userId;
- NotifyFromCallback(kCallbackNameOnError, args);
- return Void();
- }
-
- Return<void> onRemoved(uint64_t, const hidl_vec<uint32_t>&, int32_t) override { return Void(); }
-
- Return<void> onEnumerate(uint64_t, const hidl_vec<uint32_t>&, int32_t) override {
- return Void();
- }
-
- Return<void> onLockoutChanged(uint64_t) override { return Void(); }
-};
-
-// Test class for the BiometricsFace HAL.
-class FaceHidlTest : public ::testing::TestWithParam<std::string> {
- public:
- void SetUp() override {
- mService = IBiometricsFace::getService(GetParam());
- ASSERT_NE(mService, nullptr);
- mCallback = new FaceCallback();
- mCallback->SetWaitTimeoutDefault(kTimeout);
- Return<void> ret1 = mService->setCallback(mCallback, [](const OptionalUint64& res) {
- ASSERT_EQ(Status::OK, res.status);
- // Makes sure the "deviceId" represented by "res.value" is not 0.
- // 0 would mean the HIDL is not available.
- ASSERT_NE(0UL, res.value);
- });
- ASSERT_TRUE(ret1.isOk());
- Return<Status> ret2 = mService->setActiveUser(kUserId, kFacedataDir);
- ASSERT_EQ(Status::OK, static_cast<Status>(ret2));
- }
-
- void TearDown() override {}
-
- sp<IBiometricsFace> mService;
- sp<FaceCallback> mCallback;
-};
-
-// enroll with an invalid (all zeroes) HAT should fail.
-TEST_P(FaceHidlTest, Enroll2_2ZeroHatTest) {
- // 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<Status> ret = mService->enroll_1_1(token, kTimeoutSec, {}, windowId);
- ASSERT_EQ(Status::OK, static_cast<Status>(ret));
-
- // onError should be called with a meaningful (nonzero) error.
- auto res = mCallback->WaitForCallback(kCallbackNameOnError);
- EXPECT_TRUE(res.no_timeout);
- EXPECT_EQ(kUserId, res.args->userId);
- EXPECT_EQ(FaceError::UNABLE_TO_PROCESS, res.args->error);
-}
-
-// enroll with an invalid HAT should fail.
-TEST_P(FaceHidlTest, Enroll2_2GarbageHatTest) {
- // 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<Status> ret = mService->enroll_1_1(token, kTimeoutSec, {}, windowId);
- ASSERT_EQ(Status::OK, static_cast<Status>(ret));
-
- // onError should be called with a meaningful (nonzero) error.
- auto res = mCallback->WaitForCallback(kCallbackNameOnError);
- EXPECT_TRUE(res.no_timeout);
- EXPECT_EQ(kUserId, res.args->userId);
- EXPECT_EQ(FaceError::UNABLE_TO_PROCESS, res.args->error);
-}
-
-// enroll with an invalid (all zeroes) HAT should fail.
-TEST_P(FaceHidlTest, EnrollRemotelyZeroHatTest) {
- // Filling HAT with zeros
- hidl_vec<uint8_t> token(69);
- for (size_t i = 0; i < 69; i++) {
- token[i] = 0;
- }
-
- Return<Status> ret = mService->enrollRemotely(token, kTimeoutSec, {});
- ASSERT_EQ(Status::OK, static_cast<Status>(ret));
-
- // onError should be called with a meaningful (nonzero) error.
- auto res = mCallback->WaitForCallback(kCallbackNameOnError);
- EXPECT_TRUE(res.no_timeout);
- EXPECT_EQ(kUserId, res.args->userId);
- EXPECT_EQ(FaceError::UNABLE_TO_PROCESS, res.args->error);
-}
-
-// enroll with an invalid HAT should fail.
-TEST_P(FaceHidlTest, EnrollRemotelyGarbageHatTest) {
- // 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);
- }
-
- Return<Status> ret = mService->enrollRemotely(token, kTimeoutSec, {});
- ASSERT_EQ(Status::OK, static_cast<Status>(ret));
-
- // onError should be called with a meaningful (nonzero) error.
- auto res = mCallback->WaitForCallback(kCallbackNameOnError);
- EXPECT_TRUE(res.no_timeout);
- EXPECT_EQ(kUserId, res.args->userId);
- EXPECT_EQ(FaceError::UNABLE_TO_PROCESS, res.args->error);
-}
-
-} // anonymous namespace
-
-INSTANTIATE_TEST_SUITE_P(
- PerInstance, FaceHidlTest,
- testing::ValuesIn(android::hardware::getAllHalInstanceNames(IBiometricsFace::descriptor)),
- android::hardware::PrintInstanceNameToString);
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/camera/metadata/3.5/types.hal b/camera/metadata/3.5/types.hal
index d32bc91..99d6115 100644
--- a/camera/metadata/3.5/types.hal
+++ b/camera/metadata/3.5/types.hal
@@ -73,7 +73,7 @@
ANDROID_CONTROL_END_3_5,
- /** android.scaler.availableRotateAndCropModes [static, byte[], public]
+ /** android.scaler.availableRotateAndCropModes [static, byte[], hidden]
*
* <p>List of rotate-and-crop modes for ANDROID_SCALER_ROTATE_AND_CROP that are supported by this camera device.</p>
*
@@ -81,7 +81,7 @@
*/
ANDROID_SCALER_AVAILABLE_ROTATE_AND_CROP_MODES = android.hardware.camera.metadata@3.4::CameraMetadataTag:ANDROID_SCALER_END_3_4,
- /** android.scaler.rotateAndCrop [dynamic, enum, public]
+ /** android.scaler.rotateAndCrop [dynamic, enum, hidden]
*
* <p>Whether a rotation-and-crop operation is applied to processed
* outputs from the camera.</p>
diff --git a/current.txt b/current.txt
index 47b7206..9c0a776 100644
--- a/current.txt
+++ b/current.txt
@@ -451,9 +451,9 @@
443659bb9e27221e5da0d16c7a0ecb2dc3a9a03acc8a0b2196b47c50735e2d2e android.hardware.audio.effect@5.0::IVirtualizerEffect
78fed26a781cdca1b3bcb37520bff705d7764ee81db9cfd37014953c7ad2596e android.hardware.audio.effect@5.0::IVisualizerEffect
6385b6accab8a544e2ee54ba7bf5aa55dff6153bcedd80fdaae16fe9e0be7050 android.hardware.audio.effect@5.0::types
-95aa2f59e29e2f84d8e84320ace9b6682b426a16e897b4bd241375cbee0e07f3 android.hardware.biometrics.face@1.0::types
e18ff318f3fc43db37f554696dc4e551abb9b119bde53950f73e28ce33a97a40 android.hardware.biometrics.face@1.0::IBiometricsFace
b6e55d7795bbafd011fb95a3b6d3954bf66c349e14cf107f3b72032ce3ceb448 android.hardware.biometrics.face@1.0::IBiometricsFaceClientCallback
+95aa2f59e29e2f84d8e84320ace9b6682b426a16e897b4bd241375cbee0e07f3 android.hardware.biometrics.face@1.0::types
ecedc58dbcdb13503c19c0ab160ac1dd0530bb1471164149282dd1463c684185 android.hardware.bluetooth.audio@2.0::IBluetoothAudioPort
fb9c40e4deab40be5476477078fe3d8a4a4495fd9deef4321878d169d675c633 android.hardware.bluetooth.audio@2.0::IBluetoothAudioProvider
f7431f3e3e4e3387fc6f27a6cf423eddcd824a395dc4349d302c995ab44a9895 android.hardware.bluetooth.audio@2.0::IBluetoothAudioProvidersFactory
@@ -631,8 +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
-7e8e1c3d0173c5d503dd01cecff8e3864478557ca6b9e8cc2291598b1a4aea62 android.hardware.biometrics.face@1.1::IBiometricsFace
-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
diff --git a/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl b/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl
index 5f9888a..d978f46 100644
--- a/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl
+++ b/graphics/common/aidl/android/hardware/graphics/common/BufferUsage.aidl
@@ -110,5 +110,5 @@
/** bits 32-47 must be zero and are reserved for future versions */
/** bits 48-63 are reserved for vendor extensions */
- VENDOR_MASK_HI = 0xffff << 48,
+ VENDOR_MASK_HI = (1L * 0xffff) << 48,
}