Accept a command line arg (nan_on) in wifi vts
am: e034df0640

Change-Id: Ic0acbec19aa0d9fd50dc532e0076a91f58638884
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 14616e4..01b5e7b 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -55,5 +55,4 @@
 $(call add-clean-step, rm -rf $(OUT)/soong/.intermediates/)
 $(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/hardware/interfaces/)
 $(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/hardware/interfaces/)
-$(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore*" -print0 | xargs -0 rm -f)
-$(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore\@1\.1*" -print0 | xargs -0 rm -f)
+$(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore*" -print0 | xargs -0 rm -f)
\ No newline at end of file
diff --git a/OWNERS b/OWNERS
new file mode 100644
index 0000000..9fbcb47
--- /dev/null
+++ b/OWNERS
@@ -0,0 +1,5 @@
+elsk@google.com
+maco@google.com
+malchev@google.com
+smoreland@google.com
+yim@google.com  # vts tests
diff --git a/automotive/vehicle/2.0/default/tests/VehicleHalTestUtils.h b/automotive/vehicle/2.0/default/tests/VehicleHalTestUtils.h
index 28e1a5a..2a06417 100644
--- a/automotive/vehicle/2.0/default/tests/VehicleHalTestUtils.h
+++ b/automotive/vehicle/2.0/default/tests/VehicleHalTestUtils.h
@@ -222,54 +222,6 @@
     return ss.str();
 }
 
-inline std::string toString(const VehiclePropValue &v) {
-    std::stringstream ss;
-    ss << "VehiclePropValue {n"
-       << "  prop: " << hexString(v.prop) << ",\n"
-       << "  areaId: " << hexString(v.areaId) << ",\n"
-       << "  timestamp: " << v.timestamp << ",\n"
-       << "  value {\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";
-
-    return ss.str();
-}
-
-inline std::string toString(const VehiclePropConfig &config) {
-    std::stringstream ss;
-    ss << "VehiclePropConfig {\n"
-       << "  prop: " << hexString(config.prop) << ",\n"
-       << "  supportedAreas: " << hexString(config.supportedAreas) << ",\n"
-       << "  access: " << enumToHexString(config.access) << ",\n"
-       << "  changeMode: " << enumToHexString(config.changeMode) << ",\n"
-       << "  configFlags: " << hexString(config.configFlags) << ",\n"
-       << "  minSampleRate: " << config.minSampleRate << ",\n"
-       << "  maxSampleRate: " << config.maxSampleRate << ",\n"
-       << "  configString: " << config.configString.c_str() << ",\n";
-
-    ss << "  areaConfigs {\n";
-    for (size_t i = 0; i < config.areaConfigs.size(); i++) {
-        const auto &area = config.areaConfigs[i];
-        ss << "    areaId: " << hexString(area.areaId) << ",\n"
-           << "    minFloatValue: " << area.minFloatValue << ",\n"
-           << "    minFloatValue: " << area.maxFloatValue << ",\n"
-           << "    minInt32Value: " << area.minInt32Value << ",\n"
-           << "    minInt32Value: " << area.maxInt32Value << ",\n"
-           << "    minInt64Value: " << area.minInt64Value << ",\n"
-           << "    minInt64Value: " << area.maxInt64Value << ",\n";
-    }
-    ss << "  }\n"
-       << "}\n";
-
-    return ss.str();
-}
-
-
 }  // namespace V2_0
 }  // namespace vehicle
 }  // namespace automotive
diff --git a/bluetooth/1.0/default/bluetooth_hci.h b/bluetooth/1.0/default/bluetooth_hci.h
index 6912405..e2797b1 100644
--- a/bluetooth/1.0/default/bluetooth_hci.h
+++ b/bluetooth/1.0/default/bluetooth_hci.h
@@ -21,6 +21,8 @@
 
 #include <hidl/MQDescriptor.h>
 
+#include <functional>
+
 namespace android {
 namespace hardware {
 namespace bluetooth {
diff --git a/bluetooth/1.0/default/hci_protocol.cc b/bluetooth/1.0/default/hci_protocol.cc
index a208da1..5d6f1d1 100644
--- a/bluetooth/1.0/default/hci_protocol.cc
+++ b/bluetooth/1.0/default/hci_protocol.cc
@@ -18,6 +18,7 @@
 
 #define LOG_TAG "android.hardware.bluetooth-hci-hci_protocol"
 #include <assert.h>
+#include <errno.h>
 #include <fcntl.h>
 #include <log/log.h>
 
diff --git a/bluetooth/1.0/vts/functional/Android.bp b/bluetooth/1.0/vts/functional/Android.bp
index d2e6553..cd2be44 100644
--- a/bluetooth/1.0/vts/functional/Android.bp
+++ b/bluetooth/1.0/vts/functional/Android.bp
@@ -28,7 +28,10 @@
         "libutils",
         "android.hardware.bluetooth@1.0",
     ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
+    static_libs: [
+        "VtsHalHidlTargetTestBase",
+        "libbluetooth-types",
+    ],
     cflags: [
         "-O0",
         "-g",
diff --git a/compatibility_matrix.26.xml b/compatibility_matrix.26.xml
index 8c715dd..9aa5418 100644
--- a/compatibility_matrix.26.xml
+++ b/compatibility_matrix.26.xml
@@ -73,7 +73,7 @@
     </hal>
     <hal format="hidl" optional="false">
         <name>android.hardware.configstore</name>
-        <version>1.0</version>
+        <version>1.0-1</version>
         <interface>
             <name>ISurfaceFlingerConfigs</name>
             <instance>default</instance>
diff --git a/compatibility_matrix.current.xml b/compatibility_matrix.current.xml
index e3c4e15..9603bd6 100644
--- a/compatibility_matrix.current.xml
+++ b/compatibility_matrix.current.xml
@@ -73,7 +73,7 @@
     </hal>
     <hal format="hidl" optional="false">
         <name>android.hardware.configstore</name>
-        <version>1.0</version>
+        <version>1.0-1</version>
         <interface>
             <name>ISurfaceFlingerConfigs</name>
             <instance>default</instance>
diff --git a/compatibility_matrix.legacy.xml b/compatibility_matrix.legacy.xml
index 1dbbb05..6167f25 100644
--- a/compatibility_matrix.legacy.xml
+++ b/compatibility_matrix.legacy.xml
@@ -73,7 +73,7 @@
     </hal>
     <hal format="hidl" optional="false">
         <name>android.hardware.configstore</name>
-        <version>1.0</version>
+        <version>1.0-1</version>
         <interface>
             <name>ISurfaceFlingerConfigs</name>
             <instance>default</instance>
diff --git a/configstore/1.0/default/android.hardware.configstore@1.0-service.rc b/configstore/1.0/default/android.hardware.configstore@1.0-service.rc
deleted file mode 100644
index 563d854..0000000
--- a/configstore/1.0/default/android.hardware.configstore@1.0-service.rc
+++ /dev/null
@@ -1,4 +0,0 @@
-service configstore-hal-1-0 /vendor/bin/hw/android.hardware.configstore@1.0-service
-    class hal animation
-    user system
-    group system
diff --git a/configstore/1.1/Android.bp b/configstore/1.1/Android.bp
new file mode 100644
index 0000000..2d8cb64
--- /dev/null
+++ b/configstore/1.1/Android.bp
@@ -0,0 +1,61 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+    name: "android.hardware.configstore@1.1_hal",
+    srcs: [
+        "ISurfaceFlingerConfigs.hal",
+    ],
+}
+
+genrule {
+    name: "android.hardware.configstore@1.1_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.1",
+    srcs: [
+        ":android.hardware.configstore@1.1_hal",
+    ],
+    out: [
+        "android/hardware/configstore/1.1/SurfaceFlingerConfigsAll.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.configstore@1.1_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.configstore@1.1",
+    srcs: [
+        ":android.hardware.configstore@1.1_hal",
+    ],
+    out: [
+        "android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h",
+        "android/hardware/configstore/1.1/IHwSurfaceFlingerConfigs.h",
+        "android/hardware/configstore/1.1/BnHwSurfaceFlingerConfigs.h",
+        "android/hardware/configstore/1.1/BpHwSurfaceFlingerConfigs.h",
+        "android/hardware/configstore/1.1/BsSurfaceFlingerConfigs.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.configstore@1.1",
+    defaults: ["hidl-module-defaults"],
+    generated_sources: ["android.hardware.configstore@1.1_genc++"],
+    generated_headers: ["android.hardware.configstore@1.1_genc++_headers"],
+    export_generated_headers: ["android.hardware.configstore@1.1_genc++_headers"],
+    vendor_available: true,
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "android.hardware.configstore@1.0",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "android.hardware.configstore@1.0",
+    ],
+}
diff --git a/configstore/1.1/Android.mk b/configstore/1.1/Android.mk
new file mode 100644
index 0000000..a5fa6c4
--- /dev/null
+++ b/configstore/1.1/Android.mk
@@ -0,0 +1,78 @@
+# This file is autogenerated by hidl-gen. Do not edit manually.
+
+LOCAL_PATH := $(call my-dir)
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.configstore-V1.1-java
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_JAVA_LIBRARIES := \
+    android.hardware.configstore-V1.0-java \
+    android.hidl.base-V1.0-java \
+
+
+#
+# Build ISurfaceFlingerConfigs.hal
+#
+GEN := $(intermediates)/android/hardware/configstore/V1_1/ISurfaceFlingerConfigs.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISurfaceFlingerConfigs.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.configstore@1.1::ISurfaceFlingerConfigs
+
+$(GEN): $(LOCAL_PATH)/ISurfaceFlingerConfigs.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_JAVA_LIBRARY)
+
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.configstore-V1.1-java-static
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+    android.hardware.configstore-V1.0-java-static \
+    android.hidl.base-V1.0-java-static \
+
+
+#
+# Build ISurfaceFlingerConfigs.hal
+#
+GEN := $(intermediates)/android/hardware/configstore/V1_1/ISurfaceFlingerConfigs.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISurfaceFlingerConfigs.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.configstore@1.1::ISurfaceFlingerConfigs
+
+$(GEN): $(LOCAL_PATH)/ISurfaceFlingerConfigs.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/configstore/1.1/ISurfaceFlingerConfigs.hal b/configstore/1.1/ISurfaceFlingerConfigs.hal
new file mode 100644
index 0000000..5eacbe0
--- /dev/null
+++ b/configstore/1.1/ISurfaceFlingerConfigs.hal
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.1 (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.1
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.hardware.configstore@1.1;
+
+import @1.0::ISurfaceFlingerConfigs;
+
+/**
+ * New revision of ISurfaceFlingerConfigs
+ */
+
+interface ISurfaceFlingerConfigs extends @1.0::ISurfaceFlingerConfigs {
+};
diff --git a/configstore/1.0/default/Android.mk b/configstore/1.1/default/Android.mk
similarity index 75%
rename from configstore/1.0/default/Android.mk
rename to configstore/1.1/default/Android.mk
index e017cfd..ac3d8b0 100644
--- a/configstore/1.0/default/Android.mk
+++ b/configstore/1.1/default/Android.mk
@@ -2,17 +2,18 @@
 
 ################################################################################
 include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.configstore@1.0-service
+LOCAL_MODULE := android.hardware.configstore@1.1-service
 LOCAL_PROPRIETARY_MODULE := true
 LOCAL_MODULE_CLASS := EXECUTABLES
 LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_INIT_RC := android.hardware.configstore@1.0-service.rc
+LOCAL_INIT_RC := android.hardware.configstore@1.1-service.rc
 LOCAL_SRC_FILES:= service.cpp
 
 include $(LOCAL_PATH)/surfaceflinger.mk
 
 LOCAL_SHARED_LIBRARIES := \
     android.hardware.configstore@1.0 \
+    android.hardware.configstore@1.1 \
     libhidlbase \
     libhidltransport \
     libbase \
diff --git a/configstore/1.0/default/SurfaceFlingerConfigs.cpp b/configstore/1.1/default/SurfaceFlingerConfigs.cpp
similarity index 96%
rename from configstore/1.0/default/SurfaceFlingerConfigs.cpp
rename to configstore/1.1/default/SurfaceFlingerConfigs.cpp
index 3239274..5a040f2 100644
--- a/configstore/1.0/default/SurfaceFlingerConfigs.cpp
+++ b/configstore/1.1/default/SurfaceFlingerConfigs.cpp
@@ -19,7 +19,7 @@
 namespace android {
 namespace hardware {
 namespace configstore {
-namespace V1_0 {
+namespace V1_1 {
 namespace implementation {
 
 // Methods from ::android::hardware::configstore::V1_0::ISurfaceFlingerConfigs
@@ -139,10 +139,13 @@
     return Void();
 }
 
+// Methods from ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs
+// follow.
+
 // Methods from ::android::hidl::base::V1_0::IBase follow.
 
 }  // namespace implementation
-}  // namespace V1_0
+}  // namespace V1_1
 }  // namespace configstore
 }  // namespace hardware
 }  // namespace android
diff --git a/configstore/1.0/default/SurfaceFlingerConfigs.h b/configstore/1.1/default/SurfaceFlingerConfigs.h
similarity index 77%
rename from configstore/1.0/default/SurfaceFlingerConfigs.h
rename to configstore/1.1/default/SurfaceFlingerConfigs.h
index 32e5fc3..53e8ae8 100644
--- a/configstore/1.0/default/SurfaceFlingerConfigs.h
+++ b/configstore/1.1/default/SurfaceFlingerConfigs.h
@@ -1,17 +1,17 @@
-#ifndef ANDROID_HARDWARE_CONFIGSTORE_V1_0_SURFACEFLINGERCONFIGS_H
-#define ANDROID_HARDWARE_CONFIGSTORE_V1_0_SURFACEFLINGERCONFIGS_H
+#ifndef ANDROID_HARDWARE_CONFIGSTORE_V1_1_SURFACEFLINGERCONFIGS_H
+#define ANDROID_HARDWARE_CONFIGSTORE_V1_1_SURFACEFLINGERCONFIGS_H
 
-#include <android/hardware/configstore/1.0/ISurfaceFlingerConfigs.h>
+#include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h>
 #include <hidl/MQDescriptor.h>
 #include <hidl/Status.h>
 
 namespace android {
 namespace hardware {
 namespace configstore {
-namespace V1_0 {
+namespace V1_1 {
 namespace implementation {
 
-using ::android::hardware::configstore::V1_0::ISurfaceFlingerConfigs;
+using ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
 using ::android::sp;
@@ -32,13 +32,16 @@
     Return<void> maxFrameBufferAcquiredBuffers(maxFrameBufferAcquiredBuffers_cb _hidl_cb) override;
     Return<void> startGraphicsAllocatorService(startGraphicsAllocatorService_cb _hidl_cb) override;
 
+    // Methods from
+    // ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs follow.
+
     // Methods from ::android::hidl::base::V1_0::IBase follow.
 };
 
 }  // namespace implementation
-}  // namespace V1_0
+}  // namespace V1_1
 }  // namespace configstore
 }  // namespace hardware
 }  // namespace android
 
-#endif  // ANDROID_HARDWARE_CONFIGSTORE_V1_0_SURFACEFLINGERCONFIGS_H
+#endif  // ANDROID_HARDWARE_CONFIGSTORE_V1_1_SURFACEFLINGERCONFIGS_H
diff --git a/configstore/1.1/default/android.hardware.configstore@1.1-service.rc b/configstore/1.1/default/android.hardware.configstore@1.1-service.rc
new file mode 100644
index 0000000..018ef10
--- /dev/null
+++ b/configstore/1.1/default/android.hardware.configstore@1.1-service.rc
@@ -0,0 +1,4 @@
+service configstore-hal /vendor/bin/hw/android.hardware.configstore@1.1-service
+    class hal animation
+    user system
+    group system
diff --git a/configstore/1.0/default/service.cpp b/configstore/1.1/default/service.cpp
similarity index 83%
rename from configstore/1.0/default/service.cpp
rename to configstore/1.1/default/service.cpp
index 3dca739..3a4cd3f 100644
--- a/configstore/1.0/default/service.cpp
+++ b/configstore/1.1/default/service.cpp
@@ -14,17 +14,17 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "android.hardware.configstore@1.0-service"
+#define LOG_TAG "android.hardware.configstore@1.1-service"
 
-#include <android/hardware/configstore/1.0/ISurfaceFlingerConfigs.h>
+#include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h>
 #include <hidl/HidlTransportSupport.h>
 
 #include "SurfaceFlingerConfigs.h"
 
 using android::hardware::configureRpcThreadpool;
 using android::hardware::joinRpcThreadpool;
-using android::hardware::configstore::V1_0::ISurfaceFlingerConfigs;
-using android::hardware::configstore::V1_0::implementation::SurfaceFlingerConfigs;
+using android::hardware::configstore::V1_1::ISurfaceFlingerConfigs;
+using android::hardware::configstore::V1_1::implementation::SurfaceFlingerConfigs;
 using android::sp;
 using android::status_t;
 using android::OK;
diff --git a/configstore/1.0/default/surfaceflinger.mk b/configstore/1.1/default/surfaceflinger.mk
similarity index 100%
rename from configstore/1.0/default/surfaceflinger.mk
rename to configstore/1.1/default/surfaceflinger.mk
diff --git a/configstore/1.1/vts/functional/Android.bp b/configstore/1.1/vts/functional/Android.bp
new file mode 100644
index 0000000..5cfa483
--- /dev/null
+++ b/configstore/1.1/vts/functional/Android.bp
@@ -0,0 +1,34 @@
+//
+// Copyright (C) 2017 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+cc_test {
+    name: "VtsHalConfigstoreV1_1TargetTest",
+    defaults: ["hidl_defaults"],
+    srcs: ["VtsHalConfigstoreV1_1TargetTest.cpp"],
+    shared_libs: [
+        "libbase",
+        "libhidlbase",
+        "liblog",
+        "libutils",
+        "android.hardware.configstore@1.1",
+    ],
+    static_libs: ["VtsHalHidlTargetTestBase"],
+    cflags: [
+        "-O0",
+        "-g",
+    ]
+}
+
diff --git a/configstore/1.1/vts/functional/VtsHalConfigstoreV1_1TargetTest.cpp b/configstore/1.1/vts/functional/VtsHalConfigstoreV1_1TargetTest.cpp
new file mode 100644
index 0000000..bd3da4c
--- /dev/null
+++ b/configstore/1.1/vts/functional/VtsHalConfigstoreV1_1TargetTest.cpp
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "ConfigstoreHidlHalTest"
+
+#include <VtsHalHidlTargetTestBase.h>
+#include <android-base/logging.h>
+#include <android/hardware/configstore/1.0/types.h>
+#include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h>
+#include <unistd.h>
+
+using ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs;
+using ::android::sp;
+
+#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
+#define EXPECT_OK(ret) EXPECT_TRUE(ret.isOk())
+
+class ConfigstoreHidlTest : public ::testing::VtsHalHidlTargetTestBase {
+   public:
+    sp<ISurfaceFlingerConfigs> sfConfigs;
+
+    virtual void SetUp() override {
+        sfConfigs = ::testing::VtsHalHidlTargetTestBase::getService<ISurfaceFlingerConfigs>();
+        ASSERT_NE(sfConfigs, nullptr);
+    }
+
+    virtual void TearDown() override {}
+};
+
+/**
+ * Placeholder testcase.
+ */
+TEST_F(ConfigstoreHidlTest, Test) {
+    ASSERT_TRUE(true);
+}
+
+int main(int argc, char** argv) {
+    ::testing::InitGoogleTest(&argc, argv);
+    int status = RUN_ALL_TESTS();
+    LOG(INFO) << "Test result = " << status;
+    return status;
+}
diff --git a/configstore/Android.bp b/configstore/Android.bp
index ba3e62e..4a783c3 100644
--- a/configstore/Android.bp
+++ b/configstore/Android.bp
@@ -2,5 +2,7 @@
 subdirs = [
     "1.0",
     "1.0/vts/functional",
+    "1.1",
+    "1.1/vts/functional",
     "utils",
 ]
diff --git a/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp b/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp
index 2670b8d..c6eecd6 100644
--- a/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp
+++ b/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.cpp
@@ -28,8 +28,10 @@
 }
 
 void RenderscriptHidlTest::TearDown() {
-    context->contextFinish();
-    context->contextDestroy();
+    if (context.get() != nullptr) {
+        context->contextFinish();
+        context->contextDestroy();
+    }
 }
 
 // A class for test environment setup (kept since this file is a template).
diff --git a/tests/Android.bp b/tests/Android.bp
index ddf300b..9583bfd 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -20,6 +20,8 @@
     "memory/1.0/default",
     "msgq/1.0",
     "msgq/1.0/default",
+    "multithread/1.0",
+    "multithread/1.0/default",
     "pointer/1.0",
     "pointer/1.0/default",
     "pointer/1.0/default/lib",
diff --git a/tests/bar/1.0/default/Android.bp b/tests/bar/1.0/default/Android.bp
index 2a9607b..82d34a9 100644
--- a/tests/bar/1.0/default/Android.bp
+++ b/tests/bar/1.0/default/Android.bp
@@ -4,7 +4,6 @@
     name: "android.hardware.tests.bar@1.0-impl",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
-    proprietary: true,
     srcs: [
         "Bar.cpp",
         "ImportTypes.cpp",
diff --git a/tests/baz/1.0/default/Android.bp b/tests/baz/1.0/default/Android.bp
index ef1c28e..f247b83 100644
--- a/tests/baz/1.0/default/Android.bp
+++ b/tests/baz/1.0/default/Android.bp
@@ -2,7 +2,6 @@
     name: "android.hardware.tests.baz@1.0-impl",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
-    proprietary: true,
     srcs: [
         "Baz.cpp",
     ],
diff --git a/tests/foo/1.0/default/Android.bp b/tests/foo/1.0/default/Android.bp
index f8acf9d..0e1d34d 100644
--- a/tests/foo/1.0/default/Android.bp
+++ b/tests/foo/1.0/default/Android.bp
@@ -4,7 +4,6 @@
     name: "android.hardware.tests.foo@1.0-impl",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
-    proprietary: true,
     srcs: [
         "Foo.cpp",
     ],
diff --git a/tests/foo/1.0/default/lib/Android.bp b/tests/foo/1.0/default/lib/Android.bp
index b512311..895582c 100644
--- a/tests/foo/1.0/default/lib/Android.bp
+++ b/tests/foo/1.0/default/lib/Android.bp
@@ -1,6 +1,5 @@
 cc_library_shared {
     name: "libfootest",
-    vendor: true,
     defaults: ["hidl_defaults"],
     srcs: [
         "FooHelper.cpp"
diff --git a/tests/hash/1.0/default/Android.bp b/tests/hash/1.0/default/Android.bp
index d6e9630..ae44876 100644
--- a/tests/hash/1.0/default/Android.bp
+++ b/tests/hash/1.0/default/Android.bp
@@ -1,7 +1,6 @@
 cc_library_shared {
     name: "android.hardware.tests.hash@1.0-impl",
     relative_install_path: "hw",
-    proprietary: true,
     srcs: [
         "Hash.cpp",
     ],
diff --git a/tests/inheritance/1.0/default/Android.bp b/tests/inheritance/1.0/default/Android.bp
index f6ca88a..158da4b 100644
--- a/tests/inheritance/1.0/default/Android.bp
+++ b/tests/inheritance/1.0/default/Android.bp
@@ -4,7 +4,6 @@
     name: "android.hardware.tests.inheritance@1.0-impl",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
-    proprietary: true,
     srcs: [
         "Fetcher.cpp",
         "Parent.cpp",
diff --git a/tests/memory/1.0/default/Android.bp b/tests/memory/1.0/default/Android.bp
index e889bd8..efd4165 100644
--- a/tests/memory/1.0/default/Android.bp
+++ b/tests/memory/1.0/default/Android.bp
@@ -15,7 +15,6 @@
 cc_library_shared {
     name: "android.hardware.tests.memory@1.0-impl",
     defaults: ["hidl_defaults"],
-    proprietary: true,
     relative_install_path: "hw",
     srcs: [
         "MemoryTest.cpp",
diff --git a/tests/multithread/1.0/Android.bp b/tests/multithread/1.0/Android.bp
new file mode 100644
index 0000000..c3782a0
--- /dev/null
+++ b/tests/multithread/1.0/Android.bp
@@ -0,0 +1,59 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+    name: "android.hardware.tests.multithread@1.0_hal",
+    srcs: [
+        "IMultithread.hal",
+    ],
+}
+
+genrule {
+    name: "android.hardware.tests.multithread@1.0_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.multithread@1.0",
+    srcs: [
+        ":android.hardware.tests.multithread@1.0_hal",
+    ],
+    out: [
+        "android/hardware/tests/multithread/1.0/MultithreadAll.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.tests.multithread@1.0_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.multithread@1.0",
+    srcs: [
+        ":android.hardware.tests.multithread@1.0_hal",
+    ],
+    out: [
+        "android/hardware/tests/multithread/1.0/IMultithread.h",
+        "android/hardware/tests/multithread/1.0/IHwMultithread.h",
+        "android/hardware/tests/multithread/1.0/BnHwMultithread.h",
+        "android/hardware/tests/multithread/1.0/BpHwMultithread.h",
+        "android/hardware/tests/multithread/1.0/BsMultithread.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.tests.multithread@1.0",
+    defaults: ["hidl-module-defaults"],
+    generated_sources: ["android.hardware.tests.multithread@1.0_genc++"],
+    generated_headers: ["android.hardware.tests.multithread@1.0_genc++_headers"],
+    export_generated_headers: ["android.hardware.tests.multithread@1.0_genc++_headers"],
+    vendor_available: true,
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+    ],
+}
diff --git a/tests/multithread/1.0/Android.mk b/tests/multithread/1.0/Android.mk
new file mode 100644
index 0000000..f63381d
--- /dev/null
+++ b/tests/multithread/1.0/Android.mk
@@ -0,0 +1,76 @@
+# This file is autogenerated by hidl-gen. Do not edit manually.
+
+LOCAL_PATH := $(call my-dir)
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.tests.multithread-V1.0-java
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_JAVA_LIBRARIES := \
+    android.hidl.base-V1.0-java \
+
+
+#
+# Build IMultithread.hal
+#
+GEN := $(intermediates)/android/hardware/tests/multithread/V1_0/IMultithread.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IMultithread.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.tests.multithread@1.0::IMultithread
+
+$(GEN): $(LOCAL_PATH)/IMultithread.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_JAVA_LIBRARY)
+
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.tests.multithread-V1.0-java-static
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+    android.hidl.base-V1.0-java-static \
+
+
+#
+# Build IMultithread.hal
+#
+GEN := $(intermediates)/android/hardware/tests/multithread/V1_0/IMultithread.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IMultithread.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.tests.multithread@1.0::IMultithread
+
+$(GEN): $(LOCAL_PATH)/IMultithread.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/multithread/1.0/IMultithread.hal b/tests/multithread/1.0/IMultithread.hal
new file mode 100644
index 0000000..19dc4f6
--- /dev/null
+++ b/tests/multithread/1.0/IMultithread.hal
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.tests.multithread@1.0;
+
+/**
+ * IMultithread tests configureRpcThreadpool
+ *
+ * Makes calls finish only when specific number of them are running in parallel
+ */
+interface IMultithread {
+    /**
+     * Sets up controller
+     * Must be called for each test
+     * @param maxThreads arg passed to configureRpcThreadpool
+     * Could not be decremented by future calls
+     * @param numThreads number of calls in parallel to finish
+     */
+    setNumThreads(int32_t maxThreads, int32_t numThreads);
+
+    /**
+     * Makes a new call
+     * @return noTimeout numThreads appeared in parallel before timeout
+     * Shall return the same value for one setNumThreads call
+     */
+    runNewThread() generates (bool noTimeout);
+};
diff --git a/tests/multithread/1.0/default/Android.bp b/tests/multithread/1.0/default/Android.bp
new file mode 100644
index 0000000..72b9e91
--- /dev/null
+++ b/tests/multithread/1.0/default/Android.bp
@@ -0,0 +1,17 @@
+cc_library_shared {
+    name: "android.hardware.tests.multithread@1.0-impl",
+    defaults: ["hidl_defaults"],
+    relative_install_path: "hw",
+    proprietary: true,
+    srcs: [
+        "Multithread.cpp",
+    ],
+    shared_libs: [
+        "libbase",
+        "libhidlbase",
+        "libhidltransport",
+        "liblog",
+        "libutils",
+        "android.hardware.tests.multithread@1.0",
+    ],
+}
diff --git a/tests/multithread/1.0/default/Multithread.cpp b/tests/multithread/1.0/default/Multithread.cpp
new file mode 100644
index 0000000..1fb267c
--- /dev/null
+++ b/tests/multithread/1.0/default/Multithread.cpp
@@ -0,0 +1,63 @@
+#define LOG_TAG "hidl_test"
+
+#include <android-base/logging.h>
+#include "Multithread.h"
+#include <inttypes.h>
+#include <thread>
+
+#include <hidl/HidlTransportSupport.h>
+
+namespace android {
+namespace hardware {
+namespace tests {
+namespace multithread {
+namespace V1_0 {
+namespace implementation {
+
+// Methods from ::android::hardware::tests::multithread::V1_0::IMultithread follow.
+Return<void> Multithread::setNumThreads(int32_t maxThreads, int32_t numThreads) {
+    LOG(INFO) << "SERVER(Multithread) setNumThreads("
+              << maxThreads << ", " << numThreads << ")";
+
+    LOG(INFO) << "SERVER(Multithread) call configureRpcThreadpool("
+              << maxThreads << ")";
+    ::android::hardware::configureRpcThreadpool(maxThreads, /*willjoin*/ false);
+
+    mNumThreads = numThreads;
+    mNoTimeout = true;
+
+    return Void();
+}
+
+Return<bool> Multithread::runNewThread() {
+    LOG(INFO) << "SERVER(Multithread) runNewThread()";
+
+    std::unique_lock<std::mutex> lk(mCvMutex);
+    --mNumThreads;
+
+    LOG(INFO) << "SERVER(Multithread) runNewThread()";
+    LOG(INFO) << mNumThreads << "threads left";
+
+    mCv.notify_all();
+    bool noTimeout = mCv.wait_for(lk, kTimeoutDuration,
+        [&] { return mNumThreads <= 0 || !mNoTimeout; });
+
+    if (!noTimeout) {
+        mNoTimeout = false;
+        mCv.notify_all();
+    }
+    return mNoTimeout;
+}
+
+IMultithread* HIDL_FETCH_IMultithread(const char* /* name */) {
+    return new Multithread();
+}
+
+decltype(Multithread::kTimeoutDuration) Multithread::kTimeoutDuration;
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace multithread
+}  // namespace tests
+}  // namespace hardware
+}  // namespace android
diff --git a/tests/multithread/1.0/default/Multithread.h b/tests/multithread/1.0/default/Multithread.h
new file mode 100644
index 0000000..0d4a007
--- /dev/null
+++ b/tests/multithread/1.0/default/Multithread.h
@@ -0,0 +1,48 @@
+#ifndef ANDROID_HARDWARE_TESTS_MULTITHREAD_V1_0_MULTITHREAD_H
+#define ANDROID_HARDWARE_TESTS_MULTITHREAD_V1_0_MULTITHREAD_H
+
+#include <android/hardware/tests/multithread/1.0/IMultithread.h>
+#include <hidl/Status.h>
+
+#include <chrono>
+#include <condition_variable>
+#include <mutex>
+
+namespace android {
+namespace hardware {
+namespace tests {
+namespace multithread {
+namespace V1_0 {
+namespace implementation {
+
+using ::android::hardware::tests::multithread::V1_0::IMultithread;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+
+using namespace std::chrono_literals;
+
+struct Multithread : public IMultithread {
+    // Methods from ::android::hardware::tests::multithread::V1_0::IMultithread follow.
+    virtual Return<void> setNumThreads(int32_t maxThreads, int32_t numThreads) override;
+    virtual Return<bool> runNewThread() override;
+
+   private:
+    int32_t mNumThreads;
+    bool mNoTimeout;
+
+    std::condition_variable mCv;
+    std::mutex mCvMutex;
+
+    static constexpr auto kTimeoutDuration = 100ms;
+};
+
+extern "C" IMultithread* HIDL_FETCH_IMultithread(const char* name);
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace multithread
+}  // namespace tests
+}  // namespace hardware
+}  // namespace android
+
+#endif  // ANDROID_HARDWARE_TESTS_MULTITHREAD_V1_0_MULTITHREAD_H
diff --git a/tests/pointer/1.0/default/Android.bp b/tests/pointer/1.0/default/Android.bp
index 4615463..0c91edb 100644
--- a/tests/pointer/1.0/default/Android.bp
+++ b/tests/pointer/1.0/default/Android.bp
@@ -4,7 +4,6 @@
     name: "android.hardware.tests.pointer@1.0-impl",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
-    proprietary: true,
     srcs: [
         "Graph.cpp",
         "Pointer.cpp",
diff --git a/tests/pointer/1.0/default/lib/Android.bp b/tests/pointer/1.0/default/lib/Android.bp
index 1fe0896..ae07b04 100644
--- a/tests/pointer/1.0/default/lib/Android.bp
+++ b/tests/pointer/1.0/default/lib/Android.bp
@@ -1,6 +1,5 @@
 cc_library_shared {
     name: "libpointertest",
-    vendor: true,
     defaults: ["hidl_defaults"],
     srcs: [
         "PointerHelper.cpp"