summaryrefslogtreecommitdiff
authorTellen Yu <tellen.yu@amlogic.com>2017-08-29 11:31:35 (GMT)
committer Tellen Yu <tellen.yu@amlogic.com>2017-08-29 11:35:10 (GMT)
commitb13ab7d4cd7d9721235bdfae2f9e3c45788146a2 (patch)
tree7909c044c82993b642e7fa769d0447200479c66f
parentfaa540bbee27cf10c9d63f09dee6a9dcc328c211 (diff)
downloadinterfaces-b13ab7d4cd7d9721235bdfae2f9e3c45788146a2.zip
interfaces-b13ab7d4cd7d9721235bdfae2f9e3c45788146a2.tar.gz
interfaces-b13ab7d4cd7d9721235bdfae2f9e3c45788146a2.tar.bz2
hidl: add systemcontrl hwbinder service [4/6]
PD# NONE add ISystemControl hwbinder service, be used for other hidl process Change-Id: I3cdca8609fd3bc92d5cf691cf9718fa4542b6ee1
Diffstat
-rw-r--r--Android.bp5
-rw-r--r--systemcontrol/1.0/Android.bp90
-rw-r--r--systemcontrol/1.0/Android.mk118
-rw-r--r--systemcontrol/1.0/ISystemControl.hal65
-rw-r--r--systemcontrol/1.0/types.hal22
-rw-r--r--systemcontrol/1.0/vts/functional/Android.bp35
-rw-r--r--systemcontrol/1.0/vts/functional/VtsSystemControlV1_0TargetTest.cpp112
-rw-r--r--systemcontrol/Android.bp5
-rw-r--r--test/1.0/Android.bp86
-rw-r--r--test/1.0/Android.mk76
-rw-r--r--test/1.0/IVendorTest.hal26
-rw-r--r--test/Android.bp4
-rwxr-xr-xupdate-base.sh13
-rwxr-xr-xupdate-makefiles.sh16
14 files changed, 673 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..c5fb019
--- a/dev/null
+++ b/Android.bp
@@ -0,0 +1,5 @@
+// This is an autogenerated file, do not edit.
+subdirs = [
+ "systemcontrol/1.0",
+ "systemcontrol/1.0/vts/functional",
+]
diff --git a/systemcontrol/1.0/Android.bp b/systemcontrol/1.0/Android.bp
new file mode 100644
index 0000000..fa39261
--- a/dev/null
+++ b/systemcontrol/1.0/Android.bp
@@ -0,0 +1,90 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+ name: "vendor.amlogic.hardware.systemcontrol@1.0_hal",
+ srcs: [
+ "types.hal",
+ "ISystemControl.hal",
+ ],
+}
+
+genrule {
+ name: "vendor.amlogic.hardware.systemcontrol@1.0_genc++",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -rvendor.amlogic.hardware:vendor/amlogic/interfaces -randroid.hidl:system/libhidl/transport vendor.amlogic.hardware.systemcontrol@1.0",
+ srcs: [
+ ":vendor.amlogic.hardware.systemcontrol@1.0_hal",
+ ],
+ out: [
+ "vendor/amlogic/hardware/systemcontrol/1.0/types.cpp",
+ "vendor/amlogic/hardware/systemcontrol/1.0/SystemControlAll.cpp",
+ ],
+}
+
+genrule {
+ name: "vendor.amlogic.hardware.systemcontrol@1.0_genc++_headers",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -rvendor.amlogic.hardware:vendor/amlogic/interfaces -randroid.hidl:system/libhidl/transport vendor.amlogic.hardware.systemcontrol@1.0",
+ srcs: [
+ ":vendor.amlogic.hardware.systemcontrol@1.0_hal",
+ ],
+ out: [
+ "vendor/amlogic/hardware/systemcontrol/1.0/types.h",
+ "vendor/amlogic/hardware/systemcontrol/1.0/hwtypes.h",
+ "vendor/amlogic/hardware/systemcontrol/1.0/ISystemControl.h",
+ "vendor/amlogic/hardware/systemcontrol/1.0/IHwSystemControl.h",
+ "vendor/amlogic/hardware/systemcontrol/1.0/BnHwSystemControl.h",
+ "vendor/amlogic/hardware/systemcontrol/1.0/BpHwSystemControl.h",
+ "vendor/amlogic/hardware/systemcontrol/1.0/BsSystemControl.h",
+ ],
+}
+
+cc_library_shared {
+ name: "vendor.amlogic.hardware.systemcontrol@1.0",
+ defaults: ["hidl-module-defaults"],
+ generated_sources: ["vendor.amlogic.hardware.systemcontrol@1.0_genc++"],
+ generated_headers: ["vendor.amlogic.hardware.systemcontrol@1.0_genc++_headers"],
+ export_generated_headers: ["vendor.amlogic.hardware.systemcontrol@1.0_genc++_headers"],
+ vendor_available: true,
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "android.hidl.base@1.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hidl.base@1.0",
+ ],
+}
+
+cc_library_shared {
+ name: "vendor.amlogic.hardware.systemcontrol@1.0_vendor",
+ defaults: ["hidl-module-defaults"],
+ generated_sources: ["vendor.amlogic.hardware.systemcontrol@1.0_genc++"],
+ generated_headers: ["vendor.amlogic.hardware.systemcontrol@1.0_genc++_headers"],
+ export_generated_headers: ["vendor.amlogic.hardware.systemcontrol@1.0_genc++_headers"],
+ vendor: true,
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "android.hidl.base@1.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hidl.base@1.0",
+ ],
+}
diff --git a/systemcontrol/1.0/Android.mk b/systemcontrol/1.0/Android.mk
new file mode 100644
index 0000000..d068a0d
--- a/dev/null
+++ b/systemcontrol/1.0/Android.mk
@@ -0,0 +1,118 @@
+# This file is autogenerated by hidl-gen. Do not edit manually.
+
+LOCAL_PATH := $(call my-dir)
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := vendor.amlogic.hardware.systemcontrol-V1.0-java
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_JAVA_LIBRARIES := \
+ android.hidl.base-V1.0-java \
+
+
+#
+# Build types.hal (Result)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/systemcontrol/V1_0/Result.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ vendor.amlogic.hardware.systemcontrol@1.0::types.Result
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISystemControl.hal
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/systemcontrol/V1_0/ISystemControl.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISystemControl.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ vendor.amlogic.hardware.systemcontrol@1.0::ISystemControl
+
+$(GEN): $(LOCAL_PATH)/ISystemControl.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_JAVA_LIBRARY)
+
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := vendor.amlogic.hardware.systemcontrol-V1.0-java-static
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+ android.hidl.base-V1.0-java-static \
+
+
+#
+# Build types.hal (Result)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/systemcontrol/V1_0/Result.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ vendor.amlogic.hardware.systemcontrol@1.0::types.Result
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISystemControl.hal
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/systemcontrol/V1_0/ISystemControl.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISystemControl.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ vendor.amlogic.hardware.systemcontrol@1.0::ISystemControl
+
+$(GEN): $(LOCAL_PATH)/ISystemControl.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/systemcontrol/1.0/ISystemControl.hal b/systemcontrol/1.0/ISystemControl.hal
new file mode 100644
index 0000000..7c490c4
--- a/dev/null
+++ b/systemcontrol/1.0/ISystemControl.hal
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2017 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 vendor.amlogic.hardware.systemcontrol@1.0;
+
+
+interface ISystemControl {
+ /**
+ * get support hdmi display mode list
+ * @param supportDispModes return data
+ *
+ * @return result OK if get data
+ * FAIL if do not get data
+ *
+ */
+ getSupportDispModeList()
+ generates (Result result, vec<string> supportDispModes);
+
+ /**
+ * get active hdmi display mode
+ * @param activeDispMode active mode
+ *
+ * @return result OK if get data
+ * FAIL if do not get data
+ *
+ */
+ getActiveDispMode()
+ generates (Result result, string activeDispMode);
+
+ /**
+ * set active hdmi display mode
+ * @param activeDispMode active mode
+ *
+ * @return result OK, set success
+ * FAIL, set fail
+ *
+ */
+ setActiveDispMode(string activeDispMode)
+ generates (Result result);
+
+ /**
+ * get hdmi hdcp authenticate success or fail
+ * @param none
+ *
+ * @return result OK, authenticate success
+ * FAIL, authenticate fail
+ *
+ */
+ isHDCPTxAuthSuccess()
+ generates (Result result);
+
+};
diff --git a/systemcontrol/1.0/types.hal b/systemcontrol/1.0/types.hal
new file mode 100644
index 0000000..d02d59f
--- a/dev/null
+++ b/systemcontrol/1.0/types.hal
@@ -0,0 +1,22 @@
+/*
+ * 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 vendor.amlogic.hardware.systemcontrol@1.0;
+
+enum Result : uint32_t {
+ OK, // Success
+ FAIL, // Failure, unknown reason
+}; \ No newline at end of file
diff --git a/systemcontrol/1.0/vts/functional/Android.bp b/systemcontrol/1.0/vts/functional/Android.bp
new file mode 100644
index 0000000..eb03620
--- a/dev/null
+++ b/systemcontrol/1.0/vts/functional/Android.bp
@@ -0,0 +1,35 @@
+//
+// 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: "VtsSystemControlV1_0TargetTest",
+ srcs: ["VtsSystemControlV1_0TargetTest.cpp"],
+ shared_libs: [
+ "vendor.amlogic.hardware.systemcontrol@1.0",
+ "libhidlbase",
+ "libhidltransport",
+ "liblog",
+ "libutils",
+ ],
+ static_libs: ["VtsHalHidlTargetTestBase"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-O0",
+ "-g",
+ ]
+}
+
diff --git a/systemcontrol/1.0/vts/functional/VtsSystemControlV1_0TargetTest.cpp b/systemcontrol/1.0/vts/functional/VtsSystemControlV1_0TargetTest.cpp
new file mode 100644
index 0000000..09abac4
--- a/dev/null
+++ b/systemcontrol/1.0/vts/functional/VtsSystemControlV1_0TargetTest.cpp
@@ -0,0 +1,112 @@
+/*
+ * 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 "VtsSystemControlV1_0TargetTest"
+
+#include <vendor/amlogic/hardware/systemcontrol/1.0/ISystemControl.h>
+#include <vendor/amlogic/hardware/systemcontrol/1.0/types.h>
+#include <log/log.h>
+#include <VtsHalHidlTargetTestBase.h>
+
+#include <atomic>
+#include <chrono>
+#include <cmath>
+#include <inttypes.h>
+#include <thread>
+
+using ::vendor::amlogic::hardware::systemcontrol::V1_0::ISystemControl;
+using ::vendor::amlogic::hardware::systemcontrol::V1_0::Result;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::hidl_string;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::sp;
+
+
+#define ASSERT_OK(ret) ASSERT_TRUE((ret).isOk())
+
+class SystemControlTest : public ::testing::VtsHalHidlTargetTestBase {
+public:
+ ~SystemControlTest() {}
+
+ virtual void SetUp() override {
+ service = ::testing::VtsHalHidlTargetTestBase::getService<ISystemControl>();
+
+ ASSERT_NE(service, nullptr);
+ }
+
+ virtual void TearDown() override {
+ }
+
+ sp<ISystemControl> service;
+};
+
+/**
+ * No vsync events should happen unless you explicitly request one.
+ */
+TEST_F(SystemControlTest, getSupportDispModeList) {
+ service->getSupportDispModeList([](const Result &ret, const hidl_vec<hidl_string>& modeList) {
+ if (Result::OK == ret) {
+ }
+
+ hidl_vec<hidl_string> list = modeList;
+ list = list;
+ });
+}
+
+/**
+ * Vsync rate respects count.
+ */
+TEST_F(SystemControlTest, getActiveDispMode) {
+ service->getActiveDispMode([](const Result &ret, const hidl_string& mode) {
+ if (Result::OK == ret) {
+ }
+ hidl_string m = mode;
+ m = m;
+ });
+
+ ALOGE("SystemControlTest getActiveDispMode");
+}
+
+/**
+ * Open/close should return proper error results.
+ */
+TEST_F(SystemControlTest, setActiveDispMode) {
+ hidl_string mode("1080p60hz");
+ Result ret = service->setActiveDispMode(mode);
+ if (Result::OK == ret) {
+ }
+
+ ALOGE("SystemControlTest setActiveDispMode");
+}
+
+/**
+ * Vsync must be given a value that is >= 0.
+ */
+TEST_F(SystemControlTest, isHDCPTxAuthSuccess) {
+ Result ret = service->isHDCPTxAuthSuccess();
+ if (Result::OK == ret) {
+ }
+
+ ALOGE("SystemControlTest isHDCPTxAuthSuccess");
+}
+
+int main(int argc, char **argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+ int status = RUN_ALL_TESTS();
+ ALOGE("Test status = %d", status);
+ return status;
+}
diff --git a/systemcontrol/Android.bp b/systemcontrol/Android.bp
new file mode 100644
index 0000000..33f70eb
--- a/dev/null
+++ b/systemcontrol/Android.bp
@@ -0,0 +1,5 @@
+// This is an autogenerated file, do not edit.
+subdirs = [
+ "1.0",
+ "1.0/vts/functional",
+]
diff --git a/test/1.0/Android.bp b/test/1.0/Android.bp
new file mode 100644
index 0000000..07de974
--- a/dev/null
+++ b/test/1.0/Android.bp
@@ -0,0 +1,86 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+ name: "vendor.amlogic.hardware.test@1.0_hal",
+ srcs: [
+ "IVendorTest.hal",
+ ],
+}
+
+genrule {
+ name: "vendor.amlogic.hardware.test@1.0_genc++",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hidl:system/libhidl/transport -rvendor.amlogic.hardware:vendor/amlogic/interfaces vendor.amlogic.hardware.test@1.0",
+ srcs: [
+ ":vendor.amlogic.hardware.test@1.0_hal",
+ ],
+ out: [
+ "vendor/amlogic/hardware/test/1.0/VendorTestAll.cpp",
+ ],
+}
+
+genrule {
+ name: "vendor.amlogic.hardware.test@1.0_genc++_headers",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hidl:system/libhidl/transport -rvendor.amlogic.hardware:vendor/amlogic/interfaces vendor.amlogic.hardware.test@1.0",
+ srcs: [
+ ":vendor.amlogic.hardware.test@1.0_hal",
+ ],
+ out: [
+ "vendor/amlogic/hardware/test/1.0/IVendorTest.h",
+ "vendor/amlogic/hardware/test/1.0/IHwVendorTest.h",
+ "vendor/amlogic/hardware/test/1.0/BnHwVendorTest.h",
+ "vendor/amlogic/hardware/test/1.0/BpHwVendorTest.h",
+ "vendor/amlogic/hardware/test/1.0/BsVendorTest.h",
+ ],
+}
+
+cc_library_shared {
+ name: "vendor.amlogic.hardware.test@1.0",
+ defaults: ["hidl-module-defaults"],
+ generated_sources: ["vendor.amlogic.hardware.test@1.0_genc++"],
+ generated_headers: ["vendor.amlogic.hardware.test@1.0_genc++_headers"],
+ export_generated_headers: ["vendor.amlogic.hardware.test@1.0_genc++_headers"],
+ vendor_available: true,
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "android.hidl.base@1.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hidl.base@1.0",
+ ],
+}
+
+cc_library_shared {
+ name: "vendor.amlogic.hardware.test@1.0_vendor",
+ defaults: ["hidl-module-defaults"],
+ generated_sources: ["vendor.amlogic.hardware.test@1.0_genc++"],
+ generated_headers: ["vendor.amlogic.hardware.test@1.0_genc++_headers"],
+ export_generated_headers: ["vendor.amlogic.hardware.test@1.0_genc++_headers"],
+ vendor: true,
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "android.hidl.base@1.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hidl.base@1.0",
+ ],
+}
diff --git a/test/1.0/Android.mk b/test/1.0/Android.mk
new file mode 100644
index 0000000..6a13a7f
--- a/dev/null
+++ b/test/1.0/Android.mk
@@ -0,0 +1,76 @@
+# This file is autogenerated by hidl-gen. Do not edit manually.
+
+LOCAL_PATH := $(call my-dir)
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := vendor.amlogic.hardware.test-V1.0-java
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_JAVA_LIBRARIES := \
+ android.hidl.base-V1.0-java \
+
+
+#
+# Build IVendorTest.hal
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/test/V1_0/IVendorTest.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IVendorTest.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.test@1.0::IVendorTest
+
+$(GEN): $(LOCAL_PATH)/IVendorTest.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_JAVA_LIBRARY)
+
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := vendor.amlogic.hardware.test-V1.0-java-static
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+ android.hidl.base-V1.0-java-static \
+
+
+#
+# Build IVendorTest.hal
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/test/V1_0/IVendorTest.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IVendorTest.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.test@1.0::IVendorTest
+
+$(GEN): $(LOCAL_PATH)/IVendorTest.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/test/1.0/IVendorTest.hal b/test/1.0/IVendorTest.hal
new file mode 100644
index 0000000..cf70127
--- a/dev/null
+++ b/test/1.0/IVendorTest.hal
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2017 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 vendor.amlogic.hardware.test@1.0;
+
+
+interface IVendorTest {
+ /**
+ * Enumerate all available context hubs on the system.
+ *
+ * @return hubs list of hubs on this system.
+ */
+ getHubs() generates (string hubs);
+};
diff --git a/test/Android.bp b/test/Android.bp
new file mode 100644
index 0000000..bbb3e4b
--- a/dev/null
+++ b/test/Android.bp
@@ -0,0 +1,4 @@
+// This is an autogenerated file, do not edit.
+subdirs = [
+ "1.0",
+]
diff --git a/update-base.sh b/update-base.sh
new file mode 100755
index 0000000..882083c
--- a/dev/null
+++ b/update-base.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# WARNING: vendor-base is placed here only for testing.
+# It should typically be created elsewhere.
+
+options="-Lexport-header \
+ -r vendor.amlogic.hardware:vendor/amlogic/interfaces \
+ -r android.hidl:system/libhidl/transport\
+ -r android.hardware:hardware/interfaces"
+
+hidl-gen $options \
+ -o system/tools/hidl/test/vendor/1.0/vendor-base.h \
+ vendor.amlogic.hardware.systemcontrol@1.0 \ No newline at end of file
diff --git a/update-makefiles.sh b/update-makefiles.sh
new file mode 100755
index 0000000..a26d62d
--- a/dev/null
+++ b/update-makefiles.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+source system/tools/hidl/update-makefiles-helper.sh
+
+do_makefiles_update \
+ "vendor.amlogic.hardware:vendor/amlogic/interfaces" \
+ "android.hidl:system/libhidl/transport" \
+ "android.hardware:hardware/interfaces"
+
+#options="-r vendor.amlogic.hardware:vendor/amlogic/interfaces \
+# -r android.hidl:system/libhidl/transport \
+# -r android.hardware:hardware/interfaces"
+
+#hidl-gen -Lmakefile $options vendor.amlogic.hardware.systemcontrol@1.0;
+#hidl-gen -Landroidbp $options vendor.amlogic.hardware.systemcontrol@1.0;
+