Merge "Add GnssLocationFlag enum"
diff --git a/contexthub/1.0/IContexthub.hal b/contexthub/1.0/IContexthub.hal
index 2c864a2..1d136d3 100644
--- a/contexthub/1.0/IContexthub.hal
+++ b/contexthub/1.0/IContexthub.hal
@@ -161,18 +161,4 @@
      *
      */
     queryApps(uint32_t hubId) generates (Result result);
-
-    /**
-     * Reboots context hub OS, restarts all the nanoApps.
-     * No reboot notification is sent to nanoApps; reboot happens immediately
-     * and unconditionally; all volatile contexthub state and any data is lost
-     * as a result.
-     *
-     * @param hubId identifer of the contextHub
-     *
-     * @return result OK on success
-     *                BAD_VALUE if parameters are not sane
-     *
-     */
-    reboot(uint32_t hubId) generates (Result result);
 };
diff --git a/light/2.0/vts/functional/vts/testcases/hal/light/hidl/target_profiling/Android.mk b/light/2.0/vts/functional/vts/testcases/hal/light/hidl/target_profiling/Android.mk
new file mode 100644
index 0000000..939929d
--- /dev/null
+++ b/light/2.0/vts/functional/vts/testcases/hal/light/hidl/target_profiling/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 := LightHidlTargetProfilingTest
+VTS_CONFIG_SRC_DIR := testcases/hal/light/hidl/target_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/light/2.0/vts/functional/vts/testcases/hal/light/hidl/target_profiling/AndroidTest.xml b/light/2.0/vts/functional/vts/testcases/hal/light/hidl/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..b800fba
--- /dev/null
+++ b/light/2.0/vts/functional/vts/testcases/hal/light/hidl/target_profiling/AndroidTest.xml
@@ -0,0 +1,33 @@
+<?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 Light 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="LightHidlTargetProfilingTest" />
+        <option name="binary-test-sources" value="
+            _32bit::DATA/nativetest/light_hidl_hal_test/light_hidl_hal_test,
+            _64bit::DATA/nativetest64/light_hidl_hal_test/light_hidl_hal_test,
+            "/>
+        <option name="test-config-path" value="vts/testcases/hal/light/hidl/target/HalLightHidlTargetBasicTest.config" />
+        <option name="binary-test-type" value="gtest" />
+        <option name="test-timeout" value="1m" />
+        <option name="enable-profiling" value="true" />
+    </test>
+</configuration>
+
diff --git a/memtrack/1.0/vts/functional/vts/testcases/hal/memtrack/hidl/target_profiling/Android.mk b/memtrack/1.0/vts/functional/vts/testcases/hal/memtrack/hidl/target_profiling/Android.mk
new file mode 100644
index 0000000..d397621
--- /dev/null
+++ b/memtrack/1.0/vts/functional/vts/testcases/hal/memtrack/hidl/target_profiling/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 := HalMemtrackHidlTargetProfilingTest
+VTS_CONFIG_SRC_DIR := testcases/hal/memtrack/hidl/target_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/memtrack/1.0/vts/functional/vts/testcases/hal/memtrack/hidl/target_profiling/AndroidTest.xml b/memtrack/1.0/vts/functional/vts/testcases/hal/memtrack/hidl/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..d813be1
--- /dev/null
+++ b/memtrack/1.0/vts/functional/vts/testcases/hal/memtrack/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 Memtrack 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="HalMemtrackHidlTargetProfilingTest"/>
+        <option name="binary-test-sources" value="
+            _32bit::DATA/nativetest/memtrack_hidl_hal_test/memtrack_hidl_hal_test,
+            _64bit::DATA/nativetest64/memtrack_hidl_hal_test/memtrack_hidl_hal_test,
+            "/>
+        <option name="binary-test-type" value="gtest" />
+        <option name="test-timeout" value="5m" />
+        <option name="enable-profiling" value="true" />
+    </test>
+</configuration>
diff --git a/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target_profiling/Android.mk b/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target_profiling/Android.mk
new file mode 100644
index 0000000..6f9e399
--- /dev/null
+++ b/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target_profiling/Android.mk
@@ -0,0 +1,26 @@
+#
+# 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 := HalPowerHidlTargetProfilingTest
+VTS_CONFIG_SRC_DIR := testcases/hal/power/hidl/target_profiling
+include test/vts/tools/build/Android.host_config.mk
+
diff --git a/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target_profiling/AndroidTest.xml b/power/1.0/vts/functional/vts/testcases/hal/power/hidl/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..e8ef928
--- /dev/null
+++ b/power/1.0/vts/functional/vts/testcases/hal/power/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 Power 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="HalPowerHidlTargetProfilingTest"/>
+        <option name="binary-test-sources" value="
+            _32bit::DATA/nativetest/power_hidl_hal_test/power_hidl_hal_test,
+            _64bit::DATA/nativetest64/power_hidl_hal_test/power_hidl_hal_test,
+            "/>
+        <option name="test-config-path" value="vts/testcases/hal/power/hidl/target/HalPowerHidlTargetTest.config" />
+        <option name="binary-test-type" value="gtest" />
+        <option name="test-timeout" value="1m" />
+        <option name="enable-profiling" value="true" />
+    </test>
+</configuration>
diff --git a/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/host_profiling/Android.mk b/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/host_profiling/Android.mk
new file mode 100644
index 0000000..6029cc0
--- /dev/null
+++ b/sensors/1.0/vts/functional/vts/testcases/hal/sensors/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 := SensorsHidlProfilingTest
+VTS_CONFIG_SRC_DIR := testcases/hal/sensors/hidl/host_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/host_profiling/AndroidTest.xml b/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/host_profiling/AndroidTest.xml
new file mode 100644
index 0000000..c056d90
--- /dev/null
+++ b/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/host_profiling/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 sensors 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/sensors/1.0/vts/Sensors.vts->/data/local/tmp/spec/Sensors.vts" />
+        <option name="push" value="spec/hardware/interfaces/sensors/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="SensorsHidlProfilingTest" />
+        <option name="test-case-path" value="vts/testcases/hal/sensors/hidl/host/SensorsHidlTest" />
+        <option name="test-timeout" value="3m" />
+        <option name="enable-profiling" value="true" />
+    </test>
+</configuration>
diff --git a/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/target_profiling/Android.mk b/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/target_profiling/Android.mk
new file mode 100644
index 0000000..1b81381
--- /dev/null
+++ b/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/target_profiling/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 := SensorsHidlTargetProfilingTest
+VTS_CONFIG_SRC_DIR := testcases/hal/sensors/hidl/target_profiling
+include test/vts/tools/build/Android.host_config.mk
diff --git a/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/target_profiling/AndroidTest.xml b/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/target_profiling/AndroidTest.xml
new file mode 100644
index 0000000..80e46b7
--- /dev/null
+++ b/sensors/1.0/vts/functional/vts/testcases/hal/sensors/hidl/target_profiling/AndroidTest.xml
@@ -0,0 +1,33 @@
+<?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 sensors 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="SensorsHidlTargetProfilingTest" />
+        <option name="binary-test-sources" value="
+            _32bit::DATA/nativetest/sensors_hidl_hal_test/sensors_hidl_hal_test,
+            _64bit::DATA/nativetest64/sensors_hidl_hal_test/sensors_hidl_hal_test,
+            "/>
+        <option name="binary-test-type" value="gtest" />
+        <option name="binary-test-disable-framework" value="true" />
+        <option name="test-timeout" value="10m" />
+        <option name="enable-profiling" value="true" />
+    </test>
+</configuration>
+
diff --git a/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/target/HalSoundTriggerHidlTargetBasicTest.config b/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/target/HalSoundTriggerHidlTargetBasicTest.config
index 7558911..5c12d13 100644
--- a/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/target/HalSoundTriggerHidlTargetBasicTest.config
+++ b/soundtrigger/2.0/vts/functional/vts/testcases/hal/soundtrigger/hidl/target/HalSoundTriggerHidlTargetBasicTest.config
@@ -7,35 +7,35 @@
             "git_project": {
                 "name": "platform/vendor/lge/bullhead",
                 "path": "vendor/lge/bullhead"
-            },
+            }
         },
         {
             "module_name": "system/lib/hw/sound_trigger.primary.angler",
             "git_project": {
                 "name": "platform/vendor/huawei/angler",
                 "path": "vendor/huawei/angler"
-            },
+            }
         },
         {
             "module_name": "system/lib/hw/sound_trigger.primary.marlin",
             "git_project": {
                 "name": "platform/vendor/google_devices/marlin",
                 "path": "vendor/google_devices/marlin"
-            },
+            }
         },
         {
             "module_name": "system/lib/hw/sound_trigger.primary.sailfish",
             "git_project": {
                 "name": "platform/vendor/google_devices/marlin",
                 "path": "vendor/google_devices/marlin"
-            },
+            }
         },
         {
             "module_name": "system/lib/hw/android.hardware.soundtrigger@2.0-impl",
             "git_project": {
                 "name": "platform/hardware/interfaces",
                 "path": "hardware/interfaces"
-            },
-        },
+            }
+        }
     ]
 }
diff --git a/vehicle/2.0/default/tests/VehicleHalTestUtils.h b/vehicle/2.0/default/tests/VehicleHalTestUtils.h
index e1e355e..b6a5c31 100644
--- a/vehicle/2.0/default/tests/VehicleHalTestUtils.h
+++ b/vehicle/2.0/default/tests/VehicleHalTestUtils.h
@@ -205,7 +205,7 @@
 }
 
 template <typename T>
-inline std::string toString(const hidl_vec<T>& vec) {
+inline std::string vecToString(const hidl_vec<T>& vec) {
     std::stringstream ss("[");
     for (size_t i = 0; i < vec.size(); i++) {
         if (i != 0) ss << ",";
@@ -222,10 +222,10 @@
        << "  areaId: " << hexString(v.areaId) << ",\n"
        << "  timestamp: " << v.timestamp << ",\n"
        << "  value {\n"
-       << "    int32Values: " << toString(v.value.int32Values) << ",\n"
-       << "    floatValues: " << toString(v.value.floatValues) << ",\n"
-       << "    int64Values: " << toString(v.value.int64Values) << ",\n"
-       << "    bytes: " << toString(v.value.bytes) << ",\n"
+       << "    int32Values: " << vecToString(v.value.int32Values) << ",\n"
+       << "    floatValues: " << vecToString(v.value.floatValues) << ",\n"
+       << "    int64Values: " << vecToString(v.value.int64Values) << ",\n"
+       << "    bytes: " << vecToString(v.value.bytes) << ",\n"
        << "    string: " << v.value.stringValue.c_str() << ",\n"
        << "  }\n"
        << "}\n";