wifi: Add keep alive packet sending functionality
am: 9a9869a759
Change-Id: Id57ae32c04224aa21bf8452c11307a6e50a45489
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/Android.mk b/audio/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/audio/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/effect/2.0/vts/Android.mk b/audio/effect/2.0/vts/Android.mk
new file mode 100644
index 0000000..abdd5bf
--- /dev/null
+++ b/audio/effect/2.0/vts/Android.mk
@@ -0,0 +1,21 @@
+#
+# 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 $(CLEAR_VARS)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/audio/effect/2.0/vts/functional/Android.mk b/audio/effect/2.0/vts/functional/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/audio/effect/2.0/vts/functional/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/effect/2.0/vts/functional/vts/Android.mk b/audio/effect/2.0/vts/functional/vts/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/audio/effect/2.0/vts/functional/vts/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/effect/2.0/vts/functional/vts/testcases/Android.mk b/audio/effect/2.0/vts/functional/vts/testcases/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/audio/effect/2.0/vts/functional/vts/testcases/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/effect/2.0/vts/functional/vts/testcases/hal/Android.mk b/audio/effect/2.0/vts/functional/vts/testcases/hal/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/audio/effect/2.0/vts/functional/vts/testcases/hal/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/effect/2.0/vts/functional/vts/testcases/hal/audio/Android.mk b/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/Android.mk b/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/Android.mk b/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target/Android.mk b/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target/Android.mk
new file mode 100644
index 0000000..fe5ea0f
--- /dev/null
+++ b/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target/Android.mk
@@ -0,0 +1,25 @@
+#
+# 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)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := HalAudioEffectHidlTargetBasicTest
+VTS_CONFIG_SRC_DIR := testcases/hal/audio/effect/hidl/target
+include test/vts/tools/build/Android.host_config.mk
diff --git a/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target/AndroidTest.xml b/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target/AndroidTest.xml
new file mode 100644
index 0000000..f0af67a
--- /dev/null
+++ b/audio/effect/2.0/vts/functional/vts/testcases/hal/audio/effect/hidl/target/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS Audio Effect HIDL HAL's basic target-side test cases">
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+ <option name="push-group" value="HidlHalTest.push" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+ <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+ <option name="test-module-name" value="HalAudioEffectHidlTargetBasicTest" />
+ <option name="binary-test-sources" value="
+ _32bit::DATA/nativetest/audio_effect_hidl_hal_test/audio_effect_hidl_hal_test,
+ _64bit::DATA/nativetest64/audio_effect_hidl_hal_test/audio_effect_hidl_hal_test,
+ "/>
+ <option name="binary-test-type" value="gtest" />
+ <option name="test-timeout" value="1m" />
+ </test>
+</configuration>
diff --git a/audio/effect/Android.mk b/audio/effect/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/audio/effect/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/benchmarks/msgq/1.0/Android.bp b/benchmarks/msgq/1.0/Android.bp
index c2c8d0e..b6f4bfd 100644
--- a/benchmarks/msgq/1.0/Android.bp
+++ b/benchmarks/msgq/1.0/Android.bp
@@ -22,8 +22,8 @@
out: [
"android/hardware/benchmarks/msgq/1.0/IBenchmarkMsgQ.h",
"android/hardware/benchmarks/msgq/1.0/IHwBenchmarkMsgQ.h",
- "android/hardware/benchmarks/msgq/1.0/BnBenchmarkMsgQ.h",
- "android/hardware/benchmarks/msgq/1.0/BpBenchmarkMsgQ.h",
+ "android/hardware/benchmarks/msgq/1.0/BnHwBenchmarkMsgQ.h",
+ "android/hardware/benchmarks/msgq/1.0/BpHwBenchmarkMsgQ.h",
"android/hardware/benchmarks/msgq/1.0/BsBenchmarkMsgQ.h",
],
}
diff --git a/bluetooth/1.0/Android.bp b/bluetooth/1.0/Android.bp
index 492e624..7928fb6 100644
--- a/bluetooth/1.0/Android.bp
+++ b/bluetooth/1.0/Android.bp
@@ -29,13 +29,13 @@
"android/hardware/bluetooth/1.0/types.h",
"android/hardware/bluetooth/1.0/IBluetoothHci.h",
"android/hardware/bluetooth/1.0/IHwBluetoothHci.h",
- "android/hardware/bluetooth/1.0/BnBluetoothHci.h",
- "android/hardware/bluetooth/1.0/BpBluetoothHci.h",
+ "android/hardware/bluetooth/1.0/BnHwBluetoothHci.h",
+ "android/hardware/bluetooth/1.0/BpHwBluetoothHci.h",
"android/hardware/bluetooth/1.0/BsBluetoothHci.h",
"android/hardware/bluetooth/1.0/IBluetoothHciCallbacks.h",
"android/hardware/bluetooth/1.0/IHwBluetoothHciCallbacks.h",
- "android/hardware/bluetooth/1.0/BnBluetoothHciCallbacks.h",
- "android/hardware/bluetooth/1.0/BpBluetoothHciCallbacks.h",
+ "android/hardware/bluetooth/1.0/BnHwBluetoothHciCallbacks.h",
+ "android/hardware/bluetooth/1.0/BpHwBluetoothHciCallbacks.h",
"android/hardware/bluetooth/1.0/BsBluetoothHciCallbacks.h",
],
}
diff --git a/boot/1.0/Android.bp b/boot/1.0/Android.bp
index 266ef4d..8e62c89 100644
--- a/boot/1.0/Android.bp
+++ b/boot/1.0/Android.bp
@@ -26,8 +26,8 @@
"android/hardware/boot/1.0/types.h",
"android/hardware/boot/1.0/IBootControl.h",
"android/hardware/boot/1.0/IHwBootControl.h",
- "android/hardware/boot/1.0/BnBootControl.h",
- "android/hardware/boot/1.0/BpBootControl.h",
+ "android/hardware/boot/1.0/BnHwBootControl.h",
+ "android/hardware/boot/1.0/BpHwBootControl.h",
"android/hardware/boot/1.0/BsBootControl.h",
],
}
diff --git a/health/Android.mk b/health/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/health/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/ir/1.0/Android.bp b/ir/1.0/Android.bp
index 9badd6f..3a8fceb 100644
--- a/ir/1.0/Android.bp
+++ b/ir/1.0/Android.bp
@@ -26,8 +26,8 @@
"android/hardware/ir/1.0/types.h",
"android/hardware/ir/1.0/IConsumerIr.h",
"android/hardware/ir/1.0/IHwConsumerIr.h",
- "android/hardware/ir/1.0/BnConsumerIr.h",
- "android/hardware/ir/1.0/BpConsumerIr.h",
+ "android/hardware/ir/1.0/BnHwConsumerIr.h",
+ "android/hardware/ir/1.0/BpHwConsumerIr.h",
"android/hardware/ir/1.0/BsConsumerIr.h",
],
}
diff --git a/light/Android.mk b/light/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/light/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/memtrack/Android.mk b/memtrack/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/memtrack/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/nfc/1.0/Android.bp b/nfc/1.0/Android.bp
index af571f3..0fda103 100644
--- a/nfc/1.0/Android.bp
+++ b/nfc/1.0/Android.bp
@@ -29,13 +29,13 @@
"android/hardware/nfc/1.0/types.h",
"android/hardware/nfc/1.0/INfc.h",
"android/hardware/nfc/1.0/IHwNfc.h",
- "android/hardware/nfc/1.0/BnNfc.h",
- "android/hardware/nfc/1.0/BpNfc.h",
+ "android/hardware/nfc/1.0/BnHwNfc.h",
+ "android/hardware/nfc/1.0/BpHwNfc.h",
"android/hardware/nfc/1.0/BsNfc.h",
"android/hardware/nfc/1.0/INfcClientCallback.h",
"android/hardware/nfc/1.0/IHwNfcClientCallback.h",
- "android/hardware/nfc/1.0/BnNfcClientCallback.h",
- "android/hardware/nfc/1.0/BpNfcClientCallback.h",
+ "android/hardware/nfc/1.0/BnHwNfcClientCallback.h",
+ "android/hardware/nfc/1.0/BpHwNfcClientCallback.h",
"android/hardware/nfc/1.0/BsNfcClientCallback.h",
],
}
diff --git a/nfc/1.0/default/Nfc.cpp b/nfc/1.0/default/Nfc.cpp
index 0759605..9d05fc2 100644
--- a/nfc/1.0/default/Nfc.cpp
+++ b/nfc/1.0/default/Nfc.cpp
@@ -51,21 +51,21 @@
}
-INfc* HIDL_FETCH_INfc(const char *hal) {
+INfc* HIDL_FETCH_INfc(const char * /*name*/) {
nfc_nci_device_t* nfc_device;
int ret = 0;
const hw_module_t* hw_module = NULL;
- ret = hw_get_module (hal, &hw_module);
+ ret = hw_get_module (NFC_NCI_HARDWARE_MODULE_ID, &hw_module);
if (ret == 0)
{
ret = nfc_nci_open (hw_module, &nfc_device);
if (ret != 0) {
- ALOGE ("nfc_nci_open %s failed: %d", hal, ret);
+ ALOGE ("nfc_nci_open failed: %d", ret);
}
}
else
- ALOGE ("hw_get_module %s failed: %d", hal, ret);
+ ALOGE ("hw_get_module failed: %d", ret);
if (ret == 0) {
return new Nfc(nfc_device);
diff --git a/nfc/1.0/vts/Android.mk b/nfc/1.0/vts/Android.mk
new file mode 100644
index 0000000..60cc723
--- /dev/null
+++ b/nfc/1.0/vts/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/nfc/1.0/vts/Nfc.vts b/nfc/1.0/vts/Nfc.vts
new file mode 100644
index 0000000..5882bf5
--- /dev/null
+++ b/nfc/1.0/vts/Nfc.vts
@@ -0,0 +1,133 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "INfc"
+
+package: "android.hardware.nfc"
+
+import: "android.hardware.nfc@1.0::INfcClientCallback"
+import: "android.hardware.nfc@1.0::types"
+
+interface: {
+ api: {
+ name: "open"
+ return_type_hidl: {
+ type: TYPE_ENUM
+ predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
+ }
+ arg: {
+ type: TYPE_HIDL_CALLBACK
+ predefined_type: "INfcClientCallback"
+ is_callback: true
+ }
+ callflow: {
+ entry: true
+ }
+ callflow: {
+ next: "write"
+ next: "coreInitialized"
+ next: "prediscover"
+ next: "powerCycle"
+ next: "controlGranted"
+ }
+ }
+
+ api: {
+ name: "write"
+ return_type_hidl: {
+ type: TYPE_SCALAR
+ scalar_type: "uint32_t"
+ }
+ arg: {
+ type: TYPE_VECTOR
+ vector_value: {
+ type: TYPE_SCALAR
+ scalar_type: "uint8_t"
+ }
+ }
+ callflow: {
+ next: "write"
+ next: "prediscover"
+ next: "coreInitialized"
+ next: "close"
+ next: "powerCycle"
+ next: "controlGranted"
+ }
+ }
+
+ api: {
+ name: "coreInitialized"
+ return_type_hidl: {
+ type: TYPE_ENUM
+ predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
+ }
+ arg: {
+ type: TYPE_VECTOR
+ vector_value: {
+ type: TYPE_SCALAR
+ scalar_type: "uint8_t"
+ }
+ }
+ callflow: {
+ next: "write"
+ next: "prediscover"
+ next: "close"
+ }
+ }
+
+ api: {
+ name: "prediscover"
+ return_type_hidl: {
+ type: TYPE_ENUM
+ predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
+ }
+ callflow: {
+ next: "write"
+ next: "close"
+ next: "coreInitialized"
+ next: "powerCycle"
+ next: "controlGranted"
+ }
+ }
+
+ api: {
+ name: "close"
+ return_type_hidl: {
+ type: TYPE_ENUM
+ predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
+ }
+ callflow: {
+ exit: true
+ }
+ }
+
+ api: {
+ name: "controlGranted"
+ return_type_hidl: {
+ type: TYPE_ENUM
+ predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
+ }
+ callflow: {
+ next: "write"
+ next: "close"
+ next: "prediscover"
+ next: "coreInitialized"
+ next: "powerCycle"
+ }
+ }
+
+ api: {
+ name: "powerCycle"
+ return_type_hidl: {
+ type: TYPE_ENUM
+ predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
+ }
+ callflow: {
+ next: "write"
+ next: "coreInitialized"
+ next: "prediscover"
+ next: "controlGranted"
+ next: "close"
+ }
+ }
+
+}
diff --git a/nfc/1.0/vts/NfcClientCallback.vts b/nfc/1.0/vts/NfcClientCallback.vts
new file mode 100644
index 0000000..e2a3e5b
--- /dev/null
+++ b/nfc/1.0/vts/NfcClientCallback.vts
@@ -0,0 +1,33 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "INfcClientCallback"
+
+package: "android.hardware.nfc"
+
+import: "android.hardware.nfc@1.0::types"
+
+interface: {
+ api: {
+ name: "sendEvent"
+ arg: {
+ type: TYPE_ENUM
+ predefined_type: "NfcEvent"
+ }
+ arg: {
+ type: TYPE_ENUM
+ predefined_type: "NfcStatus"
+ }
+ }
+
+ api: {
+ name: "sendData"
+ arg: {
+ type: TYPE_VECTOR
+ vector_value: {
+ type: TYPE_SCALAR
+ scalar_type: "uint8_t"
+ }
+ }
+ }
+
+}
diff --git a/nfc/1.0/vts/functional/Android.bp b/nfc/1.0/vts/functional/Android.bp
new file mode 100644
index 0000000..021f7c1
--- /dev/null
+++ b/nfc/1.0/vts/functional/Android.bp
@@ -0,0 +1,41 @@
+//
+// 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: "nfc_hidl_hal_test",
+ gtest: true,
+ srcs: ["nfc_hidl_hal_test.cpp"],
+ shared_libs: [
+ "libbase",
+ "liblog",
+ "libcutils",
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libnativehelper",
+ "libutils",
+ "android.hardware.nfc@1.0",
+ ],
+ static_libs: ["libgtest"],
+ cflags: [
+ "--coverage",
+ "-O0",
+ "-g",
+ ],
+ ldflags: [
+ "--coverage"
+ ]
+}
diff --git a/nfc/1.0/vts/functional/Android.mk b/nfc/1.0/vts/functional/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/nfc/1.0/vts/functional/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/nfc/1.0/vts/functional/nfc_hidl_hal_test.cpp b/nfc/1.0/vts/functional/nfc_hidl_hal_test.cpp
new file mode 100644
index 0000000..f5ed4d7
--- /dev/null
+++ b/nfc/1.0/vts/functional/nfc_hidl_hal_test.cpp
@@ -0,0 +1,357 @@
+/*
+ * 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 "nfc_hidl_hal_test"
+#include <android-base/logging.h>
+
+#include <android/hardware/nfc/1.0/INfc.h>
+#include <android/hardware/nfc/1.0/INfcClientCallback.h>
+#include <android/hardware/nfc/1.0/types.h>
+#include <hardware/nfc.h>
+
+#include <gtest/gtest.h>
+#include <chrono>
+#include <condition_variable>
+#include <mutex>
+
+using ::android::hardware::nfc::V1_0::INfc;
+using ::android::hardware::nfc::V1_0::INfcClientCallback;
+using ::android::hardware::nfc::V1_0::NfcEvent;
+using ::android::hardware::nfc::V1_0::NfcStatus;
+using ::android::hardware::nfc::V1_0::NfcData;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::hardware::hidl_vec;
+using ::android::sp;
+
+#define NFC_NCI_SERVICE_NAME "nfc_nci"
+
+/* NCI Commands */
+#define CORE_RESET_CMD \
+ { 0x20, 0x00, 0x01, 0x00 }
+#define CORE_CONN_CREATE_CMD \
+ { 0x20, 0x04, 0x02, 0x01, 0x00 }
+#define INVALID_COMMAND \
+ { 0x20, 0x00, 0x00 }
+#define FAULTY_DATA_PACKET \
+ { 0x00, 0x00, 0xFF }
+
+#define LOOP_BACK_HEADER_SIZE 3
+#define SYNTAX_ERROR 5
+#define NUMBER_LOOPS 3922
+#define VERSION 0x11
+#define TIMEOUT_PERIOD 5
+
+static bool passthrough = true;
+
+// The main test class for NFC HIDL HAL.
+class NfcHidlTest : public ::testing::Test {
+ public:
+ virtual void SetUp() override {
+ nfc_ = INfc::getService(NFC_NCI_SERVICE_NAME, passthrough);
+ ASSERT_NE(nfc_, nullptr);
+
+ nfc_cb_ = new NfcClientCallback(*this);
+ ASSERT_NE(nfc_cb_, nullptr);
+
+ count = 0;
+ last_event_ = NfcEvent::ERROR;
+ last_status_ = NfcStatus::FAILED;
+
+ EXPECT_EQ(NfcStatus::OK, nfc_->open(nfc_cb_));
+ // Wait for OPEN_CPLT event
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(NfcEvent::OPEN_CPLT, last_event_);
+ EXPECT_EQ(NfcStatus::OK, last_status_);
+ }
+
+ virtual void TearDown() override {
+ EXPECT_EQ(NfcStatus::OK, nfc_->close());
+ // Wait for CLOSE_CPLT event
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(NfcEvent::CLOSE_CPLT, last_event_);
+ EXPECT_EQ(NfcStatus::OK, last_status_);
+ }
+
+ /* Used as a mechanism to inform the test about data/event callback */
+ inline void notify() {
+ std::unique_lock<std::mutex> lock(mtx);
+ count++;
+ cv.notify_one();
+ }
+
+ /* Test code calls this function to wait for data/event callback */
+ inline std::cv_status wait() {
+ std::unique_lock<std::mutex> lock(mtx);
+
+ std::cv_status status = std::cv_status::no_timeout;
+ auto now = std::chrono::system_clock::now();
+ while (count == 0) {
+ status = cv.wait_until(lock, now + std::chrono::seconds(TIMEOUT_PERIOD));
+ if (status == std::cv_status::timeout) return status;
+ }
+ count--;
+ return status;
+ }
+
+ /* Callback class for data & Event. */
+ class NfcClientCallback : public INfcClientCallback {
+ NfcHidlTest& parent_;
+
+ public:
+ NfcClientCallback(NfcHidlTest& parent) : parent_(parent){};
+
+ virtual ~NfcClientCallback() = default;
+
+ /* sendEvent callback function - Records the Event & Status
+ * and notifies the TEST
+ **/
+ Return<void> sendEvent(NfcEvent event, NfcStatus event_status) override {
+ parent_.last_event_ = event;
+ parent_.last_status_ = event_status;
+ parent_.notify();
+ return Void();
+ };
+
+ /* sendData callback function. Records the data and notifies the TEST*/
+ Return<void> sendData(const NfcData& data) override {
+ size_t size = parent_.last_data_.size();
+ parent_.last_data_.resize(size + 1);
+ parent_.last_data_[size] = data;
+ parent_.notify();
+ return Void();
+ };
+ };
+
+ sp<INfc> nfc_;
+ sp<INfcClientCallback> nfc_cb_;
+ NfcEvent last_event_;
+ NfcStatus last_status_;
+ hidl_vec<NfcData> last_data_;
+
+ private:
+ std::mutex mtx;
+ std::condition_variable cv;
+ int count;
+};
+
+// A class for test environment setup (kept since this file is a template).
+class NfcHidlEnvironment : public ::testing::Environment {
+ public:
+ virtual void SetUp() {}
+ virtual void TearDown() {}
+
+ private:
+};
+
+/*
+ * OpenAndClose:
+ * Makes an open call, waits for NfcEvent.OPEN_CPLT
+ * Immediately calls close() and waits for NfcEvent.CLOSE_CPLT
+ * Since open and close calls are a part of SetUp() and TearDown(),
+ * the function definition is intentionally kept empty
+ */
+TEST_F(NfcHidlTest, OpenAndClose) {}
+
+/*
+ * WriteCoreReset:
+ * Sends CORE_RESET_CMD
+ * Waits for CORE_RESET_RSP
+ * Checks the status and the version number
+ */
+TEST_F(NfcHidlTest, WriteCoreReset) {
+ std::vector<uint8_t> cmd = CORE_RESET_CMD;
+ NfcData data = cmd;
+ EXPECT_EQ(data.size(), nfc_->write(data));
+ // Wait for CORE_RESET_RSP
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(1ul, last_data_.size());
+ EXPECT_EQ(6ul, last_data_[0].size());
+ EXPECT_EQ((int)NfcStatus::OK, last_data_[0][3]);
+ EXPECT_GE(VERSION, last_data_[0][4]);
+}
+
+/*
+ * WriteInvalidCommand:
+ * Sends an invalid command
+ * Waits for response
+ * Checks SYNTAX_ERROR status
+ */
+TEST_F(NfcHidlTest, WriteInvalidCommand) {
+ // Send an Error Command
+ std::vector<uint8_t> cmd = INVALID_COMMAND;
+ NfcData data = cmd;
+ EXPECT_EQ(data.size(), nfc_->write(data));
+ // Wait for RSP
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(1ul, last_data_.size());
+ EXPECT_EQ(4ul, last_data_[0].size());
+ EXPECT_EQ(SYNTAX_ERROR, last_data_[0][3]);
+}
+
+/*
+ * WriteInvalidAndThenValidCommand:
+ * Sends an Faulty Data Packet
+ * Waits for CORE_INTERFACE_ERROR_NTF
+ * Checks SYNTAX_ERROR status
+ * Repeat for 100 times appending 0xFF each time to the packet
+ * Send CORE_CONN_CREATE_CMD for loop-back mode
+ * Check the response
+ */
+TEST_F(NfcHidlTest, WriteInvalidAndThenValidCommand) {
+ // Send an Error Data Packet
+ std::vector<uint8_t> cmd = FAULTY_DATA_PACKET;
+ NfcData data = cmd;
+ size_t size = data.size();
+
+ for (int i = 0; i < 100; i++) {
+ last_data_.resize(0);
+ data.resize(++size);
+ data[size - 1] = 0xFF;
+ EXPECT_EQ(data.size(), nfc_->write(data));
+ // Wait for CORE_INTERFACE_ERROR_NTF
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(1ul, last_data_.size());
+ EXPECT_EQ(5ul, last_data_[0].size());
+ EXPECT_EQ(0x60, last_data_[0][0]);
+ EXPECT_EQ(0x08, last_data_[0][1]);
+ EXPECT_EQ(0x02, last_data_[0][2]);
+ EXPECT_EQ(SYNTAX_ERROR, last_data_[0][3]);
+ }
+
+ cmd = CORE_CONN_CREATE_CMD;
+ data = cmd;
+ last_data_.resize(0);
+ EXPECT_EQ(data.size(), nfc_->write(data));
+ // Wait for CORE_CONN_CREATE_RSP
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(1ul, last_data_.size());
+ EXPECT_EQ(7ul, last_data_[0].size());
+ EXPECT_EQ((int)NfcStatus::OK, last_data_[0][3]);
+}
+/*
+ * Bandwidth:
+ * Sets the loop-back mode using CORE_CONN_CREATE_CMD
+ * Sends max payload size data
+ * Waits for the response
+ * Checks the data received
+ * Repeat to send total of 1Mb data
+ */
+TEST_F(NfcHidlTest, Bandwidth) {
+ std::vector<uint8_t> cmd = CORE_CONN_CREATE_CMD;
+ NfcData data = cmd;
+ EXPECT_EQ(data.size(), nfc_->write(data));
+ // Wait for CORE_CONN_CREATE_RSP
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(1ul, last_data_.size());
+ EXPECT_EQ(7ul, last_data_[0].size());
+ EXPECT_EQ((int)NfcStatus::OK, last_data_[0][3]);
+ uint8_t conn_id = last_data_[0][6];
+ uint32_t max_payload_size = last_data_[0][4];
+
+ for (int loops = 0; loops < NUMBER_LOOPS; loops++) {
+ last_data_.resize(0);
+ data.resize(max_payload_size + LOOP_BACK_HEADER_SIZE);
+ data[0] = conn_id;
+ data[1] = 0x00;
+ data[2] = max_payload_size;
+ for (uint32_t i = 0; i < max_payload_size; i++) {
+ data[i + LOOP_BACK_HEADER_SIZE] = i;
+ }
+ EXPECT_EQ(max_payload_size + LOOP_BACK_HEADER_SIZE, nfc_->write(data));
+ // Wait for data and CORE_CONN_CREDITS_NTF
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ // Check if the same data was recieved back
+ EXPECT_EQ(2ul, last_data_.size());
+ EXPECT_EQ(data.size(), last_data_[0].size());
+ for (size_t i = 0; i < data.size(); i++) {
+ EXPECT_EQ(data[i], last_data_[0][i]);
+ }
+
+ EXPECT_EQ(6ul, last_data_[1].size());
+ // Check if the credit is refilled to 1
+ EXPECT_EQ(1, last_data_[1][5]);
+ }
+}
+
+/*
+ * PowerCycle:
+ * Calls powerCycle()
+ * Waits for NfcEvent.OPEN_CPLT
+ * Checks status
+ */
+TEST_F(NfcHidlTest, PowerCycle) {
+ EXPECT_EQ(NfcStatus::OK, nfc_->powerCycle());
+ // Wait for NfcEvent.OPEN_CPLT
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(NfcEvent::OPEN_CPLT, last_event_);
+ EXPECT_EQ(NfcStatus::OK, last_status_);
+}
+
+/*
+ * CoreInitialized:
+ * Calls coreInitialized()
+ * Waits for NfcEvent.POST_INIT_CPLT
+ */
+TEST_F(NfcHidlTest, CoreInitialized) {
+ NfcData data;
+ data.resize(1);
+ data[0] = 0;
+ EXPECT_EQ(NfcStatus::OK, nfc_->coreInitialized(data));
+ // Wait for NfcEvent.POST_INIT_CPLT
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(NfcEvent::POST_INIT_CPLT, last_event_);
+}
+
+/*
+ * ControlGranted:
+ * Calls controlGranted()
+ * Checks the return value
+ */
+TEST_F(NfcHidlTest, ControlGranted) {
+ EXPECT_EQ(NfcStatus::OK, nfc_->controlGranted());
+}
+
+/* PreDiscover:
+ * Calls prediscover()
+ * Checks the return value
+ */
+TEST_F(NfcHidlTest, PreDiscover) {
+ EXPECT_EQ(NfcStatus::OK, nfc_->prediscover());
+}
+
+int main(int argc, char** argv) {
+ ::testing::AddGlobalTestEnvironment(new NfcHidlEnvironment);
+ ::testing::InitGoogleTest(&argc, argv);
+
+ for (int i = 0; i < argc; i++) {
+ if (strstr(argv[i], "passthrough=false") != nullptr) {
+ passthrough = false;
+ break;
+ }
+ }
+ std::system("svc nfc disable"); /* Turn off NFC */
+ sleep(5);
+
+ int status = RUN_ALL_TESTS();
+ LOG(INFO) << "Test result = " << status;
+
+ std::system("svc nfc enable"); /* Turn on NFC */
+ sleep(5);
+
+ return status;
+}
diff --git a/nfc/1.0/vts/functional/vts/Android.mk b/nfc/1.0/vts/functional/vts/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/nfc/1.0/vts/functional/vts/testcases/Android.mk b/nfc/1.0/vts/functional/vts/testcases/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/nfc/1.0/vts/functional/vts/testcases/hal/Android.mk b/nfc/1.0/vts/functional/vts/testcases/hal/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/nfc/1.0/vts/functional/vts/testcases/hal/nfc/Android.mk b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/nfc/1.0/vts/functional/vts/testcases/hal/nfc/__init__.py b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/__init__.py
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/Android.mk b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/__init__.py b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/__init__.py
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/Android.mk b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/NfcHidlBasicTest.py b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/NfcHidlBasicTest.py
new file mode 100644
index 0000000..de01f43
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/NfcHidlBasicTest.py
@@ -0,0 +1,110 @@
+#!/usr/bin/env python3.4
+#
+# 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.
+#
+
+import logging
+import time
+
+from vts.runners.host import asserts
+from vts.runners.host import base_test_with_webdb
+from vts.runners.host import test_runner
+from vts.utils.python.controllers import android_device
+
+PASSTHROUGH_MODE_KEY = "passthrough_mode"
+
+
+class NfcHidlBasicTest(base_test_with_webdb.BaseTestWithWebDbClass):
+ """A simple testcase for the NFC HIDL HAL."""
+
+ def setUpClass(self):
+ """Creates a mirror and turns on the framework-layer NFC service."""
+ self.dut = self.registerController(android_device)[0]
+
+ self.getUserParams(opt_param_names=[PASSTHROUGH_MODE_KEY])
+
+ self.dut.shell.InvokeTerminal("one")
+ self.dut.shell.one.Execute("setenforce 0") # SELinux permissive mode
+ self.dut.shell.one.Execute("svc nfc disable") # Turn off
+ time.sleep(5)
+
+ if getattr(self, PASSTHROUGH_MODE_KEY, True):
+ self.dut.shell.one.Execute(
+ "setprop vts.hal.vts.hidl.get_stub true")
+ else:
+ self.dut.shell.one.Execute(
+ "setprop vts.hal.vts.hidl.get_stub false")
+
+ self.dut.hal.InitHidlHal(
+ target_type="nfc",
+ target_basepaths=self.dut.libPaths,
+ target_version=1.0,
+ target_package="android.hardware.nfc",
+ target_component_name="INfc",
+ hw_binder_service_name="nfc_nci",
+ bits=64 if self.dut.is64Bit else 32)
+
+ def tearDownClass(self):
+ """Turns off the framework-layer NFC service."""
+ # Ideally, we would want to store the nfc service's state before
+ # turning that off in setUpClass and restore the original state.
+ self.dut.shell.one.Execute("svc nfc disable") # make sure it's off
+
+ def testBase(self):
+ """A simple test case which just calls each registered function."""
+ # TODO: extend to make realistic testcases
+ # For example, call after CORE_INIT_RSP is received.
+ # result = self.dut.hal.nfc.coreInitialized([1])
+ # logging.info("coreInitialized result: %s", result)
+
+ def send_event(NfcEvent, NfcStatus):
+ logging.info("callback send_event")
+ logging.info("arg0 %s", NfcEvent)
+ logging.info("arg1 %s", NfcStatus)
+
+ def send_data(NfcData):
+ logging.info("callback send_data")
+ logging.info("arg0 %s", NfcData)
+
+ client_callback = self.dut.hal.nfc.GetHidlCallbackInterface(
+ "INfcClientCallback",
+ sendEvent=send_event,
+ sendData=send_data)
+
+ result = self.dut.hal.nfc.open(client_callback)
+ logging.info("open result: %s", result)
+
+ result = self.dut.hal.nfc.prediscover()
+ logging.info("prediscover result: %s", result)
+
+ result = self.dut.hal.nfc.controlGranted()
+ logging.info("controlGranted result: %s", result)
+
+ result = self.dut.hal.nfc.powerCycle()
+ logging.info("powerCycle result: %s", result)
+
+ nfc_types = self.dut.hal.nfc.GetHidlTypeInterface("types")
+ logging.info("nfc_types: %s", nfc_types)
+
+ result = self.dut.hal.nfc.write([0, 1, 2, 3, 4, 5])
+ logging.info("write result: %s", result)
+
+ result = self.dut.hal.nfc.close()
+ logging.info("close result: %s", result)
+
+ self.SetCoverageData(self.dut.hal.nfc.GetRawCodeCoverage())
+
+if __name__ == "__main__":
+ test_runner.main()
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/__init__.py b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/__init__.py
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/binderize/Android.mk b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/binderize/Android.mk
new file mode 100644
index 0000000..cd58d32
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/binderize/Android.mk
@@ -0,0 +1,23 @@
+#
+# 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 $(CLEAR_VARS)
+
+LOCAL_MODULE := NfcHidlBinderizeBasicTest
+VTS_CONFIG_SRC_DIR := testcases/hal/nfc/hidl/host/binderize
+include test/vts/tools/build/Android.host_config.mk
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/binderize/AndroidTest.xml b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/binderize/AndroidTest.xml
new file mode 100644
index 0000000..9671977
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/binderize/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS HAL NFC (Binder Mode) test cases">
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+ <option name="push-group" value="HidlHalTest.push" />
+ <option name="cleanup" value="true" />
+ <option name="push" value="spec/hardware/interfaces/nfc/1.0/vts/Nfc.vts->/data/local/tmp/spec/Nfc.vts" />
+ <option name="push" value="spec/hardware/interfaces/nfc/1.0/vts/NfcClientCallback.vts->/data/local/tmp/spec/NfcClientCallback.vts" />
+ <option name="push" value="spec/hardware/interfaces/nfc/1.0/vts/types.vts->/data/local/tmp/spec/types.vts" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+ <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+ <option name="test-module-name" value="NfcHidlBinderizeBasicTest" />
+ <option name="test-case-path" value="vts/testcases/hal/nfc/hidl/host/NfcHidlBasicTest" />
+ <option name="test-config-path" value="vts/testcases/hal/nfc/hidl/host/binderize/NfcHidlBinderizeBasicTest.config" />
+ </test>
+</configuration>
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/binderize/NfcHidlBinderizeBasicTest.config b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/binderize/NfcHidlBinderizeBasicTest.config
new file mode 100644
index 0000000..5a94c6f
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/binderize/NfcHidlBinderizeBasicTest.config
@@ -0,0 +1,3 @@
+{
+ "passthrough_mode": False
+}
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/binderize/__init__.py b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/binderize/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/binderize/__init__.py
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/passthrough/Android.mk b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/passthrough/Android.mk
new file mode 100644
index 0000000..e274107
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/passthrough/Android.mk
@@ -0,0 +1,23 @@
+#
+# 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 $(CLEAR_VARS)
+
+LOCAL_MODULE := NfcHidlPassthroughBasicTest
+VTS_CONFIG_SRC_DIR := testcases/hal/nfc/hidl/host/passthrough
+include test/vts/tools/build/Android.host_config.mk
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/passthrough/AndroidTest.xml b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/passthrough/AndroidTest.xml
new file mode 100644
index 0000000..2f5fdfa
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/passthrough/AndroidTest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS HAL NFC (Passthrough) test cases">
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+ <option name="push-group" value="HidlHalTest.push" />
+ <option name="cleanup" value="true" />
+ <option name="push" value="spec/hardware/interfaces/nfc/1.0/vts/Nfc.vts->/data/local/tmp/spec/Nfc.vts" />
+ <option name="push" value="spec/hardware/interfaces/nfc/1.0/vts/NfcClientCallback.vts->/data/local/tmp/spec/NfcClientCallback.vts" />
+ <option name="push" value="spec/hardware/interfaces/nfc/1.0/vts/types.vts->/data/local/tmp/spec/types.vts" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+ <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+ <option name="test-module-name" value="NfcHidlPassthroughBasicTest" />
+ <option name="test-case-path" value="vts/testcases/hal/nfc/hidl/host/NfcHidlBasicTest" />
+ <option name="test-config-path" value="vts/testcases/hal/nfc/hidl/host/passthrough/NfcHidlPassthroughBasicTest.config" />
+ </test>
+</configuration>
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/passthrough/NfcHidlPassthroughBasicTest.config b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/passthrough/NfcHidlPassthroughBasicTest.config
new file mode 100644
index 0000000..c2429e0
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/host/passthrough/NfcHidlPassthroughBasicTest.config
@@ -0,0 +1,11 @@
+{
+ "passthrough_mode": true,
+ "coverage": true,
+ "modules": [{
+ "module_name": "system/lib64/hw/nfc_nci.bullhead",
+ "git_project": {
+ "name": "platform/system/nfc",
+ "path": "system/nfc"
+ }
+ }]
+}
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/Android.mk b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/Android.mk
new file mode 100644
index 0000000..da9b6af
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/Android.mk
@@ -0,0 +1,25 @@
+#
+# 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)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := HalNfcHidlTargetBasicTest
+VTS_CONFIG_SRC_DIR := testcases/hal/nfc/hidl/target
+include test/vts/tools/build/Android.host_config.mk
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/AndroidTest.xml b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/AndroidTest.xml
new file mode 100644
index 0000000..ee02488
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS NFC HIDL HAL's basic target-side test cases">
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+ <option name="push-group" value="HidlHalTest.push" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+ <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+ <option name="test-module-name" value="HalNfcHidlTargetBasicTest" />
+ <option name="binary-test-sources" value="
+ _32bit::DATA/nativetest/nfc_hidl_hal_test/nfc_hidl_hal_test,
+ _64bit::DATA/nativetest64/nfc_hidl_hal_test/nfc_hidl_hal_test,
+ "/>
+ <option name="test-config-path" value="vts/testcases/hal/nfc/hidl/target/HalNfcHidlTargetBasicTest.config" />
+ <option name="binary-test-type" value="gtest" />
+ <option name="test-timeout" value="10m" />
+ </test>
+</configuration>
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/HalNfcHidlTargetBasicTest.config b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/HalNfcHidlTargetBasicTest.config
new file mode 100644
index 0000000..e6b5a2c
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target/HalNfcHidlTargetBasicTest.config
@@ -0,0 +1,10 @@
+{
+ "coverage": true,
+ "modules": [{
+ "module_name": "system/lib64/hw/nfc_nci.bullhead",
+ "git_project": {
+ "name": "platform/system/nfc",
+ "path": "system/nfc"
+ }
+ }]
+}
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target_profiling/Android.mk b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target_profiling/Android.mk
new file mode 100644
index 0000000..c7bf853
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target_profiling/Android.mk
@@ -0,0 +1,23 @@
+#
+## 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 $(CLEAR_VARS)
+
+LOCAL_MODULE := NfcHidlTargetProfilingTest
+VTS_CONFIG_SRC_DIR := testcases/hal/nfc/hidl/target_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target_profiling/AndroidTest.xml b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..da6cf22
--- /dev/null
+++ b/nfc/1.0/vts/functional/vts/testcases/hal/nfc/hidl/target_profiling/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS NFC HIDL HAL's target-side profiling test cases">
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+ <option name="push-group" value="HidlHalTest.push" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+ <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+ <option name="test-module-name" value="NfcHidlTargetProfilingTest" />
+ <option name="binary-test-sources" value="
+ _32bit::DATA/nativetest/nfc_hidl_hal_test/nfc_hidl_hal_test,
+ _64bit::DATA/nativetest64/nfc_hidl_hal_test/nfc_hidl_hal_test,
+ "/>
+ <option name="binary-test-type" value="gtest" />
+ <option name="test-timeout" value="10m" />
+ <option name="enable-profiling" value="true" />
+ </test>
+</configuration>
diff --git a/nfc/1.0/vts/types.vts b/nfc/1.0/vts/types.vts
new file mode 100644
index 0000000..969a8af
--- /dev/null
+++ b/nfc/1.0/vts/types.vts
@@ -0,0 +1,72 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "types"
+
+package: "android.hardware.nfc"
+
+attribute: {
+ name: "NfcEvent"
+ type: TYPE_ENUM
+ enum_value: {
+ scalar_type: "uint32_t"
+
+ enumerator: "OPEN_CPLT"
+ scalar_value: {
+ uint32_t: 0
+ }
+ enumerator: "CLOSE_CPLT"
+ scalar_value: {
+ uint32_t: 1
+ }
+ enumerator: "POST_INIT_CPLT"
+ scalar_value: {
+ uint32_t: 2
+ }
+ enumerator: "PRE_DISCOVER_CPLT"
+ scalar_value: {
+ uint32_t: 3
+ }
+ enumerator: "REQUEST_CONTROL"
+ scalar_value: {
+ uint32_t: 4
+ }
+ enumerator: "RELEASE_CONTROL"
+ scalar_value: {
+ uint32_t: 5
+ }
+ enumerator: "ERROR"
+ scalar_value: {
+ uint32_t: 6
+ }
+ }
+}
+
+attribute: {
+ name: "NfcStatus"
+ type: TYPE_ENUM
+ enum_value: {
+ scalar_type: "uint32_t"
+
+ enumerator: "OK"
+ scalar_value: {
+ uint32_t: 0
+ }
+ enumerator: "FAILED"
+ scalar_value: {
+ uint32_t: 1
+ }
+ enumerator: "ERR_TRANSPORT"
+ scalar_value: {
+ uint32_t: 2
+ }
+ enumerator: "ERR_CMD_TIMEOUT"
+ scalar_value: {
+ uint32_t: 3
+ }
+ enumerator: "REFUSED"
+ scalar_value: {
+ uint32_t: 4
+ }
+ }
+}
+
diff --git a/nfc/Android.mk b/nfc/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/nfc/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/power/Android.mk b/power/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/power/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/radio/1.0/Android.bp b/radio/1.0/Android.bp
index 7f58452..e9eb10e 100644
--- a/radio/1.0/Android.bp
+++ b/radio/1.0/Android.bp
@@ -38,28 +38,28 @@
"android/hardware/radio/1.0/types.h",
"android/hardware/radio/1.0/IRadio.h",
"android/hardware/radio/1.0/IHwRadio.h",
- "android/hardware/radio/1.0/BnRadio.h",
- "android/hardware/radio/1.0/BpRadio.h",
+ "android/hardware/radio/1.0/BnHwRadio.h",
+ "android/hardware/radio/1.0/BpHwRadio.h",
"android/hardware/radio/1.0/BsRadio.h",
"android/hardware/radio/1.0/IRadioIndication.h",
"android/hardware/radio/1.0/IHwRadioIndication.h",
- "android/hardware/radio/1.0/BnRadioIndication.h",
- "android/hardware/radio/1.0/BpRadioIndication.h",
+ "android/hardware/radio/1.0/BnHwRadioIndication.h",
+ "android/hardware/radio/1.0/BpHwRadioIndication.h",
"android/hardware/radio/1.0/BsRadioIndication.h",
"android/hardware/radio/1.0/IRadioResponse.h",
"android/hardware/radio/1.0/IHwRadioResponse.h",
- "android/hardware/radio/1.0/BnRadioResponse.h",
- "android/hardware/radio/1.0/BpRadioResponse.h",
+ "android/hardware/radio/1.0/BnHwRadioResponse.h",
+ "android/hardware/radio/1.0/BpHwRadioResponse.h",
"android/hardware/radio/1.0/BsRadioResponse.h",
"android/hardware/radio/1.0/ISap.h",
"android/hardware/radio/1.0/IHwSap.h",
- "android/hardware/radio/1.0/BnSap.h",
- "android/hardware/radio/1.0/BpSap.h",
+ "android/hardware/radio/1.0/BnHwSap.h",
+ "android/hardware/radio/1.0/BpHwSap.h",
"android/hardware/radio/1.0/BsSap.h",
"android/hardware/radio/1.0/ISapCallback.h",
"android/hardware/radio/1.0/IHwSapCallback.h",
- "android/hardware/radio/1.0/BnSapCallback.h",
- "android/hardware/radio/1.0/BpSapCallback.h",
+ "android/hardware/radio/1.0/BnHwSapCallback.h",
+ "android/hardware/radio/1.0/BpHwSapCallback.h",
"android/hardware/radio/1.0/BsSapCallback.h",
],
}
diff --git a/radio/Android.mk b/radio/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/radio/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/sensors/Android.mk b/sensors/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/sensors/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/tests/Android.mk b/tests/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/tests/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/tests/bar/1.0/Android.bp b/tests/bar/1.0/Android.bp
index e4c79fa..cad655c 100644
--- a/tests/bar/1.0/Android.bp
+++ b/tests/bar/1.0/Android.bp
@@ -28,18 +28,18 @@
out: [
"android/hardware/tests/bar/1.0/IBar.h",
"android/hardware/tests/bar/1.0/IHwBar.h",
- "android/hardware/tests/bar/1.0/BnBar.h",
- "android/hardware/tests/bar/1.0/BpBar.h",
+ "android/hardware/tests/bar/1.0/BnHwBar.h",
+ "android/hardware/tests/bar/1.0/BpHwBar.h",
"android/hardware/tests/bar/1.0/BsBar.h",
"android/hardware/tests/bar/1.0/IComplicated.h",
"android/hardware/tests/bar/1.0/IHwComplicated.h",
- "android/hardware/tests/bar/1.0/BnComplicated.h",
- "android/hardware/tests/bar/1.0/BpComplicated.h",
+ "android/hardware/tests/bar/1.0/BnHwComplicated.h",
+ "android/hardware/tests/bar/1.0/BpHwComplicated.h",
"android/hardware/tests/bar/1.0/BsComplicated.h",
"android/hardware/tests/bar/1.0/IImportTypes.h",
"android/hardware/tests/bar/1.0/IHwImportTypes.h",
- "android/hardware/tests/bar/1.0/BnImportTypes.h",
- "android/hardware/tests/bar/1.0/BpImportTypes.h",
+ "android/hardware/tests/bar/1.0/BnHwImportTypes.h",
+ "android/hardware/tests/bar/1.0/BpHwImportTypes.h",
"android/hardware/tests/bar/1.0/BsImportTypes.h",
],
}
diff --git a/tests/bar/Android.mk b/tests/bar/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/tests/bar/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/tests/baz/1.0/Android.bp b/tests/baz/1.0/Android.bp
index 9caf809..4106838 100644
--- a/tests/baz/1.0/Android.bp
+++ b/tests/baz/1.0/Android.bp
@@ -32,18 +32,18 @@
"android/hardware/tests/baz/1.0/types.h",
"android/hardware/tests/baz/1.0/IBase.h",
"android/hardware/tests/baz/1.0/IHwBase.h",
- "android/hardware/tests/baz/1.0/BnBase.h",
- "android/hardware/tests/baz/1.0/BpBase.h",
+ "android/hardware/tests/baz/1.0/BnHwBase.h",
+ "android/hardware/tests/baz/1.0/BpHwBase.h",
"android/hardware/tests/baz/1.0/BsBase.h",
"android/hardware/tests/baz/1.0/IBaz.h",
"android/hardware/tests/baz/1.0/IHwBaz.h",
- "android/hardware/tests/baz/1.0/BnBaz.h",
- "android/hardware/tests/baz/1.0/BpBaz.h",
+ "android/hardware/tests/baz/1.0/BnHwBaz.h",
+ "android/hardware/tests/baz/1.0/BpHwBaz.h",
"android/hardware/tests/baz/1.0/BsBaz.h",
"android/hardware/tests/baz/1.0/IBazCallback.h",
"android/hardware/tests/baz/1.0/IHwBazCallback.h",
- "android/hardware/tests/baz/1.0/BnBazCallback.h",
- "android/hardware/tests/baz/1.0/BpBazCallback.h",
+ "android/hardware/tests/baz/1.0/BnHwBazCallback.h",
+ "android/hardware/tests/baz/1.0/BpHwBazCallback.h",
"android/hardware/tests/baz/1.0/BsBazCallback.h",
],
}
diff --git a/tests/baz/Android.mk b/tests/baz/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/tests/baz/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/tests/expression/1.0/Android.bp b/tests/expression/1.0/Android.bp
index 80c4b3e..bb7aedd 100644
--- a/tests/expression/1.0/Android.bp
+++ b/tests/expression/1.0/Android.bp
@@ -25,13 +25,13 @@
out: [
"android/hardware/tests/expression/1.0/IExpression.h",
"android/hardware/tests/expression/1.0/IHwExpression.h",
- "android/hardware/tests/expression/1.0/BnExpression.h",
- "android/hardware/tests/expression/1.0/BpExpression.h",
+ "android/hardware/tests/expression/1.0/BnHwExpression.h",
+ "android/hardware/tests/expression/1.0/BpHwExpression.h",
"android/hardware/tests/expression/1.0/BsExpression.h",
"android/hardware/tests/expression/1.0/IExpressionExt.h",
"android/hardware/tests/expression/1.0/IHwExpressionExt.h",
- "android/hardware/tests/expression/1.0/BnExpressionExt.h",
- "android/hardware/tests/expression/1.0/BpExpressionExt.h",
+ "android/hardware/tests/expression/1.0/BnHwExpressionExt.h",
+ "android/hardware/tests/expression/1.0/BpHwExpressionExt.h",
"android/hardware/tests/expression/1.0/BsExpressionExt.h",
],
}
diff --git a/tests/expression/Android.mk b/tests/expression/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/tests/expression/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/tests/foo/1.0/Android.bp b/tests/foo/1.0/Android.bp
index 171ea84..8294c65 100644
--- a/tests/foo/1.0/Android.bp
+++ b/tests/foo/1.0/Android.bp
@@ -38,28 +38,28 @@
"android/hardware/tests/foo/1.0/types.h",
"android/hardware/tests/foo/1.0/IFoo.h",
"android/hardware/tests/foo/1.0/IHwFoo.h",
- "android/hardware/tests/foo/1.0/BnFoo.h",
- "android/hardware/tests/foo/1.0/BpFoo.h",
+ "android/hardware/tests/foo/1.0/BnHwFoo.h",
+ "android/hardware/tests/foo/1.0/BpHwFoo.h",
"android/hardware/tests/foo/1.0/BsFoo.h",
"android/hardware/tests/foo/1.0/IFooCallback.h",
"android/hardware/tests/foo/1.0/IHwFooCallback.h",
- "android/hardware/tests/foo/1.0/BnFooCallback.h",
- "android/hardware/tests/foo/1.0/BpFooCallback.h",
+ "android/hardware/tests/foo/1.0/BnHwFooCallback.h",
+ "android/hardware/tests/foo/1.0/BpHwFooCallback.h",
"android/hardware/tests/foo/1.0/BsFooCallback.h",
"android/hardware/tests/foo/1.0/IMyTypes.h",
"android/hardware/tests/foo/1.0/IHwMyTypes.h",
- "android/hardware/tests/foo/1.0/BnMyTypes.h",
- "android/hardware/tests/foo/1.0/BpMyTypes.h",
+ "android/hardware/tests/foo/1.0/BnHwMyTypes.h",
+ "android/hardware/tests/foo/1.0/BpHwMyTypes.h",
"android/hardware/tests/foo/1.0/BsMyTypes.h",
"android/hardware/tests/foo/1.0/ISimple.h",
"android/hardware/tests/foo/1.0/IHwSimple.h",
- "android/hardware/tests/foo/1.0/BnSimple.h",
- "android/hardware/tests/foo/1.0/BpSimple.h",
+ "android/hardware/tests/foo/1.0/BnHwSimple.h",
+ "android/hardware/tests/foo/1.0/BpHwSimple.h",
"android/hardware/tests/foo/1.0/BsSimple.h",
"android/hardware/tests/foo/1.0/ITheirTypes.h",
"android/hardware/tests/foo/1.0/IHwTheirTypes.h",
- "android/hardware/tests/foo/1.0/BnTheirTypes.h",
- "android/hardware/tests/foo/1.0/BpTheirTypes.h",
+ "android/hardware/tests/foo/1.0/BnHwTheirTypes.h",
+ "android/hardware/tests/foo/1.0/BpHwTheirTypes.h",
"android/hardware/tests/foo/1.0/BsTheirTypes.h",
],
}
diff --git a/tests/foo/Android.mk b/tests/foo/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/tests/foo/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/tests/inheritance/1.0/Android.bp b/tests/inheritance/1.0/Android.bp
index 2a6860b..4389147 100644
--- a/tests/inheritance/1.0/Android.bp
+++ b/tests/inheritance/1.0/Android.bp
@@ -31,23 +31,23 @@
out: [
"android/hardware/tests/inheritance/1.0/IChild.h",
"android/hardware/tests/inheritance/1.0/IHwChild.h",
- "android/hardware/tests/inheritance/1.0/BnChild.h",
- "android/hardware/tests/inheritance/1.0/BpChild.h",
+ "android/hardware/tests/inheritance/1.0/BnHwChild.h",
+ "android/hardware/tests/inheritance/1.0/BpHwChild.h",
"android/hardware/tests/inheritance/1.0/BsChild.h",
"android/hardware/tests/inheritance/1.0/IFetcher.h",
"android/hardware/tests/inheritance/1.0/IHwFetcher.h",
- "android/hardware/tests/inheritance/1.0/BnFetcher.h",
- "android/hardware/tests/inheritance/1.0/BpFetcher.h",
+ "android/hardware/tests/inheritance/1.0/BnHwFetcher.h",
+ "android/hardware/tests/inheritance/1.0/BpHwFetcher.h",
"android/hardware/tests/inheritance/1.0/BsFetcher.h",
"android/hardware/tests/inheritance/1.0/IGrandparent.h",
"android/hardware/tests/inheritance/1.0/IHwGrandparent.h",
- "android/hardware/tests/inheritance/1.0/BnGrandparent.h",
- "android/hardware/tests/inheritance/1.0/BpGrandparent.h",
+ "android/hardware/tests/inheritance/1.0/BnHwGrandparent.h",
+ "android/hardware/tests/inheritance/1.0/BpHwGrandparent.h",
"android/hardware/tests/inheritance/1.0/BsGrandparent.h",
"android/hardware/tests/inheritance/1.0/IParent.h",
"android/hardware/tests/inheritance/1.0/IHwParent.h",
- "android/hardware/tests/inheritance/1.0/BnParent.h",
- "android/hardware/tests/inheritance/1.0/BpParent.h",
+ "android/hardware/tests/inheritance/1.0/BnHwParent.h",
+ "android/hardware/tests/inheritance/1.0/BpHwParent.h",
"android/hardware/tests/inheritance/1.0/BsParent.h",
],
}
diff --git a/tests/inheritance/Android.mk b/tests/inheritance/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/tests/inheritance/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/tests/libhwbinder/1.0/Android.bp b/tests/libhwbinder/1.0/Android.bp
index 8730665..8c27225 100644
--- a/tests/libhwbinder/1.0/Android.bp
+++ b/tests/libhwbinder/1.0/Android.bp
@@ -22,8 +22,8 @@
out: [
"android/hardware/tests/libhwbinder/1.0/IBenchmark.h",
"android/hardware/tests/libhwbinder/1.0/IHwBenchmark.h",
- "android/hardware/tests/libhwbinder/1.0/BnBenchmark.h",
- "android/hardware/tests/libhwbinder/1.0/BpBenchmark.h",
+ "android/hardware/tests/libhwbinder/1.0/BnHwBenchmark.h",
+ "android/hardware/tests/libhwbinder/1.0/BpHwBenchmark.h",
"android/hardware/tests/libhwbinder/1.0/BsBenchmark.h",
],
}
diff --git a/tests/libhwbinder/Android.mk b/tests/libhwbinder/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/tests/libhwbinder/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/tests/memory/1.0/Android.bp b/tests/memory/1.0/Android.bp
index 155677f..d8fe811 100644
--- a/tests/memory/1.0/Android.bp
+++ b/tests/memory/1.0/Android.bp
@@ -22,8 +22,8 @@
out: [
"android/hardware/tests/memory/1.0/IMemoryTest.h",
"android/hardware/tests/memory/1.0/IHwMemoryTest.h",
- "android/hardware/tests/memory/1.0/BnMemoryTest.h",
- "android/hardware/tests/memory/1.0/BpMemoryTest.h",
+ "android/hardware/tests/memory/1.0/BnHwMemoryTest.h",
+ "android/hardware/tests/memory/1.0/BpHwMemoryTest.h",
"android/hardware/tests/memory/1.0/BsMemoryTest.h",
],
}
diff --git a/tests/memory/1.0/IMemoryTest.hal b/tests/memory/1.0/IMemoryTest.hal
index c20c536..4d6de3f 100644
--- a/tests/memory/1.0/IMemoryTest.hal
+++ b/tests/memory/1.0/IMemoryTest.hal
@@ -17,5 +17,6 @@
package android.hardware.tests.memory@1.0;
interface IMemoryTest {
+ haveSomeMemory(memory mem) generates(memory mem);
fillMemory(memory memory_in, uint8_t filler);
};
diff --git a/tests/memory/1.0/default/MemoryTest.cpp b/tests/memory/1.0/default/MemoryTest.cpp
index 40bb2dc..37a2a60 100644
--- a/tests/memory/1.0/default/MemoryTest.cpp
+++ b/tests/memory/1.0/default/MemoryTest.cpp
@@ -34,6 +34,11 @@
namespace implementation {
// Methods from ::android::hardware::tests::memory::V1_0::IMemoryTest follow.
+Return<void> Memory::haveSomeMemory(const hidl_memory& mem, haveSomeMemory_cb _hidl_cb) {
+ _hidl_cb(mem);
+ return Void();
+}
+
Return<void> Memory::fillMemory(const hidl_memory& memory_in, uint8_t filler) {
sp<IMemory> memory = mapMemory(memory_in);
diff --git a/tests/memory/1.0/default/MemoryTest.h b/tests/memory/1.0/default/MemoryTest.h
index 5cab494..0d903f1 100644
--- a/tests/memory/1.0/default/MemoryTest.h
+++ b/tests/memory/1.0/default/MemoryTest.h
@@ -39,6 +39,8 @@
struct Memory : public IMemoryTest {
// Methods from ::android::hardware::tests::memory::V1_0::IMemoryTest follow.
+ Return<void> haveSomeMemory(const hidl_memory& mem, haveSomeMemory_cb _hidl_cb) override;
+
Return<void> fillMemory(const hidl_memory& memory_in, uint8_t filler) override;
};
diff --git a/tests/msgq/1.0/Android.bp b/tests/msgq/1.0/Android.bp
index f2e257b..669722e 100644
--- a/tests/msgq/1.0/Android.bp
+++ b/tests/msgq/1.0/Android.bp
@@ -22,8 +22,8 @@
out: [
"android/hardware/tests/msgq/1.0/ITestMsgQ.h",
"android/hardware/tests/msgq/1.0/IHwTestMsgQ.h",
- "android/hardware/tests/msgq/1.0/BnTestMsgQ.h",
- "android/hardware/tests/msgq/1.0/BpTestMsgQ.h",
+ "android/hardware/tests/msgq/1.0/BnHwTestMsgQ.h",
+ "android/hardware/tests/msgq/1.0/BpHwTestMsgQ.h",
"android/hardware/tests/msgq/1.0/BsTestMsgQ.h",
],
}
diff --git a/tests/msgq/Android.mk b/tests/msgq/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/tests/msgq/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/tests/pointer/1.0/Android.bp b/tests/pointer/1.0/Android.bp
index d1ffda6..be7f873 100644
--- a/tests/pointer/1.0/Android.bp
+++ b/tests/pointer/1.0/Android.bp
@@ -25,13 +25,13 @@
out: [
"android/hardware/tests/pointer/1.0/IGraph.h",
"android/hardware/tests/pointer/1.0/IHwGraph.h",
- "android/hardware/tests/pointer/1.0/BnGraph.h",
- "android/hardware/tests/pointer/1.0/BpGraph.h",
+ "android/hardware/tests/pointer/1.0/BnHwGraph.h",
+ "android/hardware/tests/pointer/1.0/BpHwGraph.h",
"android/hardware/tests/pointer/1.0/BsGraph.h",
"android/hardware/tests/pointer/1.0/IPointer.h",
"android/hardware/tests/pointer/1.0/IHwPointer.h",
- "android/hardware/tests/pointer/1.0/BnPointer.h",
- "android/hardware/tests/pointer/1.0/BpPointer.h",
+ "android/hardware/tests/pointer/1.0/BnHwPointer.h",
+ "android/hardware/tests/pointer/1.0/BpHwPointer.h",
"android/hardware/tests/pointer/1.0/BsPointer.h",
],
}
diff --git a/tests/pointer/Android.mk b/tests/pointer/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/tests/pointer/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/thermal/1.0/vts/functional/Android.mk b/thermal/1.0/vts/functional/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/thermal/1.0/vts/functional/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/thermal/1.0/vts/functional/vts/Android.mk b/thermal/1.0/vts/functional/vts/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/thermal/1.0/vts/functional/vts/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/thermal/1.0/vts/functional/vts/testcases/Android.mk b/thermal/1.0/vts/functional/vts/testcases/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/thermal/1.0/vts/functional/vts/testcases/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/thermal/1.0/vts/functional/vts/testcases/hal/Android.mk b/thermal/1.0/vts/functional/vts/testcases/hal/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/thermal/1.0/vts/functional/vts/testcases/hal/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/thermal/1.0/vts/functional/vts/testcases/hal/thermal/Android.mk b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/thermal/1.0/vts/functional/vts/testcases/hal/thermal/__init__.py b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/__init__.py
diff --git a/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/Android.mk b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/__init__.py b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/__init__.py
diff --git a/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target/Android.mk b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target/Android.mk
new file mode 100644
index 0000000..1c3ceb3
--- /dev/null
+++ b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target/Android.mk
@@ -0,0 +1,25 @@
+#
+# 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)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := ThermalHidlTargetTest
+VTS_CONFIG_SRC_DIR := testcases/hal/thermal/hidl/target
+include test/vts/tools/build/Android.host_config.mk
diff --git a/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target/AndroidTest.xml b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target/AndroidTest.xml
new file mode 100644
index 0000000..cc159b9
--- /dev/null
+++ b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS VIBRATOR HIDL HAL's target-side test cases">
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+ <option name="push-group" value="HidlHalTest.push" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+ <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+ <option name="test-module-name" value="ThermalHidlTargetTest" />
+ <option name="binary-test-sources" value="
+ _32bit::DATA/nativetest/thermal_hidl_hal_test/thermal_hidl_hal_test,
+ _64bit::DATA/nativetest64/thermal_hidl_hal_test/thermal_hidl_hal_test,
+ "/>
+ <option name="binary-test-type" value="gtest" />
+ <option name="test-timeout" value="1m" />
+ </test>
+</configuration>
+
diff --git a/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target_profiling/Android.mk b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target_profiling/Android.mk
new file mode 100644
index 0000000..1f937fa
--- /dev/null
+++ b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target_profiling/Android.mk
@@ -0,0 +1,23 @@
+#
+# 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 $(CLEAR_VARS)
+
+LOCAL_MODULE := ThermalHidlTargetProfilingTest
+VTS_CONFIG_SRC_DIR := testcases/hal/thermal/hidl/target_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target_profiling/AndroidTest.xml b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..e5153de
--- /dev/null
+++ b/thermal/1.0/vts/functional/vts/testcases/hal/thermal/hidl/target_profiling/AndroidTest.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS THERMAL HIDL HAL's target-side test cases">
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+ <option name="push-group" value="HidlHalTest.push" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+ <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+ <option name="test-module-name" value="ThermalHidlTargetProfilingTest" />
+ <option name="binary-test-sources" value="
+ _32bit::DATA/nativetest/thermal_hidl_hal_test/thermal_hidl_hal_test,
+ _64bit::DATA/nativetest64/thermal_hidl_hal_test/thermal_hidl_hal_test,
+ "/>
+ <option name="binary-test-type" value="gtest" />
+ <option name="test-timeout" value="1m" />
+ <option name="enable-profiling" value="true" />
+ </test>
+</configuration>
+
diff --git a/thermal/Android.mk b/thermal/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/thermal/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/tv/Android.mk b/tv/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/tv/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/tv/cec/Android.mk b/tv/cec/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/tv/cec/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/tv/input/Android.mk b/tv/input/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/tv/input/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/vehicle/Android.mk b/vehicle/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/vehicle/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/vibrator/1.0/vts/functional/Android.mk b/vibrator/1.0/vts/functional/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/vibrator/1.0/vts/functional/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/vibrator/1.0/vts/functional/vts/Android.mk b/vibrator/1.0/vts/functional/vts/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/vibrator/1.0/vts/functional/vts/testcases/Android.mk b/vibrator/1.0/vts/functional/vts/testcases/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/testcases/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/vibrator/1.0/vts/functional/vts/testcases/hal/Android.mk b/vibrator/1.0/vts/functional/vts/testcases/hal/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/Android.mk b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/__init__.py b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/__init__.py
diff --git a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/Android.mk b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/__init__.py b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/__init__.py
diff --git a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/Android.mk b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/Android.mk
new file mode 100644
index 0000000..d005450
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/Android.mk
@@ -0,0 +1,23 @@
+#
+# 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 $(CLEAR_VARS)
+
+LOCAL_MODULE := VibratorHidlTest
+VTS_CONFIG_SRC_DIR := testcases/hal/vibrator/hidl/host
+include test/vts/tools/build/Android.host_config.mk
\ No newline at end of file
diff --git a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/AndroidTest.xml b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/AndroidTest.xml
new file mode 100644
index 0000000..c5074ee
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/AndroidTest.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS HAL vibrator test cases">
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+ <option name="push-group" value="HidlHalTest.push" />
+ <option name="cleanup" value="true" />
+ <option name="push" value="spec/hardware/interfaces/vibrator/1.0/vts/Vibrator.vts->/data/local/tmp/spec/Vibrator.vts" />
+ <option name="push" value="spec/hardware/interfaces/vibrator/1.0/vts/types.vts->/data/local/tmp/spec/types.vts" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+ <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+ <option name="test-module-name" value="VibratorHidlTest" />
+ <option name="test-case-path" value="vts/testcases/hal/vibrator/hidl/host/VibratorHidlTest" />
+ </test>
+</configuration>
diff --git a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/VibratorHidlTest.py b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/VibratorHidlTest.py
new file mode 100644
index 0000000..cf8997b
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/VibratorHidlTest.py
@@ -0,0 +1,81 @@
+#!/usr/bin/env python3.4
+#
+# 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.
+#
+
+import logging
+import time
+
+from vts.runners.host import asserts
+from vts.runners.host import base_test_with_webdb
+from vts.runners.host import test_runner
+from vts.utils.python.controllers import android_device
+from vts.utils.python.profiling import profiling_utils
+
+
+class VibratorHidlTest(base_test_with_webdb.BaseTestWithWebDbClass):
+ """A simple testcase for the VIBRATOR HIDL HAL."""
+
+ def setUpClass(self):
+ """Creates a mirror and turns on the framework-layer VIBRATOR service."""
+ self.dut = self.registerController(android_device)[0]
+
+ self.dut.shell.InvokeTerminal("one")
+ self.dut.shell.one.Execute("setenforce 0") # SELinux permissive mode
+
+ # Test using the binderized mode
+ self.dut.shell.one.Execute(
+ "setprop vts.hal.vts.hidl.get_stub true")
+
+ if getattr(self, self.ENABLE_PROFILING, False):
+ profiling_utils.EnableVTSProfiling(self.dut.shell.one)
+
+ self.dut.hal.InitHidlHal(
+ target_type="vibrator",
+ target_basepaths=self.dut.libPaths,
+ target_version=1.0,
+ target_package="android.hardware.vibrator",
+ target_component_name="IVibrator",
+ bits=64 if self.dut.is64Bit else 32)
+
+ def tearDownClass(self):
+ """ If profiling is enabled for the test, collect the profiling data
+ and disable profiling after the test is done.
+ """
+ if getattr(self, self.ENABLE_PROFILING, False):
+ profiling_trace_path = getattr(
+ self, self.VTS_PROFILING_TRACING_PATH, "")
+ self.ProcessAndUploadTraceData(self.dut, profiling_trace_path)
+ profiling_utils.DisableVTSProfiling(self.dut.shell.one)
+
+ def testVibratorBasic(self):
+ """A simple test case which just calls each registered function."""
+ vibrator_types = self.dut.hal.vibrator.GetHidlTypeInterface("types")
+ logging.info("vibrator_types: %s", vibrator_types)
+ logging.info("OK: %s", vibrator_types.OK)
+ logging.info("ERR: %s", vibrator_types.ERR)
+
+ result = self.dut.hal.vibrator.on(10000)
+ logging.info("on result: %s", result)
+ asserts.assertEqual(vibrator_types.OK, result)
+
+ time.sleep(1)
+
+ result = self.dut.hal.vibrator.off()
+ logging.info("off result: %s", result)
+ asserts.assertEqual(vibrator_types.OK, result)
+
+if __name__ == "__main__":
+ test_runner.main()
diff --git a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/__init__.py b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host/__init__.py
diff --git a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host_profiling/Android.mk b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host_profiling/Android.mk
new file mode 100644
index 0000000..ec73e06
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host_profiling/Android.mk
@@ -0,0 +1,23 @@
+#
+# 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 $(CLEAR_VARS)
+
+LOCAL_MODULE := VibratorHidlProfilingTest
+VTS_CONFIG_SRC_DIR := testcases/hal/vibrator/hidl/host_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host_profiling/AndroidTest.xml b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host_profiling/AndroidTest.xml
new file mode 100644
index 0000000..54830f0
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/host_profiling/AndroidTest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS HAL vibrator test cases">
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+ <option name="push-group" value="HidlHalTest.push" />
+ <option name="cleanup" value="true" />
+ <option name="push" value="spec/hardware/interfaces/vibrator/1.0/vts/Vibrator.vts->/data/local/tmp/spec/Vibrator.vts" />
+ <option name="push" value="spec/hardware/interfaces/vibrator/1.0/vts/types.vts->/data/local/tmp/spec/types.vts" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+ <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+ <option name="test-module-name" value="VibratorHidlProfilingTest" />
+ <option name="test-case-path" value="vts/testcases/hal/vibrator/hidl/host/VibratorHidlTest" />
+ <option name="enable-profiling" value="true" />
+ </test>
+</configuration>
diff --git a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/target/Android.bp b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/target/Android.bp
new file mode 100644
index 0000000..b6ee3a3
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/target/Android.bp
@@ -0,0 +1,33 @@
+#
+# 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)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := VibratorHidlTargetTest
+VTS_CONFIG_SRC_DIR := testcases/hal/vibrator/hidl/target
+LOCAL_MODULE_CLASS := FAKE
+LOCAL_IS_HOST_MODULE := true
+LOCAL_COMPATIBILITY_SUITE := vts
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE):
+ @echo "VTS host-driven test target: $(LOCAL_MODULE)"
+ $(hide) touch $@
diff --git a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/target/Android.mk b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/target/Android.mk
new file mode 100644
index 0000000..704d985
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/target/Android.mk
@@ -0,0 +1,25 @@
+#
+# 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)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := VibratorHidlTargetTest
+VTS_CONFIG_SRC_DIR := testcases/hal/vibrator/hidl/target
+include test/vts/tools/build/Android.host_config.mk
diff --git a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/target/AndroidTest.xml b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/target/AndroidTest.xml
new file mode 100644
index 0000000..7948c86
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/target/AndroidTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS VIBRATOR HIDL HAL's target-side test cases">
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+ <option name="push-group" value="HidlHalTest.push" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+ <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+ <option name="test-module-name" value="VibratorHidlTargetTest" />
+ <option name="binary-test-sources" value="
+ _32bit::DATA/nativetest/vibrator_hidl_hal_test/vibrator_hidl_hal_test,
+ _64bit::DATA/nativetest64/vibrator_hidl_hal_test/vibrator_hidl_hal_test,
+ "/>
+ <option name="binary-test-type" value="gtest" />
+ <option name="test-timeout" value="1m" />
+ </test>
+</configuration>
+
diff --git a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/target_profiling/Android.mk b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/target_profiling/Android.mk
new file mode 100644
index 0000000..a1f43e4
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/target_profiling/Android.mk
@@ -0,0 +1,23 @@
+#
+# 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 $(CLEAR_VARS)
+
+LOCAL_MODULE := VibratorHidlTargetProfilingTest
+VTS_CONFIG_SRC_DIR := testcases/hal/vibrator/hidl/target_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/target_profiling/AndroidTest.xml b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..4643e23
--- /dev/null
+++ b/vibrator/1.0/vts/functional/vts/testcases/hal/vibrator/hidl/target_profiling/AndroidTest.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for VTS VIBRATOR HIDL HAL's target-side test cases">
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
+ <option name="push-group" value="HidlHalTest.push" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
+ <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
+ <option name="test-module-name" value="VibratorHidlTargetProfilingTest" />
+ <option name="binary-test-sources" value="
+ _32bit::DATA/nativetest/vibrator_hidl_hal_test/vibrator_hidl_hal_test,
+ _64bit::DATA/nativetest64/vibrator_hidl_hal_test/vibrator_hidl_hal_test,
+ "/>
+ <option name="binary-test-type" value="gtest" />
+ <option name="test-timeout" value="1m" />
+ <option name="enable-profiling" value="true" />
+ </test>
+</configuration>
+
diff --git a/vibrator/Android.mk b/vibrator/Android.mk
new file mode 100644
index 0000000..f9e3276
--- /dev/null
+++ b/vibrator/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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/wifi/1.0/Android.bp b/wifi/1.0/Android.bp
index f031183..049d5d7 100644
--- a/wifi/1.0/Android.bp
+++ b/wifi/1.0/Android.bp
@@ -62,68 +62,68 @@
"android/hardware/wifi/1.0/types.h",
"android/hardware/wifi/1.0/IWifi.h",
"android/hardware/wifi/1.0/IHwWifi.h",
- "android/hardware/wifi/1.0/BnWifi.h",
- "android/hardware/wifi/1.0/BpWifi.h",
+ "android/hardware/wifi/1.0/BnHwWifi.h",
+ "android/hardware/wifi/1.0/BpHwWifi.h",
"android/hardware/wifi/1.0/BsWifi.h",
"android/hardware/wifi/1.0/IWifiApIface.h",
"android/hardware/wifi/1.0/IHwWifiApIface.h",
- "android/hardware/wifi/1.0/BnWifiApIface.h",
- "android/hardware/wifi/1.0/BpWifiApIface.h",
+ "android/hardware/wifi/1.0/BnHwWifiApIface.h",
+ "android/hardware/wifi/1.0/BpHwWifiApIface.h",
"android/hardware/wifi/1.0/BsWifiApIface.h",
"android/hardware/wifi/1.0/IWifiChip.h",
"android/hardware/wifi/1.0/IHwWifiChip.h",
- "android/hardware/wifi/1.0/BnWifiChip.h",
- "android/hardware/wifi/1.0/BpWifiChip.h",
+ "android/hardware/wifi/1.0/BnHwWifiChip.h",
+ "android/hardware/wifi/1.0/BpHwWifiChip.h",
"android/hardware/wifi/1.0/BsWifiChip.h",
"android/hardware/wifi/1.0/IWifiChipEventCallback.h",
"android/hardware/wifi/1.0/IHwWifiChipEventCallback.h",
- "android/hardware/wifi/1.0/BnWifiChipEventCallback.h",
- "android/hardware/wifi/1.0/BpWifiChipEventCallback.h",
+ "android/hardware/wifi/1.0/BnHwWifiChipEventCallback.h",
+ "android/hardware/wifi/1.0/BpHwWifiChipEventCallback.h",
"android/hardware/wifi/1.0/BsWifiChipEventCallback.h",
"android/hardware/wifi/1.0/IWifiEventCallback.h",
"android/hardware/wifi/1.0/IHwWifiEventCallback.h",
- "android/hardware/wifi/1.0/BnWifiEventCallback.h",
- "android/hardware/wifi/1.0/BpWifiEventCallback.h",
+ "android/hardware/wifi/1.0/BnHwWifiEventCallback.h",
+ "android/hardware/wifi/1.0/BpHwWifiEventCallback.h",
"android/hardware/wifi/1.0/BsWifiEventCallback.h",
"android/hardware/wifi/1.0/IWifiIface.h",
"android/hardware/wifi/1.0/IHwWifiIface.h",
- "android/hardware/wifi/1.0/BnWifiIface.h",
- "android/hardware/wifi/1.0/BpWifiIface.h",
+ "android/hardware/wifi/1.0/BnHwWifiIface.h",
+ "android/hardware/wifi/1.0/BpHwWifiIface.h",
"android/hardware/wifi/1.0/BsWifiIface.h",
"android/hardware/wifi/1.0/IWifiNanIface.h",
"android/hardware/wifi/1.0/IHwWifiNanIface.h",
- "android/hardware/wifi/1.0/BnWifiNanIface.h",
- "android/hardware/wifi/1.0/BpWifiNanIface.h",
+ "android/hardware/wifi/1.0/BnHwWifiNanIface.h",
+ "android/hardware/wifi/1.0/BpHwWifiNanIface.h",
"android/hardware/wifi/1.0/BsWifiNanIface.h",
"android/hardware/wifi/1.0/IWifiNanIfaceEventCallback.h",
"android/hardware/wifi/1.0/IHwWifiNanIfaceEventCallback.h",
- "android/hardware/wifi/1.0/BnWifiNanIfaceEventCallback.h",
- "android/hardware/wifi/1.0/BpWifiNanIfaceEventCallback.h",
+ "android/hardware/wifi/1.0/BnHwWifiNanIfaceEventCallback.h",
+ "android/hardware/wifi/1.0/BpHwWifiNanIfaceEventCallback.h",
"android/hardware/wifi/1.0/BsWifiNanIfaceEventCallback.h",
"android/hardware/wifi/1.0/IWifiP2pIface.h",
"android/hardware/wifi/1.0/IHwWifiP2pIface.h",
- "android/hardware/wifi/1.0/BnWifiP2pIface.h",
- "android/hardware/wifi/1.0/BpWifiP2pIface.h",
+ "android/hardware/wifi/1.0/BnHwWifiP2pIface.h",
+ "android/hardware/wifi/1.0/BpHwWifiP2pIface.h",
"android/hardware/wifi/1.0/BsWifiP2pIface.h",
"android/hardware/wifi/1.0/IWifiRttController.h",
"android/hardware/wifi/1.0/IHwWifiRttController.h",
- "android/hardware/wifi/1.0/BnWifiRttController.h",
- "android/hardware/wifi/1.0/BpWifiRttController.h",
+ "android/hardware/wifi/1.0/BnHwWifiRttController.h",
+ "android/hardware/wifi/1.0/BpHwWifiRttController.h",
"android/hardware/wifi/1.0/BsWifiRttController.h",
"android/hardware/wifi/1.0/IWifiRttControllerEventCallback.h",
"android/hardware/wifi/1.0/IHwWifiRttControllerEventCallback.h",
- "android/hardware/wifi/1.0/BnWifiRttControllerEventCallback.h",
- "android/hardware/wifi/1.0/BpWifiRttControllerEventCallback.h",
+ "android/hardware/wifi/1.0/BnHwWifiRttControllerEventCallback.h",
+ "android/hardware/wifi/1.0/BpHwWifiRttControllerEventCallback.h",
"android/hardware/wifi/1.0/BsWifiRttControllerEventCallback.h",
"android/hardware/wifi/1.0/IWifiStaIface.h",
"android/hardware/wifi/1.0/IHwWifiStaIface.h",
- "android/hardware/wifi/1.0/BnWifiStaIface.h",
- "android/hardware/wifi/1.0/BpWifiStaIface.h",
+ "android/hardware/wifi/1.0/BnHwWifiStaIface.h",
+ "android/hardware/wifi/1.0/BpHwWifiStaIface.h",
"android/hardware/wifi/1.0/BsWifiStaIface.h",
"android/hardware/wifi/1.0/IWifiStaIfaceEventCallback.h",
"android/hardware/wifi/1.0/IHwWifiStaIfaceEventCallback.h",
- "android/hardware/wifi/1.0/BnWifiStaIfaceEventCallback.h",
- "android/hardware/wifi/1.0/BpWifiStaIfaceEventCallback.h",
+ "android/hardware/wifi/1.0/BnHwWifiStaIfaceEventCallback.h",
+ "android/hardware/wifi/1.0/BpHwWifiStaIfaceEventCallback.h",
"android/hardware/wifi/1.0/BsWifiStaIfaceEventCallback.h",
],
}
diff --git a/wifi/supplicant/1.0/Android.bp b/wifi/supplicant/1.0/Android.bp
index 3100391..261d940 100644
--- a/wifi/supplicant/1.0/Android.bp
+++ b/wifi/supplicant/1.0/Android.bp
@@ -59,63 +59,63 @@
"android/hardware/wifi/supplicant/1.0/types.h",
"android/hardware/wifi/supplicant/1.0/ISupplicant.h",
"android/hardware/wifi/supplicant/1.0/IHwSupplicant.h",
- "android/hardware/wifi/supplicant/1.0/BnSupplicant.h",
- "android/hardware/wifi/supplicant/1.0/BpSupplicant.h",
+ "android/hardware/wifi/supplicant/1.0/BnHwSupplicant.h",
+ "android/hardware/wifi/supplicant/1.0/BpHwSupplicant.h",
"android/hardware/wifi/supplicant/1.0/BsSupplicant.h",
"android/hardware/wifi/supplicant/1.0/ISupplicantCallback.h",
"android/hardware/wifi/supplicant/1.0/IHwSupplicantCallback.h",
- "android/hardware/wifi/supplicant/1.0/BnSupplicantCallback.h",
- "android/hardware/wifi/supplicant/1.0/BpSupplicantCallback.h",
+ "android/hardware/wifi/supplicant/1.0/BnHwSupplicantCallback.h",
+ "android/hardware/wifi/supplicant/1.0/BpHwSupplicantCallback.h",
"android/hardware/wifi/supplicant/1.0/BsSupplicantCallback.h",
"android/hardware/wifi/supplicant/1.0/ISupplicantIface.h",
"android/hardware/wifi/supplicant/1.0/IHwSupplicantIface.h",
- "android/hardware/wifi/supplicant/1.0/BnSupplicantIface.h",
- "android/hardware/wifi/supplicant/1.0/BpSupplicantIface.h",
+ "android/hardware/wifi/supplicant/1.0/BnHwSupplicantIface.h",
+ "android/hardware/wifi/supplicant/1.0/BpHwSupplicantIface.h",
"android/hardware/wifi/supplicant/1.0/BsSupplicantIface.h",
"android/hardware/wifi/supplicant/1.0/ISupplicantNetwork.h",
"android/hardware/wifi/supplicant/1.0/IHwSupplicantNetwork.h",
- "android/hardware/wifi/supplicant/1.0/BnSupplicantNetwork.h",
- "android/hardware/wifi/supplicant/1.0/BpSupplicantNetwork.h",
+ "android/hardware/wifi/supplicant/1.0/BnHwSupplicantNetwork.h",
+ "android/hardware/wifi/supplicant/1.0/BpHwSupplicantNetwork.h",
"android/hardware/wifi/supplicant/1.0/BsSupplicantNetwork.h",
"android/hardware/wifi/supplicant/1.0/ISupplicantP2pIface.h",
"android/hardware/wifi/supplicant/1.0/IHwSupplicantP2pIface.h",
- "android/hardware/wifi/supplicant/1.0/BnSupplicantP2pIface.h",
- "android/hardware/wifi/supplicant/1.0/BpSupplicantP2pIface.h",
+ "android/hardware/wifi/supplicant/1.0/BnHwSupplicantP2pIface.h",
+ "android/hardware/wifi/supplicant/1.0/BpHwSupplicantP2pIface.h",
"android/hardware/wifi/supplicant/1.0/BsSupplicantP2pIface.h",
"android/hardware/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.h",
"android/hardware/wifi/supplicant/1.0/IHwSupplicantP2pIfaceCallback.h",
- "android/hardware/wifi/supplicant/1.0/BnSupplicantP2pIfaceCallback.h",
- "android/hardware/wifi/supplicant/1.0/BpSupplicantP2pIfaceCallback.h",
+ "android/hardware/wifi/supplicant/1.0/BnHwSupplicantP2pIfaceCallback.h",
+ "android/hardware/wifi/supplicant/1.0/BpHwSupplicantP2pIfaceCallback.h",
"android/hardware/wifi/supplicant/1.0/BsSupplicantP2pIfaceCallback.h",
"android/hardware/wifi/supplicant/1.0/ISupplicantP2pNetwork.h",
"android/hardware/wifi/supplicant/1.0/IHwSupplicantP2pNetwork.h",
- "android/hardware/wifi/supplicant/1.0/BnSupplicantP2pNetwork.h",
- "android/hardware/wifi/supplicant/1.0/BpSupplicantP2pNetwork.h",
+ "android/hardware/wifi/supplicant/1.0/BnHwSupplicantP2pNetwork.h",
+ "android/hardware/wifi/supplicant/1.0/BpHwSupplicantP2pNetwork.h",
"android/hardware/wifi/supplicant/1.0/BsSupplicantP2pNetwork.h",
"android/hardware/wifi/supplicant/1.0/ISupplicantP2pNetworkCallback.h",
"android/hardware/wifi/supplicant/1.0/IHwSupplicantP2pNetworkCallback.h",
- "android/hardware/wifi/supplicant/1.0/BnSupplicantP2pNetworkCallback.h",
- "android/hardware/wifi/supplicant/1.0/BpSupplicantP2pNetworkCallback.h",
+ "android/hardware/wifi/supplicant/1.0/BnHwSupplicantP2pNetworkCallback.h",
+ "android/hardware/wifi/supplicant/1.0/BpHwSupplicantP2pNetworkCallback.h",
"android/hardware/wifi/supplicant/1.0/BsSupplicantP2pNetworkCallback.h",
"android/hardware/wifi/supplicant/1.0/ISupplicantStaIface.h",
"android/hardware/wifi/supplicant/1.0/IHwSupplicantStaIface.h",
- "android/hardware/wifi/supplicant/1.0/BnSupplicantStaIface.h",
- "android/hardware/wifi/supplicant/1.0/BpSupplicantStaIface.h",
+ "android/hardware/wifi/supplicant/1.0/BnHwSupplicantStaIface.h",
+ "android/hardware/wifi/supplicant/1.0/BpHwSupplicantStaIface.h",
"android/hardware/wifi/supplicant/1.0/BsSupplicantStaIface.h",
"android/hardware/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.h",
"android/hardware/wifi/supplicant/1.0/IHwSupplicantStaIfaceCallback.h",
- "android/hardware/wifi/supplicant/1.0/BnSupplicantStaIfaceCallback.h",
- "android/hardware/wifi/supplicant/1.0/BpSupplicantStaIfaceCallback.h",
+ "android/hardware/wifi/supplicant/1.0/BnHwSupplicantStaIfaceCallback.h",
+ "android/hardware/wifi/supplicant/1.0/BpHwSupplicantStaIfaceCallback.h",
"android/hardware/wifi/supplicant/1.0/BsSupplicantStaIfaceCallback.h",
"android/hardware/wifi/supplicant/1.0/ISupplicantStaNetwork.h",
"android/hardware/wifi/supplicant/1.0/IHwSupplicantStaNetwork.h",
- "android/hardware/wifi/supplicant/1.0/BnSupplicantStaNetwork.h",
- "android/hardware/wifi/supplicant/1.0/BpSupplicantStaNetwork.h",
+ "android/hardware/wifi/supplicant/1.0/BnHwSupplicantStaNetwork.h",
+ "android/hardware/wifi/supplicant/1.0/BpHwSupplicantStaNetwork.h",
"android/hardware/wifi/supplicant/1.0/BsSupplicantStaNetwork.h",
"android/hardware/wifi/supplicant/1.0/ISupplicantStaNetworkCallback.h",
"android/hardware/wifi/supplicant/1.0/IHwSupplicantStaNetworkCallback.h",
- "android/hardware/wifi/supplicant/1.0/BnSupplicantStaNetworkCallback.h",
- "android/hardware/wifi/supplicant/1.0/BpSupplicantStaNetworkCallback.h",
+ "android/hardware/wifi/supplicant/1.0/BnHwSupplicantStaNetworkCallback.h",
+ "android/hardware/wifi/supplicant/1.0/BpHwSupplicantStaNetworkCallback.h",
"android/hardware/wifi/supplicant/1.0/BsSupplicantStaNetworkCallback.h",
],
}