Merge "increase the thermal hal timeout to 5m"
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index f9e3276..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-subdir-makefiles)
diff --git a/audio/2.0/Android.bp b/audio/2.0/Android.bp
index 254c939..debed27 100644
--- a/audio/2.0/Android.bp
+++ b/audio/2.0/Android.bp
@@ -89,6 +89,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
"android.hardware.audio.common@2.0",
diff --git a/audio/common/2.0/Android.bp b/audio/common/2.0/Android.bp
index c539c3c..88f7921 100644
--- a/audio/common/2.0/Android.bp
+++ b/audio/common/2.0/Android.bp
@@ -33,6 +33,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/audio/effect/2.0/Android.bp b/audio/effect/2.0/Android.bp
index 11ea604..9edbb2a 100644
--- a/audio/effect/2.0/Android.bp
+++ b/audio/effect/2.0/Android.bp
@@ -145,6 +145,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
"android.hardware.audio.common@2.0",
diff --git a/benchmarks/msgq/1.0/Android.bp b/benchmarks/msgq/1.0/Android.bp
index 06ec3da..146227b 100644
--- a/benchmarks/msgq/1.0/Android.bp
+++ b/benchmarks/msgq/1.0/Android.bp
@@ -37,6 +37,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/biometrics/fingerprint/2.1/Android.bp b/biometrics/fingerprint/2.1/Android.bp
index cea7200..9ddcd2a 100644
--- a/biometrics/fingerprint/2.1/Android.bp
+++ b/biometrics/fingerprint/2.1/Android.bp
@@ -49,6 +49,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/bluetooth/1.0/Android.bp b/bluetooth/1.0/Android.bp
index 67417fb..c7ccaaf 100644
--- a/bluetooth/1.0/Android.bp
+++ b/bluetooth/1.0/Android.bp
@@ -49,6 +49,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/boot/1.0/Android.bp b/boot/1.0/Android.bp
index 835d358..501542b 100644
--- a/boot/1.0/Android.bp
+++ b/boot/1.0/Android.bp
@@ -41,6 +41,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/boot/1.0/default/BootControl.h b/boot/1.0/default/BootControl.h
index 73af4f4..be8a814 100644
--- a/boot/1.0/default/BootControl.h
+++ b/boot/1.0/default/BootControl.h
@@ -1,5 +1,5 @@
-#ifndef HIDL_GENERATED_android_hardware_boot_V1_0_BootControl_H_
-#define HIDL_GENERATED_android_hardware_boot_V1_0_BootControl_H_
+#ifndef ANDROID_HARDWARE_BOOT_V1_0_BOOTCONTROL_H
+#define ANDROID_HARDWARE_BOOT_V1_0_BOOTCONTROL_H
#include <android/hardware/boot/1.0/IBootControl.h>
#include <hidl/Status.h>
@@ -43,4 +43,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_boot_V1_0_BootControl_H_
+#endif // ANDROID_HARDWARE_BOOT_V1_0_BOOTCONTROL_H
diff --git a/broadcastradio/1.0/Android.bp b/broadcastradio/1.0/Android.bp
index a876ac2..1b40acf 100644
--- a/broadcastradio/1.0/Android.bp
+++ b/broadcastradio/1.0/Android.bp
@@ -65,6 +65,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/contexthub/1.0/Android.bp b/contexthub/1.0/Android.bp
index f13ef5b..f380c6f 100644
--- a/contexthub/1.0/Android.bp
+++ b/contexthub/1.0/Android.bp
@@ -49,6 +49,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/dumpstate/1.0/Android.bp b/dumpstate/1.0/Android.bp
new file mode 100644
index 0000000..ab34af2
--- /dev/null
+++ b/dumpstate/1.0/Android.bp
@@ -0,0 +1,50 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+genrule {
+ name: "android.hardware.dumpstate@1.0_genc++",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces android.hardware.dumpstate@1.0",
+ srcs: [
+ "IDumpstateDevice.hal",
+ ],
+ out: [
+ "android/hardware/dumpstate/1.0/DumpstateDeviceAll.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.dumpstate@1.0_genc++_headers",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces android.hardware.dumpstate@1.0",
+ srcs: [
+ "IDumpstateDevice.hal",
+ ],
+ out: [
+ "android/hardware/dumpstate/1.0/IDumpstateDevice.h",
+ "android/hardware/dumpstate/1.0/IHwDumpstateDevice.h",
+ "android/hardware/dumpstate/1.0/BnDumpstateDevice.h",
+ "android/hardware/dumpstate/1.0/BpDumpstateDevice.h",
+ "android/hardware/dumpstate/1.0/BsDumpstateDevice.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.dumpstate@1.0",
+ generated_sources: ["android.hardware.dumpstate@1.0_genc++"],
+ generated_headers: ["android.hardware.dumpstate@1.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.dumpstate@1.0_genc++_headers"],
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ ],
+}
diff --git a/dumpstate/1.0/IDumpstateDevice.hal b/dumpstate/1.0/IDumpstateDevice.hal
new file mode 100644
index 0000000..fec3eb4
--- /dev/null
+++ b/dumpstate/1.0/IDumpstateDevice.hal
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2016 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.dumpstate@1.0;
+
+interface IDumpstateDevice {
+ /*
+ * Dumps device-specific state into the given file descriptor.
+ */
+ dumpstateBoard(handle h);
+};
diff --git a/dumpstate/1.0/default/Android.mk b/dumpstate/1.0/default/Android.mk
new file mode 100644
index 0000000..4d5c908
--- /dev/null
+++ b/dumpstate/1.0/default/Android.mk
@@ -0,0 +1,22 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.dumpstate@1.0-impl
+LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_SRC_FILES := \
+ DumpstateDevice.cpp \
+
+LOCAL_SHARED_LIBRARIES := \
+ android.hardware.dumpstate@1.0 \
+ libbase \
+ libcutils \
+ libhidlbase \
+ libhidltransport \
+ libhwbinder \
+ liblog \
+ libutils
+
+LOCAL_STATIC_LIBRARIES := \
+ libdumpstateutil
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/dumpstate/1.0/default/DumpstateDevice.cpp b/dumpstate/1.0/default/DumpstateDevice.cpp
new file mode 100644
index 0000000..a279b89
--- /dev/null
+++ b/dumpstate/1.0/default/DumpstateDevice.cpp
@@ -0,0 +1,51 @@
+#define LOG_TAG "dumpstate"
+
+#include "DumpstateDevice.h"
+
+#include <log/log.h>
+
+#include "DumpstateUtil.h"
+
+namespace android {
+namespace hardware {
+namespace dumpstate {
+namespace V1_0 {
+namespace implementation {
+
+// Methods from ::android::hardware::dumpstate::V1_0::IDumpstateDevice follow.
+Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
+ if (handle->numFds < 1) {
+ ALOGE("no FDs\n");
+ return Void();
+ }
+
+ int fd = handle->data[0];
+ if (fd < 0) {
+ ALOGE("invalid FD: %d\n", handle->data[0]);
+ return Void();
+ }
+ ALOGD("DumpstateDevice::dumpstateBoard() FD: %d\n", fd);
+ ALOGI("Dumpstate HIDL not provided by device\n");
+ dprintf(fd, "Dumpstate HIDL not provided by device; providing bogus data.\n");
+
+ // Shows some examples on how to use the libdumpstateutils API.
+ dprintf(fd, "Time now is: ");
+ RunCommandToFd(fd, {"/system/bin/date"});
+ dprintf(fd, "Contents of a small file (/system/etc/hosts):\n");
+ DumpFileToFd(fd, "/system/etc/hosts");
+
+ return Void();
+}
+
+
+IDumpstateDevice* HIDL_FETCH_IDumpstateDevice(const char* /* name */) {
+ // TODO: temporary returning nullptr until it's implemented on master devices
+ return nullptr;
+// return new DumpstateDevice();
+}
+
+} // namespace implementation
+} // namespace V1_0
+} // namespace dumpstate
+} // namespace hardware
+} // namespace android
diff --git a/dumpstate/1.0/default/DumpstateDevice.h b/dumpstate/1.0/default/DumpstateDevice.h
new file mode 100644
index 0000000..6f860c0
--- /dev/null
+++ b/dumpstate/1.0/default/DumpstateDevice.h
@@ -0,0 +1,37 @@
+#ifndef ANDROID_HARDWARE_DUMPSTATE_V1_0_DUMPSTATEDEVICE_H
+#define ANDROID_HARDWARE_DUMPSTATE_V1_0_DUMPSTATEDEVICE_H
+
+#include <android/hardware/dumpstate/1.0/IDumpstateDevice.h>
+#include <hidl/MQDescriptor.h>
+#include <hidl/Status.h>
+
+namespace android {
+namespace hardware {
+namespace dumpstate {
+namespace V1_0 {
+namespace implementation {
+
+using ::android::hardware::dumpstate::V1_0::IDumpstateDevice;
+using ::android::hardware::hidl_array;
+using ::android::hardware::hidl_handle;
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::sp;
+
+struct DumpstateDevice : public IDumpstateDevice {
+ // Methods from ::android::hardware::dumpstate::V1_0::IDumpstateDevice follow.
+ Return<void> dumpstateBoard(const hidl_handle& h) override;
+
+};
+
+extern "C" IDumpstateDevice* HIDL_FETCH_IDumpstateDevice(const char* name);
+
+} // namespace implementation
+} // namespace V1_0
+} // namespace dumpstate
+} // namespace hardware
+} // namespace android
+
+#endif // ANDROID_HARDWARE_DUMPSTATE_V1_0_DUMPSTATEDEVICE_H
diff --git a/dumpstate/Android.bp b/dumpstate/Android.bp
new file mode 100644
index 0000000..bbb3e4b
--- /dev/null
+++ b/dumpstate/Android.bp
@@ -0,0 +1,4 @@
+// This is an autogenerated file, do not edit.
+subdirs = [
+ "1.0",
+]
diff --git a/example/extension/light/2.0/Android.bp b/example/extension/light/2.0/Android.bp
index ae93a6b..2257c35 100644
--- a/example/extension/light/2.0/Android.bp
+++ b/example/extension/light/2.0/Android.bp
@@ -41,6 +41,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
"android.hardware.light@2.0",
diff --git a/gatekeeper/1.0/Android.bp b/gatekeeper/1.0/Android.bp
new file mode 100644
index 0000000..76ee276
--- /dev/null
+++ b/gatekeeper/1.0/Android.bp
@@ -0,0 +1,53 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+genrule {
+ name: "android.hardware.gatekeeper@1.0_genc++",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces android.hardware.gatekeeper@1.0",
+ srcs: [
+ "types.hal",
+ "IGatekeeper.hal",
+ ],
+ out: [
+ "android/hardware/gatekeeper/1.0/types.cpp",
+ "android/hardware/gatekeeper/1.0/GatekeeperAll.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.gatekeeper@1.0_genc++_headers",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces android.hardware.gatekeeper@1.0",
+ srcs: [
+ "types.hal",
+ "IGatekeeper.hal",
+ ],
+ out: [
+ "android/hardware/gatekeeper/1.0/types.h",
+ "android/hardware/gatekeeper/1.0/IGatekeeper.h",
+ "android/hardware/gatekeeper/1.0/IHwGatekeeper.h",
+ "android/hardware/gatekeeper/1.0/BnGatekeeper.h",
+ "android/hardware/gatekeeper/1.0/BpGatekeeper.h",
+ "android/hardware/gatekeeper/1.0/BsGatekeeper.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.gatekeeper@1.0",
+ generated_sources: ["android.hardware.gatekeeper@1.0_genc++"],
+ generated_headers: ["android.hardware.gatekeeper@1.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.gatekeeper@1.0_genc++_headers"],
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "libcutils",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ ],
+}
diff --git a/gatekeeper/1.0/IGatekeeper.hal b/gatekeeper/1.0/IGatekeeper.hal
new file mode 100644
index 0000000..999a311
--- /dev/null
+++ b/gatekeeper/1.0/IGatekeeper.hal
@@ -0,0 +1,108 @@
+package android.hardware.gatekeeper@1.0;
+
+interface IGatekeeper {
+
+/**
+ * Enrolls desiredPassword, which may be derived from a user selected pin
+ * or password, with the private key used only for enrolling authentication
+ * factor data.
+ *
+ * If there was already a password enrolled, current password handle must be
+ * passed in currentPasswordHandle, and current password must be passed in
+ * currentPassword. Valid currentPassword must verify() against
+ * currentPasswordHandle.
+ *
+ * @param uid The Android user identifier
+ *
+ * @param currentPasswordHandle The currently enrolled password handle the user
+ * wants to replace. May be empty only if there's no currently enrolled
+ * password. Otherwise must be non-empty.
+ *
+ * @param currentPassword The user's current password in plain text.
+ * it MUST verify against current_password_handle if the latter is not-empty
+ *
+ * @param desiredPassword The new password the user wishes to enroll in
+ * plaintext.
+ *
+ * @return response
+ * On success, data buffer must contain the new password handle referencing
+ * the password provided in desiredPassword.
+ * This buffer can be used on subsequent calls to enroll or
+ * verify. On error, this buffer must be empty.
+ * response.code must always contain operation completion status.
+ * This method may return ERROR_GENERAL_FAILURE or ERROR_RETRY_TIMEOUT on
+ * failure. It must return STATUS_OK on success.
+ * If ERROR_RETRY_TIMEOUT is returned, response.timeout must be non-zero.
+ */
+enroll(uint32_t uid,
+ vec<uint8_t> currentPasswordHandle,
+ vec<uint8_t> currentPassword,
+ vec<uint8_t> desiredPassword)
+ generates (GatekeeperResponse response);
+
+/**
+ * Verifies that providedPassword matches enrolledPasswordHandle.
+ *
+ * Implementations of this module may retain the result of this call
+ * to attest to the recency of authentication.
+ *
+ * On success, returns verification token in response.data, which shall be
+ * usable to attest password verification to other trusted services.
+ *
+ * @param uid The Android user identifier
+ *
+ * @param challenge An optional challenge to authenticate against, or 0.
+ * Used when a separate authenticator requests password verification,
+ * or for transactional password authentication.
+ *
+ * @param enrolledPasswordHandle The currently enrolled password handle that
+ * user wishes to verify against. Must be non-empty.
+ *
+ * @param providedPassword The plaintext password to be verified against the
+ * enrolledPasswordHandle
+ *
+ * @return response
+ * On success, a non-empty data buffer containing the
+ * authentication token resulting from this verification is returned.
+ * On error, data buffer must be empty.
+ * response.code must always contain operation completion status.
+ * This method may return ERROR_GENERAL_FAILURE or ERROR_RETRY_TIMEOUT on
+ * failure. It must return STATUS_OK on success.
+ * If password re-enrollment is necessary, it must return STATUS_REENROLL.
+ * If ERROR_RETRY_TIMEOUT is returned, response.timeout must be non-zero.
+ */
+verify(uint32_t uid, uint64_t challenge,
+ vec<uint8_t> enrolledPasswordHandle,
+ vec<uint8_t> providedPassword)
+ generates (GatekeeperResponse response);
+
+/*
+ * Deletes the enrolledPasswordHandle associated with the uid. Once deleted
+ * the user cannot be verified anymore.
+ * This is an optional method.
+ *
+ * @param uid The Android user identifier
+ *
+ * @return response
+ * response.code must always contain operation completion status.
+ * This method may return ERROR_GENERAL_FAILURE or ERROR_RETRY_TIMEOUT on
+ * failure. It must return STATUS_OK on success.
+ * If not implemented, it must return ERROR_NOT_IMPLEMENTED.
+ * If ERROR_RETRY_TIMEOUT is returned, response.timeout must be non-zero.
+ */
+deleteUser(uint32_t uid) generates (GatekeeperResponse response);
+
+/*
+ * Deletes all the enrolled_password_handles for all uid's. Once called,
+ * no users must be enrolled on the device.
+ * This is an optional method.
+ *
+ * @return response
+ * response.code must always contain operation completion status.
+ * This method may return ERROR_GENERAL_FAILURE or ERROR_RETRY_TIMEOUT on
+ * failure. It must return STATUS_OK on success.
+ * If not implemented, it must return ERROR_NOT_IMPLEMENTED.
+ * If ERROR_RETRY_TIMEOUT is returned, response.timeout must be non-zero.
+ */
+deleteAllUsers() generates (GatekeeperResponse response);
+};
diff --git a/gatekeeper/1.0/default/Android.mk b/gatekeeper/1.0/default/Android.mk
new file mode 100644
index 0000000..e3b7d10
--- /dev/null
+++ b/gatekeeper/1.0/default/Android.mk
@@ -0,0 +1,40 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_MODULE := android.hardware.gatekeeper@1.0-impl
+
+LOCAL_SRC_FILES := \
+ Gatekeeper.cpp \
+
+LOCAL_SHARED_LIBRARIES := \
+ android.hardware.gatekeeper@1.0 \
+ libhardware \
+ libhidlbase \
+ libhidltransport \
+ libhwbinder \
+ libutils \
+ liblog \
+
+include $(BUILD_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_MODULE := android.hardware.gatekeeper@1.0-service
+LOCAL_INIT_RC := android.hardware.gatekeeper@1.0-service.rc
+
+LOCAL_SRC_FILES := \
+ service.cpp \
+
+LOCAL_SHARED_LIBRARIES := \
+ android.hardware.gatekeeper@1.0 \
+ libhardware \
+ libhidlbase \
+ libhidltransport \
+ libhwbinder \
+ libutils \
+ liblog \
+
+include $(BUILD_EXECUTABLE)
diff --git a/gatekeeper/1.0/default/Gatekeeper.cpp b/gatekeeper/1.0/default/Gatekeeper.cpp
new file mode 100644
index 0000000..8fcd8ca
--- /dev/null
+++ b/gatekeeper/1.0/default/Gatekeeper.cpp
@@ -0,0 +1,149 @@
+#define LOG_TAG "android.hardware.gatekeeper@1.0-service"
+
+#include <utils/Log.h>
+#include <dlfcn.h>
+
+#include "Gatekeeper.h"
+
+namespace android {
+namespace hardware {
+namespace gatekeeper {
+namespace V1_0 {
+namespace implementation {
+
+Gatekeeper::Gatekeeper()
+{
+ int ret = hw_get_module_by_class(GATEKEEPER_HARDWARE_MODULE_ID, NULL, &module);
+ device = NULL;
+
+ if (!ret) {
+ ret = gatekeeper_open(module, &device);
+ }
+ if (ret < 0) {
+ LOG_ALWAYS_FATAL_IF(ret < 0, "Unable to open GateKeeper HAL");
+ }
+}
+
+Gatekeeper::~Gatekeeper()
+{
+ if (device != nullptr) {
+ int ret = gatekeeper_close(device);
+ if (ret < 0) {
+ ALOGE("Unable to close GateKeeper HAL");
+ }
+ }
+ dlclose(module->dso);
+}
+
+// Methods from ::android::hardware::gatekeeper::V1_0::IGatekeeper follow.
+Return<void> Gatekeeper::enroll(uint32_t uid,
+ const hidl_vec<uint8_t>& currentPasswordHandle,
+ const hidl_vec<uint8_t>& currentPassword,
+ const hidl_vec<uint8_t>& desiredPassword,
+ enroll_cb cb)
+{
+ GatekeeperResponse rsp;
+ uint8_t *enrolled_password_handle = nullptr;
+ uint32_t enrolled_password_handle_length = 0;
+
+ int ret = device->enroll(device, uid,
+ currentPasswordHandle.data(), currentPasswordHandle.size(),
+ currentPassword.data(), currentPassword.size(),
+ desiredPassword.data(), desiredPassword.size(),
+ &enrolled_password_handle, &enrolled_password_handle_length);
+ if (!ret) {
+ rsp.data.setToExternal(enrolled_password_handle,
+ enrolled_password_handle_length,
+ true);
+ rsp.code = GatekeeperStatusCode::STATUS_OK;
+ } else if (ret > 0) {
+ rsp.timeout = ret;
+ rsp.code = GatekeeperStatusCode::ERROR_RETRY_TIMEOUT;
+ } else {
+ rsp.code = GatekeeperStatusCode::ERROR_GENERAL_FAILURE;
+ }
+ cb(rsp);
+ return Void();
+}
+
+Return<void> Gatekeeper::verify(uint32_t uid,
+ uint64_t challenge,
+ const hidl_vec<uint8_t>& enrolledPasswordHandle,
+ const hidl_vec<uint8_t>& providedPassword,
+ verify_cb cb)
+{
+ GatekeeperResponse rsp;
+ uint8_t *auth_token = nullptr;
+ uint32_t auth_token_length = 0;
+ bool request_reenroll = false;
+
+ int ret = device->verify(device, uid, challenge,
+ enrolledPasswordHandle.data(), enrolledPasswordHandle.size(),
+ providedPassword.data(), providedPassword.size(),
+ &auth_token, &auth_token_length,
+ &request_reenroll);
+ if (!ret) {
+ rsp.data.setToExternal(auth_token, auth_token_length, true);
+ if (request_reenroll) {
+ rsp.code = GatekeeperStatusCode::STATUS_REENROLL;
+ } else {
+ rsp.code = GatekeeperStatusCode::STATUS_OK;
+ }
+ } else if (ret > 0) {
+ rsp.timeout = ret;
+ rsp.code = GatekeeperStatusCode::ERROR_RETRY_TIMEOUT;
+ } else {
+ rsp.code = GatekeeperStatusCode::ERROR_GENERAL_FAILURE;
+ }
+ cb(rsp);
+ return Void();
+}
+
+Return<void> Gatekeeper::deleteUser(uint32_t uid, deleteUser_cb cb) {
+ GatekeeperResponse rsp;
+
+ if (device->delete_user != nullptr) {
+ int ret = device->delete_user(device, uid);
+ if (!ret) {
+ rsp.code = GatekeeperStatusCode::STATUS_OK;
+ } else if (ret > 0) {
+ rsp.timeout = ret;
+ rsp.code = GatekeeperStatusCode::ERROR_RETRY_TIMEOUT;
+ } else {
+ rsp.code = GatekeeperStatusCode::ERROR_GENERAL_FAILURE;
+ }
+ } else {
+ rsp.code = GatekeeperStatusCode::ERROR_NOT_IMPLEMENTED;
+ }
+ cb(rsp);
+ return Void();
+}
+
+Return<void> Gatekeeper::deleteAllUsers(deleteAllUsers_cb cb) {
+ GatekeeperResponse rsp;
+ if (device->delete_all_users != nullptr) {
+ int ret = device->delete_all_users(device);
+ if (!ret) {
+ rsp.code = GatekeeperStatusCode::STATUS_OK;
+ } else if (ret > 0) {
+ rsp.timeout = ret;
+ rsp.code = GatekeeperStatusCode::ERROR_RETRY_TIMEOUT;
+ } else {
+ rsp.code = GatekeeperStatusCode::ERROR_GENERAL_FAILURE;
+ }
+ } else {
+ rsp.code = GatekeeperStatusCode::ERROR_NOT_IMPLEMENTED;
+ }
+ cb(rsp);
+ return Void();
+}
+
+IGatekeeper* HIDL_FETCH_IGatekeeper(const char* /* name */) {
+ return new Gatekeeper();
+}
+
+} // namespace implementation
+} // namespace V1_0
+} // namespace gatekeeper
+} // namespace hardware
+} // namespace android
diff --git a/gatekeeper/1.0/default/Gatekeeper.h b/gatekeeper/1.0/default/Gatekeeper.h
new file mode 100644
index 0000000..a2188d4
--- /dev/null
+++ b/gatekeeper/1.0/default/Gatekeeper.h
@@ -0,0 +1,57 @@
+#ifndef HIDL_GENERATED_android_hardware_gatekeeper_V1_0_Gatekeeper_H_
+#define HIDL_GENERATED_android_hardware_gatekeeper_V1_0_Gatekeeper_H_
+
+#include <android/hardware/gatekeeper/1.0/IGatekeeper.h>
+#include <hidl/Status.h>
+
+#include <hidl/MQDescriptor.h>
+
+#include <hardware/hardware.h>
+#include <hardware/gatekeeper.h>
+
+namespace android {
+namespace hardware {
+namespace gatekeeper {
+namespace V1_0 {
+namespace implementation {
+
+using ::android::hardware::gatekeeper::V1_0::GatekeeperResponse;
+using ::android::hardware::gatekeeper::V1_0::IGatekeeper;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::hidl_string;
+using ::android::sp;
+
+class Gatekeeper : public IGatekeeper {
+public:
+ Gatekeeper();
+ ~Gatekeeper();
+
+ // Methods from ::android::hardware::gatekeeper::V1_0::IGatekeeper follow.
+ Return<void> enroll(uint32_t uid,
+ const hidl_vec<uint8_t>& currentPasswordHandle,
+ const hidl_vec<uint8_t>& currentPassword,
+ const hidl_vec<uint8_t>& desiredPassword,
+ enroll_cb _hidl_cb) override;
+ Return<void> verify(uint32_t uid,
+ uint64_t challenge,
+ const hidl_vec<uint8_t>& enrolledPasswordHandle,
+ const hidl_vec<uint8_t>& providedPassword,
+ verify_cb _hidl_cb) override;
+ Return<void> deleteUser(uint32_t uid, deleteUser_cb _hidl_cb) override;
+ Return<void> deleteAllUsers(deleteAllUsers_cb _hidl_cb) override;
+private:
+ gatekeeper_device_t *device;
+ const hw_module_t *module;
+};
+
+extern "C" IGatekeeper* HIDL_FETCH_IGatekeeper(const char* name);
+
+} // namespace implementation
+} // namespace V1_0
+} // namespace gatekeeper
+} // namespace hardware
+} // namespace android
+
+#endif // HIDL_GENERATED_android_hardware_gatekeeper_V1_0_Gatekeeper_H_
diff --git a/gatekeeper/1.0/default/android.hardware.gatekeeper@1.0-service.rc b/gatekeeper/1.0/default/android.hardware.gatekeeper@1.0-service.rc
new file mode 100644
index 0000000..ac15e23
--- /dev/null
+++ b/gatekeeper/1.0/default/android.hardware.gatekeeper@1.0-service.rc
@@ -0,0 +1,4 @@
+service gatekeeper-1-0 /system/bin/hw/android.hardware.gatekeeper@1.0-service
+ class hal
+ user system
+ group system
diff --git a/gatekeeper/1.0/default/service.cpp b/gatekeeper/1.0/default/service.cpp
new file mode 100644
index 0000000..c3fc25c
--- /dev/null
+++ b/gatekeeper/1.0/default/service.cpp
@@ -0,0 +1,13 @@
+#define LOG_TAG "android.hardware.gatekeeper@1.0-service"
+
+#include <android/hardware/gatekeeper/1.0/IGatekeeper.h>
+
+#include <hidl/LegacySupport.h>
+
+// Generated HIDL files
+using android::hardware::gatekeeper::V1_0::IGatekeeper;
+using android::hardware::defaultPassthroughServiceImplementation;
+
+int main() {
+ return defaultPassthroughServiceImplementation<IGatekeeper>("gatekeeper");
+}
diff --git a/gatekeeper/1.0/types.hal b/gatekeeper/1.0/types.hal
new file mode 100644
index 0000000..9ab1152
--- /dev/null
+++ b/gatekeeper/1.0/types.hal
@@ -0,0 +1,27 @@
+package android.hardware.gatekeeper@1.0;
+
+/**
+ * Gatekeeper response codes; success >= 0; error < 0
+ */
+enum GatekeeperStatusCode : int32_t {
+ STATUS_REENROLL = 1, // success, but upper layers should re-enroll
+ // the verified password due to a version change
+ STATUS_OK = 0, // operation is successful
+ ERROR_GENERAL_FAILURE = -1, // operation failed
+ ERROR_RETRY_TIMEOUT = -2, // operation should be retried after timeout
+ ERROR_NOT_IMPLEMENTED = -3, // operation is not implemented
+};
+
+/**
+ * Gatekeeper response to any/all requests has this structure as mandatory part
+ */
+struct GatekeeperResponse {
+ /* request completion status */
+ GatekeeperStatusCode code;
+ /* retry timeout in ms, if code == ERROR_RETRY_TIMEOUT
+ * otherwise unused (0)
+ */
+ uint32_t timeout;
+ /* optional crypto blob */
+ vec<uint8_t> data;
+};
diff --git a/gatekeeper/Android.bp b/gatekeeper/Android.bp
new file mode 100644
index 0000000..bbb3e4b
--- /dev/null
+++ b/gatekeeper/Android.bp
@@ -0,0 +1,4 @@
+// This is an autogenerated file, do not edit.
+subdirs = [
+ "1.0",
+]
diff --git a/gnss/1.0/Android.bp b/gnss/1.0/Android.bp
index f33f1c6..adac05f 100644
--- a/gnss/1.0/Android.bp
+++ b/gnss/1.0/Android.bp
@@ -169,6 +169,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/graphics/allocator/2.0/Android.bp b/graphics/allocator/2.0/Android.bp
index d6e88a3..e26e9a3 100644
--- a/graphics/allocator/2.0/Android.bp
+++ b/graphics/allocator/2.0/Android.bp
@@ -41,6 +41,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
"android.hardware.graphics.common@1.0",
diff --git a/graphics/common/1.0/Android.bp b/graphics/common/1.0/Android.bp
index 6c6ebbe..812cf50 100644
--- a/graphics/common/1.0/Android.bp
+++ b/graphics/common/1.0/Android.bp
@@ -33,6 +33,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/graphics/composer/2.1/Android.bp b/graphics/composer/2.1/Android.bp
index 106a821..a2e15f4 100644
--- a/graphics/composer/2.1/Android.bp
+++ b/graphics/composer/2.1/Android.bp
@@ -49,6 +49,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
"android.hardware.graphics.common@1.0",
diff --git a/health/1.0/Android.bp b/health/1.0/Android.bp
index 81793d5..fb92306 100644
--- a/health/1.0/Android.bp
+++ b/health/1.0/Android.bp
@@ -41,6 +41,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/light/2.0/Android.bp b/light/2.0/Android.bp
index 23c7c9c..5d01b3c 100644
--- a/light/2.0/Android.bp
+++ b/light/2.0/Android.bp
@@ -41,6 +41,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/light/2.0/vts/functional/Android.bp b/light/2.0/vts/functional/Android.bp
new file mode 100644
index 0000000..c3475a6
--- /dev/null
+++ b/light/2.0/vts/functional/Android.bp
@@ -0,0 +1,32 @@
+//
+// Copyright (C) 2016 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: "light_hidl_hal_test",
+ gtest: true,
+ srcs: ["light_hidl_hal_test.cpp"],
+ shared_libs: [
+ "liblog",
+ "libutils",
+ "android.hardware.light@2.0",
+ ],
+ static_libs: ["libgtest"],
+ cflags: [
+ "-O0",
+ "-g",
+ ],
+}
+
diff --git a/light/2.0/vts/functional/light_hidl_hal_test.cpp b/light/2.0/vts/functional/light_hidl_hal_test.cpp
new file mode 100644
index 0000000..db67467
--- /dev/null
+++ b/light/2.0/vts/functional/light_hidl_hal_test.cpp
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2016 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 "light_hidl_hal_test"
+
+#include <android-base/logging.h>
+#include <android/hardware/light/2.0/ILight.h>
+#include <android/hardware/light/2.0/types.h>
+#include <gtest/gtest.h>
+#include <unistd.h>
+
+using ::android::hardware::light::V2_0::Brightness;
+using ::android::hardware::light::V2_0::Flash;
+using ::android::hardware::light::V2_0::ILight;
+using ::android::hardware::light::V2_0::LightState;
+using ::android::hardware::light::V2_0::Status;
+using ::android::hardware::light::V2_0::Type;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::sp;
+
+#define LIGHT_SERVICE_NAME "light"
+
+#define EXPECT_OK(ret) EXPECT_TRUE(ret.getStatus().isOk())
+
+// The main test class for VIBRATOR HIDL HAL.
+class LightHidlTest : public ::testing::Test {
+public:
+ virtual void SetUp() override {
+ light = ILight::getService(LIGHT_SERVICE_NAME);
+
+ ASSERT_NE(light, nullptr);
+ ALOGI("Test is remote: %d", light->isRemote());
+ }
+
+ virtual void TearDown() override {}
+
+ sp<ILight> light;
+};
+
+// A class for test environment setup (kept since this file is a template).
+class LightHidlEnvironment : public ::testing::Environment {
+public:
+ virtual void SetUp() {}
+ virtual void TearDown() {}
+
+private:
+};
+
+const static LightState kWhite = {
+ .color = 0xFFFFFFFF,
+ .flashMode = Flash::TIMED,
+ .flashOnMs = 100,
+ .flashOffMs = 50,
+ .brightnessMode = Brightness::USER,
+};
+
+const static LightState kOff = {
+ .color = 0x00000000,
+ .flashMode = Flash::NONE,
+ .flashOnMs = 0,
+ .flashOffMs = 0,
+ .brightnessMode = Brightness::USER,
+};
+
+/**
+ * Ensure all lights which are reported as supported work.
+ */
+TEST_F(LightHidlTest, TestSupported) {
+ EXPECT_OK(light->getSupportedTypes([this](const hidl_vec<Type> &supportedTypes) {
+ for (size_t i = 0; i < supportedTypes.size(); i++) {
+ EXPECT_OK(light->setLight(supportedTypes[i], kWhite));
+ }
+
+ usleep(500000);
+
+ for (size_t i = 0; i < supportedTypes.size(); i++) {
+ EXPECT_OK(light->setLight(supportedTypes[i], kOff));
+ }
+ }));
+}
+
+int main(int argc, char **argv) {
+ ::testing::AddGlobalTestEnvironment(new LightHidlEnvironment);
+ ::testing::InitGoogleTest(&argc, argv);
+ int status = RUN_ALL_TESTS();
+ ALOGI("Test result = %d", status);
+ return status;
+}
diff --git a/light/Android.bp b/light/Android.bp
index c12cd4f..8d2c986 100644
--- a/light/Android.bp
+++ b/light/Android.bp
@@ -1,4 +1,5 @@
// This is an autogenerated file, do not edit.
subdirs = [
"2.0",
+ "2.0/vts/functional",
]
diff --git a/media/1.0/Android.bp b/media/1.0/Android.bp
index 5a63cac..0bc002f 100644
--- a/media/1.0/Android.bp
+++ b/media/1.0/Android.bp
@@ -33,6 +33,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
"android.hardware.graphics.common@1.0",
diff --git a/media/omx/1.0/Android.bp b/media/omx/1.0/Android.bp
index b8afb98..23b09a8b 100644
--- a/media/omx/1.0/Android.bp
+++ b/media/omx/1.0/Android.bp
@@ -73,6 +73,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
"android.hardware.graphics.common@1.0",
diff --git a/memtrack/1.0/Android.bp b/memtrack/1.0/Android.bp
index c5727c1..f942367 100644
--- a/memtrack/1.0/Android.bp
+++ b/memtrack/1.0/Android.bp
@@ -41,6 +41,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/nfc/1.0/Android.bp b/nfc/1.0/Android.bp
index 9584636..9b8b095 100644
--- a/nfc/1.0/Android.bp
+++ b/nfc/1.0/Android.bp
@@ -49,6 +49,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/nfc/1.0/default/Nfc.h b/nfc/1.0/default/Nfc.h
index e596495..5257636 100644
--- a/nfc/1.0/default/Nfc.h
+++ b/nfc/1.0/default/Nfc.h
@@ -1,5 +1,5 @@
-#ifndef HIDL_GENERATED_android_hardware_nfc_V1_0_Nfc_H_
-#define HIDL_GENERATED_android_hardware_nfc_V1_0_Nfc_H_
+#ifndef ANDROID_HARDWARE_NFC_V1_0_NFC_H
+#define ANDROID_HARDWARE_NFC_V1_0_NFC_H
#include <android/hardware/nfc/1.0/INfc.h>
#include <hidl/Status.h>
@@ -56,4 +56,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_nfc_V1_0_Nfc_H_
+#endif // ANDROID_HARDWARE_NFC_V1_0_NFC_H
diff --git a/power/1.0/Android.bp b/power/1.0/Android.bp
index 777bb85..a487377 100644
--- a/power/1.0/Android.bp
+++ b/power/1.0/Android.bp
@@ -41,6 +41,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/radio/1.0/Android.bp b/radio/1.0/Android.bp
index 1bb8fe5..8da9716 100644
--- a/radio/1.0/Android.bp
+++ b/radio/1.0/Android.bp
@@ -73,6 +73,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/sensors/1.0/Android.bp b/sensors/1.0/Android.bp
index 7f25a62..9d440a7 100644
--- a/sensors/1.0/Android.bp
+++ b/sensors/1.0/Android.bp
@@ -41,6 +41,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/soundtrigger/2.0/Android.bp b/soundtrigger/2.0/Android.bp
index 4eab0bf..5cb1dea 100644
--- a/soundtrigger/2.0/Android.bp
+++ b/soundtrigger/2.0/Android.bp
@@ -49,6 +49,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
"android.hardware.audio.common@2.0",
diff --git a/tests/bar/1.0/Android.bp b/tests/bar/1.0/Android.bp
index 08947ad..82e55ca 100644
--- a/tests/bar/1.0/Android.bp
+++ b/tests/bar/1.0/Android.bp
@@ -45,6 +45,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
"android.hardware.tests.foo@1.0",
diff --git a/tests/bar/1.0/default/Bar.h b/tests/bar/1.0/default/Bar.h
index 29eedec..d23c1e1 100644
--- a/tests/bar/1.0/default/Bar.h
+++ b/tests/bar/1.0/default/Bar.h
@@ -1,5 +1,5 @@
-#ifndef HIDL_GENERATED_android_hardware_tests_bar_V1_0_Bar_H_
-#define HIDL_GENERATED_android_hardware_tests_bar_V1_0_Bar_H_
+#ifndef ANDROID_HARDWARE_TESTS_BAR_V1_0_BAR_H
+#define ANDROID_HARDWARE_TESTS_BAR_V1_0_BAR_H
#include <android/hardware/tests/bar/1.0/IBar.h>
#include <hidl/Status.h>
@@ -79,4 +79,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_tests_bar_V1_0_Bar_H_
+#endif // ANDROID_HARDWARE_TESTS_BAR_V1_0_BAR_H
diff --git a/tests/bar/1.0/default/ImportTypes.h b/tests/bar/1.0/default/ImportTypes.h
index b43be70..59c7bea 100644
--- a/tests/bar/1.0/default/ImportTypes.h
+++ b/tests/bar/1.0/default/ImportTypes.h
@@ -1,5 +1,5 @@
-#ifndef HIDL_GENERATED_android_hardware_tests_bar_V1_0_ImportTypes_H_
-#define HIDL_GENERATED_android_hardware_tests_bar_V1_0_ImportTypes_H_
+#ifndef ANDROID_HARDWARE_TESTS_BAR_V1_0_IMPORTTYPES_H
+#define ANDROID_HARDWARE_TESTS_BAR_V1_0_IMPORTTYPES_H
#include <android/hardware/tests/bar/1.0/IImportTypes.h>
#include <hidl/Status.h>
@@ -33,4 +33,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_tests_bar_V1_0_ImportTypes_H_
+#endif // ANDROID_HARDWARE_TESTS_BAR_V1_0_IMPORTTYPES_H
diff --git a/tests/baz/1.0/Android.bp b/tests/baz/1.0/Android.bp
index 98d3e84..9c5e88c 100644
--- a/tests/baz/1.0/Android.bp
+++ b/tests/baz/1.0/Android.bp
@@ -57,6 +57,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/tests/expression/1.0/Android.bp b/tests/expression/1.0/Android.bp
index 60754d3..064bbf9 100644
--- a/tests/expression/1.0/Android.bp
+++ b/tests/expression/1.0/Android.bp
@@ -45,6 +45,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/tests/foo/1.0/Android.bp b/tests/foo/1.0/Android.bp
index 4064e74..85c7a94 100644
--- a/tests/foo/1.0/Android.bp
+++ b/tests/foo/1.0/Android.bp
@@ -73,6 +73,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/tests/foo/1.0/default/Foo.h b/tests/foo/1.0/default/Foo.h
index 703c210..84629db 100644
--- a/tests/foo/1.0/default/Foo.h
+++ b/tests/foo/1.0/default/Foo.h
@@ -1,5 +1,5 @@
-#ifndef HIDL_GENERATED_android_hardware_tests_foo_V1_0_Foo_H_
-#define HIDL_GENERATED_android_hardware_tests_foo_V1_0_Foo_H_
+#ifndef ANDROID_HARDWARE_TESTS_FOO_V1_0_FOO_H
+#define ANDROID_HARDWARE_TESTS_FOO_V1_0_FOO_H
#include <android/hardware/tests/foo/1.0/IFoo.h>
#include <hidl/Status.h>
@@ -71,4 +71,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_tests_foo_V1_0_Foo_H_
+#endif // ANDROID_HARDWARE_TESTS_FOO_V1_0_FOO_H
diff --git a/tests/foo/1.0/default/FooCallback.h b/tests/foo/1.0/default/FooCallback.h
index 00233b5..3164a9d 100644
--- a/tests/foo/1.0/default/FooCallback.h
+++ b/tests/foo/1.0/default/FooCallback.h
@@ -1,5 +1,5 @@
-#ifndef HIDL_GENERATED_android_hardware_tests_foo_V1_0_FooCallback_H_
-#define HIDL_GENERATED_android_hardware_tests_foo_V1_0_FooCallback_H_
+#ifndef ANDROID_HARDWARE_TESTS_FOO_V1_0_FOOCALLBACK_H
+#define ANDROID_HARDWARE_TESTS_FOO_V1_0_FOOCALLBACK_H
#include <android/hardware/tests/foo/1.0/IFooCallback.h>
#include <hidl/Status.h>
@@ -43,4 +43,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_tests_foo_V1_0_FooCallback_H_
+#endif // ANDROID_HARDWARE_TESTS_FOO_V1_0_FOOCALLBACK_H
diff --git a/tests/inheritance/1.0/Android.bp b/tests/inheritance/1.0/Android.bp
index cfd10ac..7ddaa7e 100644
--- a/tests/inheritance/1.0/Android.bp
+++ b/tests/inheritance/1.0/Android.bp
@@ -61,6 +61,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/tests/inheritance/1.0/default/Child.h b/tests/inheritance/1.0/default/Child.h
index 0d34e83..268dfeb 100644
--- a/tests/inheritance/1.0/default/Child.h
+++ b/tests/inheritance/1.0/default/Child.h
@@ -1,5 +1,5 @@
-#ifndef HIDL_GENERATED_android_hardware_tests_inheritance_V1_0_Child_H_
-#define HIDL_GENERATED_android_hardware_tests_inheritance_V1_0_Child_H_
+#ifndef ANDROID_HARDWARE_TESTS_INHERITANCE_V1_0_CHILD_H
+#define ANDROID_HARDWARE_TESTS_INHERITANCE_V1_0_CHILD_H
#include <android/hardware/tests/inheritance/1.0/IChild.h>
#include <hidl/Status.h>
@@ -41,4 +41,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_tests_inheritance_V1_0_Child_H_
+#endif // ANDROID_HARDWARE_TESTS_INHERITANCE_V1_0_CHILD_H
diff --git a/tests/inheritance/1.0/default/Fetcher.h b/tests/inheritance/1.0/default/Fetcher.h
index d389853..da9b153 100644
--- a/tests/inheritance/1.0/default/Fetcher.h
+++ b/tests/inheritance/1.0/default/Fetcher.h
@@ -1,5 +1,5 @@
-#ifndef HIDL_GENERATED_android_hardware_tests_inheritance_V1_0_Fetcher_H_
-#define HIDL_GENERATED_android_hardware_tests_inheritance_V1_0_Fetcher_H_
+#ifndef ANDROID_HARDWARE_TESTS_INHERITANCE_V1_0_FETCHER_H
+#define ANDROID_HARDWARE_TESTS_INHERITANCE_V1_0_FETCHER_H
#include "Child.h"
#include <android/hardware/tests/inheritance/1.0/IFetcher.h>
@@ -42,4 +42,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_tests_inheritance_V1_0_Fetcher_H_
+#endif // ANDROID_HARDWARE_TESTS_INHERITANCE_V1_0_FETCHER_H
diff --git a/tests/inheritance/1.0/default/Grandparent.h b/tests/inheritance/1.0/default/Grandparent.h
index e1113bf..5458b01 100644
--- a/tests/inheritance/1.0/default/Grandparent.h
+++ b/tests/inheritance/1.0/default/Grandparent.h
@@ -1,5 +1,5 @@
-#ifndef HIDL_GENERATED_android_hardware_tests_inheritance_V1_0_Grandparent_H_
-#define HIDL_GENERATED_android_hardware_tests_inheritance_V1_0_Grandparent_H_
+#ifndef ANDROID_HARDWARE_TESTS_INHERITANCE_V1_0_GRANDPARENT_H
+#define ANDROID_HARDWARE_TESTS_INHERITANCE_V1_0_GRANDPARENT_H
#include <android/hardware/tests/inheritance/1.0/IGrandparent.h>
#include <hidl/Status.h>
@@ -34,4 +34,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_tests_inheritance_V1_0_Grandparent_H_
+#endif // ANDROID_HARDWARE_TESTS_INHERITANCE_V1_0_GRANDPARENT_H
diff --git a/tests/inheritance/1.0/default/Parent.h b/tests/inheritance/1.0/default/Parent.h
index 2e07fdc..48085fd 100644
--- a/tests/inheritance/1.0/default/Parent.h
+++ b/tests/inheritance/1.0/default/Parent.h
@@ -1,5 +1,5 @@
-#ifndef HIDL_GENERATED_android_hardware_tests_inheritance_V1_0_Parent_H_
-#define HIDL_GENERATED_android_hardware_tests_inheritance_V1_0_Parent_H_
+#ifndef ANDROID_HARDWARE_TESTS_INHERITANCE_V1_0_PARENT_H
+#define ANDROID_HARDWARE_TESTS_INHERITANCE_V1_0_PARENT_H
#include <android/hardware/tests/inheritance/1.0/IParent.h>
#include <hidl/Status.h>
@@ -37,4 +37,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_tests_inheritance_V1_0_Parent_H_
+#endif // ANDROID_HARDWARE_TESTS_INHERITANCE_V1_0_PARENT_H
diff --git a/tests/libhwbinder/1.0/Android.bp b/tests/libhwbinder/1.0/Android.bp
index ca02cc7..a828d55 100644
--- a/tests/libhwbinder/1.0/Android.bp
+++ b/tests/libhwbinder/1.0/Android.bp
@@ -37,6 +37,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/tests/libhwbinder/1.0/default/Benchmark.h b/tests/libhwbinder/1.0/default/Benchmark.h
index 454fdf2..74b3745 100644
--- a/tests/libhwbinder/1.0/default/Benchmark.h
+++ b/tests/libhwbinder/1.0/default/Benchmark.h
@@ -1,5 +1,5 @@
-#ifndef HIDL_GENERATED_android_hardware_benchmark_V1_0_Benchmark_H_
-#define HIDL_GENERATED_android_hardware_benchmark_V1_0_Benchmark_H_
+#ifndef ANDROID_HARDWARE_BENCHMARK_V1_0_BENCHMARK_H
+#define ANDROID_HARDWARE_BENCHMARK_V1_0_BENCHMARK_H
#include <android/hardware/tests/libhwbinder/1.0/IBenchmark.h>
#include <hidl/Status.h>
@@ -28,4 +28,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_benchmark_V1_0_Benchmark_H_
+#endif // ANDROID_HARDWARE_BENCHMARK_V1_0_BENCHMARK_H
diff --git a/tests/msgq/1.0/Android.bp b/tests/msgq/1.0/Android.bp
index 914c93f..1b35e14 100644
--- a/tests/msgq/1.0/Android.bp
+++ b/tests/msgq/1.0/Android.bp
@@ -37,6 +37,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/tests/pointer/1.0/Android.bp b/tests/pointer/1.0/Android.bp
index bbd0eaa..f7ae4ae 100644
--- a/tests/pointer/1.0/Android.bp
+++ b/tests/pointer/1.0/Android.bp
@@ -45,6 +45,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/tests/pointer/1.0/default/Graph.h b/tests/pointer/1.0/default/Graph.h
index cbd5a8a..03bd163 100644
--- a/tests/pointer/1.0/default/Graph.h
+++ b/tests/pointer/1.0/default/Graph.h
@@ -1,5 +1,5 @@
-#ifndef HIDL_GENERATED_android_hardware_tests_pointer_V1_0_Graph_H_
-#define HIDL_GENERATED_android_hardware_tests_pointer_V1_0_Graph_H_
+#ifndef ANDROID_HARDWARE_TESTS_POINTER_V1_0_GRAPH_H
+#define ANDROID_HARDWARE_TESTS_POINTER_V1_0_GRAPH_H
#include <android/hardware/tests/pointer/1.0/IGraph.h>
#include <hidl/Status.h>
@@ -44,4 +44,4 @@
} // namespace hardware
} // namespace android
-#endif // HIDL_GENERATED_android_hardware_tests_pointer_V1_0_Graph_H_
+#endif // ANDROID_HARDWARE_TESTS_POINTER_V1_0_GRAPH_H
diff --git a/tests/pointer/1.0/default/Pointer.h b/tests/pointer/1.0/default/Pointer.h
index 41d96fd..87b0f56 100644
--- a/tests/pointer/1.0/default/Pointer.h
+++ b/tests/pointer/1.0/default/Pointer.h
@@ -1,5 +1,5 @@
-#ifndef HIDL_GENERATED_android_hardware_tests_pointer_V1_0_Pointer_H_
-#define HIDL_GENERATED_android_hardware_tests_pointer_V1_0_Pointer_H_
+#ifndef ANDROID_HARDWARE_TESTS_POINTER_V1_0_POINTER_H
+#define ANDROID_HARDWARE_TESTS_POINTER_V1_0_POINTER_H
#include <android/hardware/tests/pointer/1.0/IPointer.h>
#include <android-base/logging.h>
@@ -345,4 +345,4 @@
#undef PUSH_ERROR_IF
-#endif // HIDL_GENERATED_android_hardware_tests_pointer_V1_0_Pointer_H_
+#endif // ANDROID_HARDWARE_TESTS_POINTER_V1_0_POINTER_H
diff --git a/thermal/1.0/Android.bp b/thermal/1.0/Android.bp
index 3b6ef06..c950aac 100644
--- a/thermal/1.0/Android.bp
+++ b/thermal/1.0/Android.bp
@@ -41,6 +41,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/tv/cec/1.0/Android.bp b/tv/cec/1.0/Android.bp
index 02a4247..24e9d57 100644
--- a/tv/cec/1.0/Android.bp
+++ b/tv/cec/1.0/Android.bp
@@ -49,6 +49,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/tv/input/1.0/Android.bp b/tv/input/1.0/Android.bp
index 7f9bb7c..58c1c5a 100644
--- a/tv/input/1.0/Android.bp
+++ b/tv/input/1.0/Android.bp
@@ -49,6 +49,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
"android.hardware.audio.common@2.0",
diff --git a/vehicle/2.0/Android.bp b/vehicle/2.0/Android.bp
index 09025b9..3515896 100644
--- a/vehicle/2.0/Android.bp
+++ b/vehicle/2.0/Android.bp
@@ -49,6 +49,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/vibrator/1.0/Android.bp b/vibrator/1.0/Android.bp
index bd88241..7559389 100644
--- a/vibrator/1.0/Android.bp
+++ b/vibrator/1.0/Android.bp
@@ -41,6 +41,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/vr/1.0/Android.bp b/vr/1.0/Android.bp
index 5cbd333..8582a11 100644
--- a/vr/1.0/Android.bp
+++ b/vr/1.0/Android.bp
@@ -37,6 +37,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/wifi/1.0/Android.bp b/wifi/1.0/Android.bp
index d353e4b..bbe75eb 100644
--- a/wifi/1.0/Android.bp
+++ b/wifi/1.0/Android.bp
@@ -137,6 +137,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],
diff --git a/wifi/supplicant/1.0/Android.bp b/wifi/supplicant/1.0/Android.bp
index 0f399a0..e66f973 100644
--- a/wifi/supplicant/1.0/Android.bp
+++ b/wifi/supplicant/1.0/Android.bp
@@ -129,6 +129,7 @@
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "liblog",
"libutils",
"libcutils",
],