Merge "media.omx VTS test baseline" into oc-dev
diff --git a/audio/2.0/Android.bp b/audio/2.0/Android.bp
index f7975ec..9aa9e2c 100644
--- a/audio/2.0/Android.bp
+++ b/audio/2.0/Android.bp
@@ -86,6 +86,7 @@
     generated_sources: ["android.hardware.audio@2.0_genc++"],
     generated_headers: ["android.hardware.audio@2.0_genc++_headers"],
     export_generated_headers: ["android.hardware.audio@2.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/audio/common/2.0/Android.bp b/audio/common/2.0/Android.bp
index ad599ed..fa80d20 100644
--- a/audio/common/2.0/Android.bp
+++ b/audio/common/2.0/Android.bp
@@ -37,6 +37,7 @@
     generated_sources: ["android.hardware.audio.common@2.0_genc++"],
     generated_headers: ["android.hardware.audio.common@2.0_genc++_headers"],
     export_generated_headers: ["android.hardware.audio.common@2.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/audio/effect/2.0/Android.bp b/audio/effect/2.0/Android.bp
index 937a4e6..fea2a33 100644
--- a/audio/effect/2.0/Android.bp
+++ b/audio/effect/2.0/Android.bp
@@ -135,6 +135,7 @@
     generated_sources: ["android.hardware.audio.effect@2.0_genc++"],
     generated_headers: ["android.hardware.audio.effect@2.0_genc++_headers"],
     export_generated_headers: ["android.hardware.audio.effect@2.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/automotive/evs/1.0/Android.bp b/automotive/evs/1.0/Android.bp
index ec56c8f..a9f094f 100644
--- a/automotive/evs/1.0/Android.bp
+++ b/automotive/evs/1.0/Android.bp
@@ -65,6 +65,7 @@
     generated_sources: ["android.hardware.automotive.evs@1.0_genc++"],
     generated_headers: ["android.hardware.automotive.evs@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.automotive.evs@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/automotive/vehicle/2.0/Android.bp b/automotive/vehicle/2.0/Android.bp
index 6957bf8..b6fde6e 100644
--- a/automotive/vehicle/2.0/Android.bp
+++ b/automotive/vehicle/2.0/Android.bp
@@ -51,6 +51,7 @@
     generated_sources: ["android.hardware.automotive.vehicle@2.0_genc++"],
     generated_headers: ["android.hardware.automotive.vehicle@2.0_genc++_headers"],
     export_generated_headers: ["android.hardware.automotive.vehicle@2.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/automotive/vehicle/2.1/Android.bp b/automotive/vehicle/2.1/Android.bp
index 825ec1f..536950a 100644
--- a/automotive/vehicle/2.1/Android.bp
+++ b/automotive/vehicle/2.1/Android.bp
@@ -44,6 +44,7 @@
     generated_sources: ["android.hardware.automotive.vehicle@2.1_genc++"],
     generated_headers: ["android.hardware.automotive.vehicle@2.1_genc++_headers"],
     export_generated_headers: ["android.hardware.automotive.vehicle@2.1_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/biometrics/fingerprint/2.1/Android.bp b/biometrics/fingerprint/2.1/Android.bp
index e928f9b..9a6e9d8 100644
--- a/biometrics/fingerprint/2.1/Android.bp
+++ b/biometrics/fingerprint/2.1/Android.bp
@@ -51,6 +51,7 @@
     generated_sources: ["android.hardware.biometrics.fingerprint@2.1_genc++"],
     generated_headers: ["android.hardware.biometrics.fingerprint@2.1_genc++_headers"],
     export_generated_headers: ["android.hardware.biometrics.fingerprint@2.1_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/bluetooth/1.0/Android.bp b/bluetooth/1.0/Android.bp
index 75cdcfc..e831069 100644
--- a/bluetooth/1.0/Android.bp
+++ b/bluetooth/1.0/Android.bp
@@ -51,6 +51,7 @@
     generated_sources: ["android.hardware.bluetooth@1.0_genc++"],
     generated_headers: ["android.hardware.bluetooth@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.bluetooth@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/bluetooth/1.0/default/Android.bp b/bluetooth/1.0/default/Android.bp
index 292f97c..c77f0e6 100644
--- a/bluetooth/1.0/default/Android.bp
+++ b/bluetooth/1.0/default/Android.bp
@@ -41,21 +41,20 @@
 
 cc_library_static {
     name: "android.hardware.bluetooth-async",
+    proprietary: true,
     defaults: ["hidl_defaults"],
     srcs: [
         "async_fd_watcher.cc",
     ],
     export_include_dirs: ["."],
     shared_libs: [
-        "libbase",
-        "libcutils",
         "liblog",
-        "libutils",
     ],
 }
 
 cc_library_static {
     name: "android.hardware.bluetooth-hci",
+    proprietary: true,
     defaults: ["hidl_defaults"],
     srcs: [
         "hci_packetizer.cc",
@@ -66,7 +65,6 @@
     export_include_dirs: ["."],
     shared_libs: [
         "libbase",
-        "libcutils",
         "libhidlbase",
         "liblog",
         "libutils",
diff --git a/bluetooth/1.0/default/bluetooth_hci.cc b/bluetooth/1.0/default/bluetooth_hci.cc
index 8eccfc7..e14e3d7 100644
--- a/bluetooth/1.0/default/bluetooth_hci.cc
+++ b/bluetooth/1.0/default/bluetooth_hci.cc
@@ -17,7 +17,7 @@
 #define LOG_TAG "android.hardware.bluetooth@1.0-impl"
 #include "bluetooth_hci.h"
 
-#include <utils/Log.h>
+#include <log/log.h>
 
 #include "vendor_interface.h"
 
diff --git a/bluetooth/1.0/default/hci_protocol.cc b/bluetooth/1.0/default/hci_protocol.cc
index bb1e36b..a208da1 100644
--- a/bluetooth/1.0/default/hci_protocol.cc
+++ b/bluetooth/1.0/default/hci_protocol.cc
@@ -17,10 +17,9 @@
 #include "hci_protocol.h"
 
 #define LOG_TAG "android.hardware.bluetooth-hci-hci_protocol"
-#include <android-base/logging.h>
 #include <assert.h>
 #include <fcntl.h>
-#include <utils/Log.h>
+#include <log/log.h>
 
 namespace android {
 namespace hardware {
diff --git a/bluetooth/1.0/default/test/async_fd_watcher_unittest.cc b/bluetooth/1.0/default/test/async_fd_watcher_unittest.cc
index b0c533c..dfc50a3 100644
--- a/bluetooth/1.0/default/test/async_fd_watcher_unittest.cc
+++ b/bluetooth/1.0/default/test/async_fd_watcher_unittest.cc
@@ -22,12 +22,12 @@
 #include <cstring>
 #include <vector>
 
+#include <log/log.h>
 #include <netdb.h>
 #include <netinet/in.h>
 #include <sys/socket.h>
 #include <sys/types.h>
 #include <unistd.h>
-#include <utils/Log.h>
 
 namespace android {
 namespace hardware {
diff --git a/bluetooth/1.0/default/test/h4_protocol_unittest.cc b/bluetooth/1.0/default/test/h4_protocol_unittest.cc
index d53aaa9..ad08086 100644
--- a/bluetooth/1.0/default/test/h4_protocol_unittest.cc
+++ b/bluetooth/1.0/default/test/h4_protocol_unittest.cc
@@ -25,10 +25,10 @@
 #include <mutex>
 #include <vector>
 
+#include <log/log.h>
 #include <sys/socket.h>
 #include <sys/types.h>
 #include <unistd.h>
-#include <utils/Log.h>
 
 namespace android {
 namespace hardware {
diff --git a/bluetooth/1.0/default/test/mct_protocol_unittest.cc b/bluetooth/1.0/default/test/mct_protocol_unittest.cc
index 0a6e9eb..d45058e 100644
--- a/bluetooth/1.0/default/test/mct_protocol_unittest.cc
+++ b/bluetooth/1.0/default/test/mct_protocol_unittest.cc
@@ -25,10 +25,10 @@
 #include <mutex>
 #include <vector>
 
+#include <log/log.h>
 #include <sys/socket.h>
 #include <sys/types.h>
 #include <unistd.h>
-#include <utils/Log.h>
 
 namespace android {
 namespace hardware {
diff --git a/bluetooth/1.0/default/test/properties.cc b/bluetooth/1.0/default/test/properties.cc
index ad5c194..6ac4fb4 100644
--- a/bluetooth/1.0/default/test/properties.cc
+++ b/bluetooth/1.0/default/test/properties.cc
@@ -23,7 +23,7 @@
 #include <unistd.h>
 
 #include <cutils/properties.h>
-#include <utils/Log.h>
+#include <log/log.h>
 
 static const int MAX_PROPERTIES = 5;
 
diff --git a/boot/1.0/Android.bp b/boot/1.0/Android.bp
index 498c940..c56499a 100644
--- a/boot/1.0/Android.bp
+++ b/boot/1.0/Android.bp
@@ -44,6 +44,7 @@
     generated_sources: ["android.hardware.boot@1.0_genc++"],
     generated_headers: ["android.hardware.boot@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.boot@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/broadcastradio/1.0/Android.bp b/broadcastradio/1.0/Android.bp
index 5f50748..cbed9f7 100644
--- a/broadcastradio/1.0/Android.bp
+++ b/broadcastradio/1.0/Android.bp
@@ -65,6 +65,7 @@
     generated_sources: ["android.hardware.broadcastradio@1.0_genc++"],
     generated_headers: ["android.hardware.broadcastradio@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.broadcastradio@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/broadcastradio/1.1/Android.bp b/broadcastradio/1.1/Android.bp
index cc0747a..2c51ca5 100644
--- a/broadcastradio/1.1/Android.bp
+++ b/broadcastradio/1.1/Android.bp
@@ -65,6 +65,7 @@
     generated_sources: ["android.hardware.broadcastradio@1.1_genc++"],
     generated_headers: ["android.hardware.broadcastradio@1.1_genc++_headers"],
     export_generated_headers: ["android.hardware.broadcastradio@1.1_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/camera/common/1.0/Android.bp b/camera/common/1.0/Android.bp
index 80b5e54..76f1cf3 100644
--- a/camera/common/1.0/Android.bp
+++ b/camera/common/1.0/Android.bp
@@ -37,6 +37,7 @@
     generated_sources: ["android.hardware.camera.common@1.0_genc++"],
     generated_headers: ["android.hardware.camera.common@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.camera.common@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/camera/common/1.0/default/Android.bp b/camera/common/1.0/default/Android.bp
index 6437480..10f9fdb 100644
--- a/camera/common/1.0/default/Android.bp
+++ b/camera/common/1.0/default/Android.bp
@@ -1,5 +1,6 @@
 cc_library_static {
     name: "android.hardware.camera.common@1.0-helper",
+    vendor: true,
     defaults: ["hidl_defaults"],
     srcs: [
         "CameraModule.cpp",
diff --git a/camera/device/1.0/Android.bp b/camera/device/1.0/Android.bp
index 81e41aa..0b65892 100644
--- a/camera/device/1.0/Android.bp
+++ b/camera/device/1.0/Android.bp
@@ -58,6 +58,7 @@
     generated_sources: ["android.hardware.camera.device@1.0_genc++"],
     generated_headers: ["android.hardware.camera.device@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.camera.device@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/camera/device/3.2/Android.bp b/camera/device/3.2/Android.bp
index 7807a85..cbfdcff 100644
--- a/camera/device/3.2/Android.bp
+++ b/camera/device/3.2/Android.bp
@@ -58,6 +58,7 @@
     generated_sources: ["android.hardware.camera.device@3.2_genc++"],
     generated_headers: ["android.hardware.camera.device@3.2_genc++_headers"],
     export_generated_headers: ["android.hardware.camera.device@3.2_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/camera/metadata/3.2/Android.bp b/camera/metadata/3.2/Android.bp
index d6bb9a3..0534b9c 100644
--- a/camera/metadata/3.2/Android.bp
+++ b/camera/metadata/3.2/Android.bp
@@ -37,6 +37,7 @@
     generated_sources: ["android.hardware.camera.metadata@3.2_genc++"],
     generated_headers: ["android.hardware.camera.metadata@3.2_genc++_headers"],
     export_generated_headers: ["android.hardware.camera.metadata@3.2_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/camera/provider/2.4/Android.bp b/camera/provider/2.4/Android.bp
index d295f3e..02e02eb 100644
--- a/camera/provider/2.4/Android.bp
+++ b/camera/provider/2.4/Android.bp
@@ -47,6 +47,7 @@
     generated_sources: ["android.hardware.camera.provider@2.4_genc++"],
     generated_headers: ["android.hardware.camera.provider@2.4_genc++_headers"],
     export_generated_headers: ["android.hardware.camera.provider@2.4_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/camera/provider/2.4/default/Android.bp b/camera/provider/2.4/default/Android.bp
index 9506827..8e8df62 100644
--- a/camera/provider/2.4/default/Android.bp
+++ b/camera/provider/2.4/default/Android.bp
@@ -37,6 +37,7 @@
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
+	"libbinder",
         "liblog",
         "libutils",
         "android.hardware.camera.device@1.0",
diff --git a/camera/provider/2.4/default/service.cpp b/camera/provider/2.4/default/service.cpp
index df2602e..7eeb637 100644
--- a/camera/provider/2.4/default/service.cpp
+++ b/camera/provider/2.4/default/service.cpp
@@ -19,11 +19,16 @@
 #include <android/hardware/camera/provider/2.4/ICameraProvider.h>
 #include <hidl/LegacySupport.h>
 
+#include <binder/ProcessState.h>
+
 using android::hardware::camera::provider::V2_4::ICameraProvider;
 using android::hardware::defaultPassthroughServiceImplementation;
 
 int main()
 {
     ALOGI("Camera provider Service is starting.");
+    // The camera HAL may communicate to other vendor components via
+    // /dev/vndbinder
+    android::ProcessState::initWithDriver("/dev/vndbinder");
     return defaultPassthroughServiceImplementation<ICameraProvider>("legacy/0", /*maxThreads*/ 6);
 }
diff --git a/configstore/1.0/Android.bp b/configstore/1.0/Android.bp
index 712e9a7..bd203cc 100644
--- a/configstore/1.0/Android.bp
+++ b/configstore/1.0/Android.bp
@@ -44,6 +44,7 @@
     generated_sources: ["android.hardware.configstore@1.0_genc++"],
     generated_headers: ["android.hardware.configstore@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.configstore@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/configstore/1.0/ISurfaceFlingerConfigs.hal b/configstore/1.0/ISurfaceFlingerConfigs.hal
index dcc9bbb..5f975bd 100644
--- a/configstore/1.0/ISurfaceFlingerConfigs.hal
+++ b/configstore/1.0/ISurfaceFlingerConfigs.hal
@@ -108,4 +108,10 @@
      * FramebufferSurface.
      */
     maxFrameBufferAcquiredBuffers() generates(OptionalInt64 value);
+
+    /**
+     * Returns true if surface flinger should start
+     * hardware.graphics.allocator@2.0::IAllocator service.
+     */
+    startGraphicsAllocatorService() generates(OptionalBool value);
 };
diff --git a/configstore/1.0/default/SurfaceFlingerConfigs.cpp b/configstore/1.0/default/SurfaceFlingerConfigs.cpp
index 70bd803..9c134ef 100644
--- a/configstore/1.0/default/SurfaceFlingerConfigs.cpp
+++ b/configstore/1.0/default/SurfaceFlingerConfigs.cpp
@@ -112,6 +112,16 @@
     return Void();
 }
 
+Return<void> SurfaceFlingerConfigs::startGraphicsAllocatorService(
+    startGraphicsAllocatorService_cb _hidl_cb) {
+    bool value = false;
+#ifdef START_GRAPHICS_ALLOCATOR_SERVICE
+    value = true;
+#endif
+    _hidl_cb({true, value});
+    return Void();
+}
+
 }  // namespace implementation
 }  // namespace V1_0
 }  // namespace configstore
diff --git a/configstore/1.0/default/SurfaceFlingerConfigs.h b/configstore/1.0/default/SurfaceFlingerConfigs.h
index 9300511..17a424e 100644
--- a/configstore/1.0/default/SurfaceFlingerConfigs.h
+++ b/configstore/1.0/default/SurfaceFlingerConfigs.h
@@ -35,6 +35,8 @@
     Return<void> hasSyncFramework(hasSyncFramework_cb _hidl_cb) override;
     Return<void> useVrFlinger(useVrFlinger_cb _hidl_cb) override;
     Return<void> maxFrameBufferAcquiredBuffers(maxFrameBufferAcquiredBuffers_cb _hidl_cb) override;
+    Return<void> startGraphicsAllocatorService(
+        startGraphicsAllocatorService_cb _hidl_cb) override;
 
     // Methods from ::android::hidl::base::V1_0::IBase follow.
 
diff --git a/configstore/1.0/default/surfaceflinger.mk b/configstore/1.0/default/surfaceflinger.mk
index 9e3d4d4..3ce768a 100644
--- a/configstore/1.0/default/surfaceflinger.mk
+++ b/configstore/1.0/default/surfaceflinger.mk
@@ -50,3 +50,7 @@
 ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
     LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
 endif
+
+ifneq ($(SF_START_GRAPHICS_ALLOCATOR_SERVICE),)
+    LOCAL_CFLAGS += -DSTART_GRAPHICS_ALLOCATOR_SERVICE
+endif
diff --git a/contexthub/1.0/Android.bp b/contexthub/1.0/Android.bp
index 2bf951a..a4c7175 100644
--- a/contexthub/1.0/Android.bp
+++ b/contexthub/1.0/Android.bp
@@ -51,6 +51,7 @@
     generated_sources: ["android.hardware.contexthub@1.0_genc++"],
     generated_headers: ["android.hardware.contexthub@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.contexthub@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/drm/1.0/Android.bp b/drm/1.0/Android.bp
index 9fddaa8..0ca4766 100644
--- a/drm/1.0/Android.bp
+++ b/drm/1.0/Android.bp
@@ -72,6 +72,7 @@
     generated_sources: ["android.hardware.drm@1.0_genc++"],
     generated_headers: ["android.hardware.drm@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.drm@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/drm/1.0/default/service.cpp b/drm/1.0/default/service.cpp
index a112aaf..823f39e 100644
--- a/drm/1.0/default/service.cpp
+++ b/drm/1.0/default/service.cpp
@@ -32,11 +32,11 @@
     ALOGD("android.hardware.drm@1.0-service starting...");
     configureRpcThreadpool(8, true /* callerWillJoin */);
     android::status_t status =
-        registerPassthroughServiceImplementation<IDrmFactory>("drm");
+        registerPassthroughServiceImplementation<IDrmFactory>();
     LOG_ALWAYS_FATAL_IF(
         status != android::OK,
         "Error while registering drm service: %d", status);
-    status = registerPassthroughServiceImplementation<ICryptoFactory>("crypto");
+    status = registerPassthroughServiceImplementation<ICryptoFactory>();
     LOG_ALWAYS_FATAL_IF(
         status != android::OK,
         "Error while registering crypto service: %d", status);
diff --git a/drm/1.0/vts/functional/drm_hal_clearkey_test.cpp b/drm/1.0/vts/functional/drm_hal_clearkey_test.cpp
index e97ac10..4dd98ce 100644
--- a/drm/1.0/vts/functional/drm_hal_clearkey_test.cpp
+++ b/drm/1.0/vts/functional/drm_hal_clearkey_test.cpp
@@ -94,12 +94,10 @@
               test_info->name());
 
         drmFactory =
-                ::testing::VtsHalHidlTargetTestBase::getService<IDrmFactory>(
-                        "drm");
+                ::testing::VtsHalHidlTargetTestBase::getService<IDrmFactory>();
         ASSERT_NE(drmFactory, nullptr);
         cryptoFactory =
-                ::testing::VtsHalHidlTargetTestBase::getService<ICryptoFactory>(
-                        "crypto");
+                ::testing::VtsHalHidlTargetTestBase::getService<ICryptoFactory>();
         ASSERT_NE(cryptoFactory, nullptr);
     }
 
diff --git a/drm/1.0/vts/functional/drm_hal_vendor_test.cpp b/drm/1.0/vts/functional/drm_hal_vendor_test.cpp
index 5945c05..fec43cf 100644
--- a/drm/1.0/vts/functional/drm_hal_vendor_test.cpp
+++ b/drm/1.0/vts/functional/drm_hal_vendor_test.cpp
@@ -114,14 +114,14 @@
         string name = vendorModule->getServiceName();
         drmFactory = VtsTestBase::getService<IDrmFactory>(name);
         if (drmFactory == nullptr) {
-            drmFactory = VtsTestBase::getService<IDrmFactory>("drm");
+            drmFactory = VtsTestBase::getService<IDrmFactory>();
         }
         ASSERT_NE(drmFactory, nullptr);
 
-        // Dot the same for the crypto factory
+        // Do the same for the crypto factory
         cryptoFactory = VtsTestBase::getService<ICryptoFactory>(name);
         if (cryptoFactory == nullptr) {
-            VtsTestBase::getService<ICryptoFactory>("crypto");
+            VtsTestBase::getService<ICryptoFactory>();
         }
         ASSERT_NE(cryptoFactory, nullptr);
     }
@@ -953,6 +953,7 @@
     EXPECT_TRUE(result.args);
     EXPECT_EQ(sessionId, result.args->sessionId);
     EXPECT_EQ(keyStatusList, result.args->keyStatusList);
+    closeSession(sessionId);
 }
 
 /**
@@ -1429,7 +1430,7 @@
 
             uint32_t byteCount = decrypt(Mode::AES_CTR, key.isSecure,
                     toHidlArray(key.keyId), &iv[0], subSamples, noPattern,
-                    key.clearContentKey, Status::ERROR_DRM_DECRYPT);
+                    key.clearContentKey, Status::ERROR_DRM_NO_LICENSE);
             EXPECT_EQ(0u, byteCount);
 
             closeSession(sessionId);
diff --git a/dumpstate/1.0/Android.bp b/dumpstate/1.0/Android.bp
index 1b473bc..df028b49 100644
--- a/dumpstate/1.0/Android.bp
+++ b/dumpstate/1.0/Android.bp
@@ -40,6 +40,7 @@
     generated_sources: ["android.hardware.dumpstate@1.0_genc++"],
     generated_headers: ["android.hardware.dumpstate@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.dumpstate@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/gatekeeper/1.0/Android.bp b/gatekeeper/1.0/Android.bp
index 56e19db..eddf0e5 100644
--- a/gatekeeper/1.0/Android.bp
+++ b/gatekeeper/1.0/Android.bp
@@ -44,6 +44,7 @@
     generated_sources: ["android.hardware.gatekeeper@1.0_genc++"],
     generated_headers: ["android.hardware.gatekeeper@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.gatekeeper@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/gnss/1.0/Android.bp b/gnss/1.0/Android.bp
index ed6659d..42f35b8 100644
--- a/gnss/1.0/Android.bp
+++ b/gnss/1.0/Android.bp
@@ -177,6 +177,7 @@
     generated_sources: ["android.hardware.gnss@1.0_genc++"],
     generated_headers: ["android.hardware.gnss@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.gnss@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/graphics/allocator/2.0/Android.bp b/graphics/allocator/2.0/Android.bp
index f707468..77a3f70 100644
--- a/graphics/allocator/2.0/Android.bp
+++ b/graphics/allocator/2.0/Android.bp
@@ -40,6 +40,7 @@
     generated_sources: ["android.hardware.graphics.allocator@2.0_genc++"],
     generated_headers: ["android.hardware.graphics.allocator@2.0_genc++_headers"],
     export_generated_headers: ["android.hardware.graphics.allocator@2.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/graphics/allocator/2.0/default/Android.bp b/graphics/allocator/2.0/default/Android.bp
index 6adfa71..4a7cfe0 100644
--- a/graphics/allocator/2.0/default/Android.bp
+++ b/graphics/allocator/2.0/default/Android.bp
@@ -15,7 +15,9 @@
         "liblog",
         "libutils",
     ],
-    static_libs: ["libgrallocmapperincludes"],
+    header_libs: [
+        "libgrallocmapperincludes",
+    ],
 }
 
 cc_binary {
diff --git a/graphics/bufferqueue/1.0/Android.bp b/graphics/bufferqueue/1.0/Android.bp
index 4ba764f..e7adee6 100644
--- a/graphics/bufferqueue/1.0/Android.bp
+++ b/graphics/bufferqueue/1.0/Android.bp
@@ -47,6 +47,7 @@
     generated_sources: ["android.hardware.graphics.bufferqueue@1.0_genc++"],
     generated_headers: ["android.hardware.graphics.bufferqueue@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.graphics.bufferqueue@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/graphics/common/1.0/Android.bp b/graphics/common/1.0/Android.bp
index 25995cd..69c8844 100644
--- a/graphics/common/1.0/Android.bp
+++ b/graphics/common/1.0/Android.bp
@@ -37,6 +37,7 @@
     generated_sources: ["android.hardware.graphics.common@1.0_genc++"],
     generated_headers: ["android.hardware.graphics.common@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.graphics.common@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/graphics/composer/2.1/Android.bp b/graphics/composer/2.1/Android.bp
index f5ab965..a3d76d5 100644
--- a/graphics/composer/2.1/Android.bp
+++ b/graphics/composer/2.1/Android.bp
@@ -58,6 +58,7 @@
     generated_sources: ["android.hardware.graphics.composer@2.1_genc++"],
     generated_headers: ["android.hardware.graphics.composer@2.1_genc++_headers"],
     export_generated_headers: ["android.hardware.graphics.composer@2.1_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/graphics/composer/2.1/IComposer.hal b/graphics/composer/2.1/IComposer.hal
index b3ac761..e2aa5cd 100644
--- a/graphics/composer/2.1/IComposer.hal
+++ b/graphics/composer/2.1/IComposer.hal
@@ -44,6 +44,12 @@
          * applying the color transform during its composition step.
          */
         SKIP_CLIENT_COLOR_TRANSFORM = 2,
+
+        /**
+         * Specifies that the present fence must not be used as an accurate
+         * representation of the actual present time of a frame.
+         */
+        PRESENT_FENCE_IS_NOT_RELIABLE = 3,
     };
 
     /**
diff --git a/graphics/composer/2.1/default/Android.bp b/graphics/composer/2.1/default/Android.bp
index 0367fcd..fb75beb 100644
--- a/graphics/composer/2.1/default/Android.bp
+++ b/graphics/composer/2.1/default/Android.bp
@@ -1,5 +1,6 @@
 cc_library_static {
     name: "libhwcomposer-client",
+    vendor_available: true,
     defaults: ["hidl_defaults"],
     export_include_dirs: ["."],
     srcs: ["ComposerClient.cpp"],
diff --git a/graphics/composer/2.1/default/Hwc.cpp b/graphics/composer/2.1/default/Hwc.cpp
index 1497065..8ca0eb3 100644
--- a/graphics/composer/2.1/default/Hwc.cpp
+++ b/graphics/composer/2.1/default/Hwc.cpp
@@ -65,6 +65,12 @@
     }
 
     initCapabilities();
+    if (majorVersion >= 2 &&
+        hasCapability(Capability::PRESENT_FENCE_IS_NOT_RELIABLE)) {
+        ALOGE("Present fence must be reliable from HWC2 on.");
+        abort();
+    }
+
     initDispatch();
 }
 
diff --git a/graphics/composer/2.1/default/service.cpp b/graphics/composer/2.1/default/service.cpp
index 712dac1..aa0604a 100644
--- a/graphics/composer/2.1/default/service.cpp
+++ b/graphics/composer/2.1/default/service.cpp
@@ -28,6 +28,7 @@
 
 int main() {
     // the conventional HAL might start binder services
+    android::ProcessState::initWithDriver("/dev/vndbinder");
     android::ProcessState::self()->setThreadPoolMaxThreadCount(4);
     android::ProcessState::self()->startThreadPool();
 
diff --git a/graphics/mapper/2.0/Android.bp b/graphics/mapper/2.0/Android.bp
index cc2bd73..b95c54d 100644
--- a/graphics/mapper/2.0/Android.bp
+++ b/graphics/mapper/2.0/Android.bp
@@ -44,6 +44,7 @@
     generated_sources: ["android.hardware.graphics.mapper@2.0_genc++"],
     generated_headers: ["android.hardware.graphics.mapper@2.0_genc++_headers"],
     export_generated_headers: ["android.hardware.graphics.mapper@2.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/graphics/mapper/2.0/default/Android.bp b/graphics/mapper/2.0/default/Android.bp
index 090c61f..677d966 100644
--- a/graphics/mapper/2.0/default/Android.bp
+++ b/graphics/mapper/2.0/default/Android.bp
@@ -16,7 +16,7 @@
 cc_library_shared {
     name: "android.hardware.graphics.mapper@2.0-impl",
     defaults: ["hidl_defaults"],
-    proprietary: true,
+    vendor: true,
     relative_install_path: "hw",
     srcs: ["GrallocMapper.cpp", "Gralloc0Mapper.cpp", "Gralloc1Mapper.cpp"],
     cppflags: ["-Wall", "-Wextra"],
@@ -33,7 +33,8 @@
     ],
 }
 
-cc_library_static {
+cc_library_headers {
     name: "libgrallocmapperincludes",
+    vendor: true,
     export_include_dirs: ["."],
 }
diff --git a/health/1.0/Android.bp b/health/1.0/Android.bp
index 61f464d..16ee7e9 100644
--- a/health/1.0/Android.bp
+++ b/health/1.0/Android.bp
@@ -44,6 +44,7 @@
     generated_sources: ["android.hardware.health@1.0_genc++"],
     generated_headers: ["android.hardware.health@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.health@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/ir/1.0/Android.bp b/ir/1.0/Android.bp
index 5bff1d3..6f52736 100644
--- a/ir/1.0/Android.bp
+++ b/ir/1.0/Android.bp
@@ -44,6 +44,7 @@
     generated_sources: ["android.hardware.ir@1.0_genc++"],
     generated_headers: ["android.hardware.ir@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.ir@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/keymaster/3.0/Android.bp b/keymaster/3.0/Android.bp
index 2b0899d..0afee99 100644
--- a/keymaster/3.0/Android.bp
+++ b/keymaster/3.0/Android.bp
@@ -44,6 +44,7 @@
     generated_sources: ["android.hardware.keymaster@3.0_genc++"],
     generated_headers: ["android.hardware.keymaster@3.0_genc++_headers"],
     export_generated_headers: ["android.hardware.keymaster@3.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/light/2.0/Android.bp b/light/2.0/Android.bp
index b43b7b3..b830ef0 100644
--- a/light/2.0/Android.bp
+++ b/light/2.0/Android.bp
@@ -44,6 +44,7 @@
     generated_sources: ["android.hardware.light@2.0_genc++"],
     generated_headers: ["android.hardware.light@2.0_genc++_headers"],
     export_generated_headers: ["android.hardware.light@2.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/media/1.0/Android.bp b/media/1.0/Android.bp
index 21185db..04a3683 100644
--- a/media/1.0/Android.bp
+++ b/media/1.0/Android.bp
@@ -37,6 +37,7 @@
     generated_sources: ["android.hardware.media@1.0_genc++"],
     generated_headers: ["android.hardware.media@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.media@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/media/1.0/types.hal b/media/1.0/types.hal
index 1f9c4dc..bb1a73b 100644
--- a/media/1.0/types.hal
+++ b/media/1.0/types.hal
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 The Android Open Source Project
+ * 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.
diff --git a/media/omx/1.0/Android.bp b/media/omx/1.0/Android.bp
index c6e0389..0ecf085 100644
--- a/media/omx/1.0/Android.bp
+++ b/media/omx/1.0/Android.bp
@@ -9,6 +9,7 @@
         "IOmxBufferSource.hal",
         "IOmxNode.hal",
         "IOmxObserver.hal",
+        "IOmxStore.hal",
     ],
 }
 
@@ -26,6 +27,7 @@
         "android/hardware/media/omx/1.0/OmxBufferSourceAll.cpp",
         "android/hardware/media/omx/1.0/OmxNodeAll.cpp",
         "android/hardware/media/omx/1.0/OmxObserverAll.cpp",
+        "android/hardware/media/omx/1.0/OmxStoreAll.cpp",
     ],
 }
 
@@ -64,6 +66,11 @@
         "android/hardware/media/omx/1.0/BnHwOmxObserver.h",
         "android/hardware/media/omx/1.0/BpHwOmxObserver.h",
         "android/hardware/media/omx/1.0/BsOmxObserver.h",
+        "android/hardware/media/omx/1.0/IOmxStore.h",
+        "android/hardware/media/omx/1.0/IHwOmxStore.h",
+        "android/hardware/media/omx/1.0/BnHwOmxStore.h",
+        "android/hardware/media/omx/1.0/BpHwOmxStore.h",
+        "android/hardware/media/omx/1.0/BsOmxStore.h",
     ],
 }
 
@@ -72,6 +79,7 @@
     generated_sources: ["android.hardware.media.omx@1.0_genc++"],
     generated_headers: ["android.hardware.media.omx@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.media.omx@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/media/omx/1.0/IOmx.hal b/media/omx/1.0/IOmx.hal
index 78d4b32..f5fc449 100644
--- a/media/omx/1.0/IOmx.hal
+++ b/media/omx/1.0/IOmx.hal
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 The Android Open Source Project
+ * 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.
@@ -26,7 +26,7 @@
 /**
  * Ref: frameworks/av/include/media/IOMX.h: IOMX
  *
- * IOmx is the main entry point for communicating with OMX components.
+ * IOmx has the ability to create OMX nodes.
  */
 interface IOmx {
 
@@ -41,8 +41,8 @@
     /**
      * List available components.
      *
-     * @param[out] status The status of the call.
-     * @param[out] nodeList The list of ComponentInfo.
+     * @return status The status of the call.
+     * @return nodeList The list of ComponentInfo.
      */
     listNodes(
         ) generates (
@@ -50,14 +50,15 @@
             vec<ComponentInfo> nodeList
         );
 
+
     /**
-     * Allocate an IOmxNode instance with the specified component name.
+     * Allocate an IOmxNode instance with the specified node name.
      *
-     * @param[in] name The name of the component to create.
-     * @param[in] observer An observer object that will receive messages from
+     * @param name The name of the node to create.
+     * @param observer An observer object that will receive messages from
      * the created instance.
-     * @param[out] status The status of the call.
-     * @param[out] omxNode The allocated instance of IOmxNode.
+     * @return status The status of the call.
+     * @return omxNode The allocated instance of `IOmxNode`.
      */
     allocateNode(
             string name,
@@ -70,8 +71,9 @@
     /**
      * Create an input surface for recording.
      *
-     * @param[out] producer The associated producer end of the buffer queue.
-     * @param[out] source The associated `IGraphicBufferSource`.
+     * @return status The status of the call.
+     * @return producer The associated producer end of the buffer queue.
+     * @return source The associated `IGraphicBufferSource`.
      */
     createInputSurface(
         ) generates (
diff --git a/media/omx/1.0/IOmxNode.hal b/media/omx/1.0/IOmxNode.hal
index 8729637..71c0da3 100644
--- a/media/omx/1.0/IOmxNode.hal
+++ b/media/omx/1.0/IOmxNode.hal
@@ -35,7 +35,7 @@
     /**
      * Free the node.
      *
-     * @param[out] status Status of the call.
+     * @return status Status of the call.
      */
     freeNode(
         ) generates (
@@ -45,9 +45,9 @@
     /**
      * Invoke a command on the node.
      *
-     * @param[in] cmd Type of the command.
-     * @param[in] param Parameter for the command.
-     * @param[out] status Status of the call.
+     * @param cmd Type of the command.
+     * @param param Parameter for the command.
+     * @return status Status of the call.
      *
      * @see OMX_SendCommand() in the OpenMax IL standard.
      */
@@ -61,10 +61,10 @@
     /**
      * Retrieve a parameter setting from the node.
      *
-     * @param[in] index Type of the parameter to retrieve.
-     * @param[in] inParams Information about the retrieval.
-     * @param[out] status Status of the call.
-     * @param[out] outParams Current parameter setting.
+     * @param index Type of the parameter to retrieve.
+     * @param inParams Information about the retrieval.
+     * @return status Status of the call.
+     * @return outParams Current parameter setting.
      *
      * @see OMX_GetParameter() in the OpenMax IL standard.
      */
@@ -79,9 +79,9 @@
     /**
      * Change a parameter setting of the node.
      *
-     * @param[in] index Type of the parameter to change.
-     * @param[in] params New parameter setting.
-     * @param[out] status Status of the call.
+     * @param index Type of the parameter to change.
+     * @param params New parameter setting.
+     * @return status Status of the call.
      *
      * @see OMX_SetParameter() in the OpenMax IL standard.
      */
@@ -95,10 +95,10 @@
     /**
      * Retrieve a configuration from the node.
      *
-     * @param[in] index Type of the configuration to retrieve.
-     * @param[in] inConfig Information about the retrieval.
-     * @param[out] status Status of the call.
-     * @param[out] outConfig Current configuration.
+     * @param index Type of the configuration to retrieve.
+     * @param inConfig Information about the retrieval.
+     * @return status Status of the call.
+     * @return outConfig Current configuration.
      *
      * @see OMX_GetConfig() in the OpenMax IL standard.
      */
@@ -113,9 +113,9 @@
     /**
      * Change a configuration of the node.
      *
-     * @param[in] index Type of the configuration to change.
-     * @param[in] config New configuration.
-     * @param[out] status Status of the call.
+     * @param index Type of the configuration to change.
+     * @param config New configuration.
+     * @return status Status of the call.
      *
      * @see OMX_SetConfig() in the OpenMax IL standard.
      */
@@ -129,9 +129,9 @@
     /**
      * Set the mode of a port on the node.
      *
-     * @param[in] portIndex Index of the port.
-     * @param[in] mode Target mode on the specified port.
-     * @param[out] status Status of the call.
+     * @param portIndex Index of the port.
+     * @param mode Target mode on the specified port.
+     * @return status Status of the call.
      */
     setPortMode(
             uint32_t portIndex,
@@ -144,11 +144,11 @@
      * Prepare a port for adaptive playback. This is based on the extension
      * "OMX.google.android.index.prepareForAdaptivePlayback".
      *
-     * @param[in] portIndex Index of the port.
-     * @param[in] enable Whether the adaptive playback is enabled or not.
-     * @param[in] maxFrameWidth Maximum frame width.
-     * @param[in] maxFrameHeight Maximum frame height.
-     * @param[out] status Status of the call.
+     * @param portIndex Index of the port.
+     * @param enable Whether the adaptive playback is enabled or not.
+     * @param maxFrameWidth Maximum frame width.
+     * @param maxFrameHeight Maximum frame height.
+     * @return status Status of the call.
      */
     prepareForAdaptivePlayback(
             uint32_t portIndex,
@@ -163,12 +163,12 @@
      * Configure a port for a tunneled playback mode. This is based on the
      * extension "OMX.google.android.index.configureVideoTunnelMode".
      *
-     * @param[in] portIndex Index of the port.
-     * @param[in] tunneled Whether the tunneled mode is used or not.
-     * @param[in] audioHwSync HW SYNC ID of the audio HAL output stream to sync
+     * @param portIndex Index of the port.
+     * @param tunneled Whether the tunneled mode is used or not.
+     * @param audioHwSync HW SYNC ID of the audio HAL output stream to sync
      * the video with.
-     * @param[out] status Status of the call.
-     * @param[out] sidebandHandle Codec-allocated sideband window handle.
+     * @return status Status of the call.
+     * @return sidebandHandle Codec-allocated sideband window handle.
      */
     configureVideoTunnelMode(
             uint32_t portIndex,
@@ -183,9 +183,9 @@
      * Retrieve the buffer usage on a port. This is based on the extension
      * "OMX.google.android.index.getAndroidNativeBufferUsage".
      *
-     * @param[in] portIndex Index of the port.
-     * @param[out] status Status of the call.
-     * @param[out] usage Current graphic buffer usage.
+     * @param portIndex Index of the port.
+     * @return status Status of the call.
+     * @return usage Current graphic buffer usage.
      */
     getGraphicBufferUsage(
             uint32_t portIndex
@@ -197,9 +197,9 @@
     /**
      * Set up a listener to events related to the input surface.
      *
-     * @param[in] bufferSource Listener object that implements
+     * @param bufferSource Listener object that implements
      * IOmxBufferSource.
-     * @param[out] status Status of the call.
+     * @return status Status of the call.
      *
      * @see IOmxBufferSource.
      */
@@ -212,12 +212,12 @@
     /**
      * Allocate an opaque buffer on a port as a native handle.
      *
-     * @param[in] portIndex Index of the port.
-     * @param[in] size Desired size of the buffer.
-     * @param[out] status Status of the call.
-     * @param[out] buffer Id of the allocated buffer, which will be needed in
+     * @param portIndex Index of the port.
+     * @param size Desired size of the buffer.
+     * @return status Status of the call.
+     * @return buffer Id of the allocated buffer, which will be needed in
      * other buffer-related functions.
-     * @param[out] nativeHandle Native handle of the allocated buffer.
+     * @return nativeHandle Native handle of the allocated buffer.
      *
      * @see OMX_AllocateBuffer() in the OpenMax IL standard.
      */
@@ -233,10 +233,10 @@
     /**
      * Assign a buffer to a port.
      *
-     * @param[in] portIndex Index of the port.
-     * @param[in] omxBuffer Buffer to be assigned to the port.
-     * @param[out] status Status of the call.
-     * @param[out] buffer Id of the assigned buffer, which will be needed in
+     * @param portIndex Index of the port.
+     * @param omxBuffer Buffer to be assigned to the port.
+     * @return status Status of the call.
+     * @return buffer Id of the assigned buffer, which will be needed in
      * other buffer-related functions.
      *
      * @see OMX_UseBuffer() in the OpenMax IL standard.
@@ -253,9 +253,9 @@
      * Free a buffer previously assigned to a port by allocateSecureBuffer() or
      * useBuffer().
      *
-     * @param[in] portIndex Index of the port.
-     * @param[in] buffer Id of the buffer to be freed.
-     * @param[out] status Status of the call.
+     * @param portIndex Index of the port.
+     * @param buffer Id of the buffer to be freed.
+     * @return status Status of the call.
      *
      * @see OMX_FreeBuffer() in the OpenMax IL standard.
      */
@@ -275,10 +275,10 @@
      * the new buffer passed in via \p omxBuffer before OMX_FillThisBuffer() is
      * called. Otherwise, \p omxBuffer is not used.
      *
-     * @param[in] buffer Id of the buffer to fill.
-     * @param[in] omxBuffer New buffer information (in metadata mode).
-     * @param[in] fence Fence to wait for (if not null).
-     * @param[out] status Status of the call.
+     * @param buffer Id of the buffer to fill.
+     * @param omxBuffer New buffer information (in metadata mode).
+     * @param fence Fence to wait for (if not null).
+     * @return status Status of the call.
      *
      * @see OMX_FillThisBuffer() in the OpenMax IL standard.
      */
@@ -299,12 +299,12 @@
      * the new buffer passed in via \p omxBuffer before OMX_EmptyThisBuffer() is
      * called. Otherwise, \p omxBuffer is not used.
      *
-     * @param[in] buffer Id of the buffer to fill.
-     * @param[in] omxBuffer New buffer information (in metadata mode).
-     * @param[in] flags Flags to be passed to OMX_EmptyBuffer().
-     * @param[in] timestampUs Timestamp OMX_EmptyBuffer().
-     * @param[in] fence Fence to wait for (if not null).
-     * @param[out] status Status of the call.
+     * @param buffer Id of the buffer to fill.
+     * @param omxBuffer New buffer information (in metadata mode).
+     * @param flags Flags to be passed to OMX_EmptyBuffer().
+     * @param timestampUs Timestamp OMX_EmptyBuffer().
+     * @param fence Fence to wait for (if not null).
+     * @return status Status of the call.
      *
      * @see OMX_EmptyThisBuffer() in the OpenMax IL standard.
      */
@@ -321,9 +321,9 @@
     /**
      * Request the node to translate an extension string to an index.
      *
-     * @param[in] parameterName Requested extension string.
-     * @param[out] status Status of the call.
-     * @param[out] index Translated index.
+     * @param parameterName Requested extension string.
+     * @return status Status of the call.
+     * @return index Translated index.
      *
      * @see OMX_GetExtensionIndex() in the OpenMax IL standard.
      */
@@ -340,8 +340,8 @@
      * receive the message in batches by the callback
      * IOmxObserver::onMessages().
      *
-     * @param[in] msg Message to send.
-     * @param[out] status Status of the call.
+     * @param msg Message to send.
+     * @return status Status of the call.
      *
      * @see IOmxObserver::onMessages().
      */
@@ -350,16 +350,5 @@
         ) generates (
             Status status
         );
-
-    /**
-     * Set quirks.
-     *
-     * @param[in] quirks Quirks for the component, generally obtained from
-     * MediaCodecList::getQuirksFor().
-     */
-    oneway setQuirks(
-            uint32_t quirks
-        );
-
 };
 
diff --git a/media/omx/1.0/IOmxStore.hal b/media/omx/1.0/IOmxStore.hal
new file mode 100644
index 0000000..a224b0e
--- /dev/null
+++ b/media/omx/1.0/IOmxStore.hal
@@ -0,0 +1,215 @@
+/*
+ * 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.media.omx@1.0;
+
+import IOmx;
+
+/**
+ * Ref: frameworks/av/include/media/IOMX.h: IOMX
+ *
+ * There will be two instances of IOmxStore: "platform" and "vendor".
+ *
+ * The IOmxStore service provided by the platform must present "platform" as the
+ * interface name.
+ *
+ * The IOmxStore service provided by the vendor must present "vendor" as the
+ * instance name.
+ */
+interface IOmxStore {
+
+    /**
+     * Attribute is a key-value pair of strings. The `value` member is generally
+     * a stringified value of the following:
+     *   enum<v1,v2,...,vn>:    v1 | v2 | ... | vn
+     *   num:                   0 | [1-9][0-9]*
+     *   string:                arbitrary string
+     *   size:                  <num>x<num>
+     *   ratio:                 <num>:<num>
+     *   range<type>:           <type>-<type>
+     *   list<type>:            <type> | <type>,<list<type>>
+     */
+    struct Attribute {
+        string key;
+        string value;
+    };
+
+    /**
+     * Service attribute
+     *
+     * Optional service attributes:
+     *   key: 'max-video-encoder-input-buffers', value-type: num
+     *   key: 'supports-multiple-secure-codecs', value-type: enum<0,1>
+     *   key: 'supports-secure-with-non-secure-codec', value-type: enum<0,1>
+     *
+     * For keys with prefix 'supports-', the value of 0 means "no" (not
+     * supported) while the value of 1 means "yes" (supported).
+     */
+    typedef Attribute ServiceAttribute;
+
+    /**
+     * List attributes that are service-specific (not node-specific).
+     *
+     * @return attributes The list of `Attribute`s that are specific to this
+     *                    service.
+     */
+    listServiceAttributes(
+        ) generates (
+            Status status,
+            vec<ServiceAttribute> attributes
+        );
+
+    /**
+     * Node attribute
+     *
+     * Optional node attributes to describe supported values:
+     *   key: 'bitrate-range', value-type: range<num>
+     *   key: 'max-concurrent-instances', value-type: num
+     *   key: 'max-supported-instances', value-type: num
+     *
+     * Optional node attributes for audio nodes to describe supported values:
+     *   key: 'max-channel-count', value-type: num
+     *   key: 'sample-rate-ranges', value-type: list<range<num>>
+     *
+     * Optional node attributes for video nodes to describe supported values:
+     *   key: 'alignment', value-type: size
+     *   key: 'block-aspect-ratio-range', value-type: range<ratio>
+     *   key: 'block-count-range', value-type: range<num>
+     *   key: 'block-size', value-type: size
+     *   key: 'blocks-per-second-range', value-type: range<num>
+     *   key: 'feature-can-swap-width-height', value-type: enum<0,1>
+     *   key: 'frame-rate-range', value-type: range<num>
+     *   key: 'pixel-aspect-ratio-range', value-type: range<ratio>
+     *   key: 'size-range', value-type: range<size>
+     *
+     * Required node attributes for video nodes that are required by Android to
+     * describe measured values for this device:
+     *   key: 'measured-frame-rate-<width>-<height>-range',
+     *     value-type: range<num>; where width: num, height: num
+     *
+     * Optional node attributes for decoders to describe supported values:
+     *   key: 'feature-adaptive-playback', value: enum<0,1>
+     *   key: 'feature-secure-playback', value: enum<0,1>
+     *   key: 'feature-tunneled-playback', value: enum<0,1>
+     *
+     * Optional node attributes for video decoders to describe supported values:
+     *   key: 'feature-partial-frame', value: enum<0,1>
+     *
+     * Optional node attributes for encoders to describe supported values:
+     *   key: 'complexity-default', value-type: num
+     *   key: 'complexity-range', value-type: range<num>
+     *   key: 'feature-bitrate-control', value-type: list<enum<VBR,CBR,CQ>>
+     *   key: 'feature-intra-refresh', value-type: enum<0,1>
+     *   key: 'quality-default', value-type: num
+     *   key: 'quality-range', value-type: range<num>
+     *   key: 'quality-scale', value-type: string
+     *
+     * For keys with prefix 'feature-' and value type enum<0,1>, the value of 0
+     * means "optional", while the value of 1 means "required".
+     */
+    typedef Attribute NodeAttribute;
+
+    /**
+     * Information for an IOmxNode node.
+     */
+    struct NodeInfo {
+        /**
+         * Name of this node.
+         *
+         * `name` can be supplied to `IOmx::allocateNode` of a
+         * corresponding `IOmx` instance to create the node.
+         */
+        string name;
+        /**
+         * Name of the `IOmx` instance that can create this node.
+         *
+         * To obtain the `IOmx` instance, call `getOmx(owner)`.
+         */
+        string owner;
+        /**
+         * List of node attributes.
+         */
+        vec<NodeAttribute> attributes;
+    };
+
+    /**
+     * Information about nodes provided for a supported node role
+     */
+    struct RoleInfo {
+        /**
+         * Standard OMX node role.
+         */
+        string role;
+        /**
+         * Corresponding media type (as defined in MediaFormat.MIMETYPE_*
+         * constants for types required by Android).
+         */
+        string type;
+        /**
+         * Whether this role is for an encoder or a decoder.
+         */
+        bool isEncoder;
+        /**
+         * Whether to prefer platform nodes for this role.
+         */
+        bool preferPlatformNodes;
+        /**
+         * List of nodes that support this role, ordered by preference.
+         */
+        vec<NodeInfo> nodes;
+    };
+
+    /**
+     * Return the prefix of names of supported nodes.
+     *
+     * @return prefix The prefix of the names of all nodes supported by this
+     *                service.
+     */
+    getNodePrefix(
+        ) generates (
+            string prefix
+        );
+
+    /**
+     * List roles of supported nodes.
+     *
+     * The name of each node inside `NodeInfo` must start with the prefix
+     * returned by `getNodePrefix()`.
+     *
+     * @return roleList The list of `RoleInfo`s.
+     *
+     * @see RoleInfo
+     */
+    listRoles(
+        ) generates (
+            vec<RoleInfo> roleList
+        );
+
+    /**
+     * Obtain an `IOmx` instance with a specified name.
+     *
+     * @param name The name of the instance.
+     * @return omx The `IOmx` interface associated with `name`. This must be
+     * null if the name is not found.
+     */
+    getOmx(
+            string name
+        ) generates (
+            IOmx omx
+        );
+
+};
+
diff --git a/media/omx/1.0/types.hal b/media/omx/1.0/types.hal
index 5413344..76a6007 100644
--- a/media/omx/1.0/types.hal
+++ b/media/omx/1.0/types.hal
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 The Android Open Source Project
+ * 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.
@@ -35,6 +35,7 @@
     NAME_NOT_FOUND          = -2,
     WOULD_BLOCK             = -11,
     NO_MEMORY               = -12,
+    ALREADY_EXISTS          = -17,
     NO_INIT                 = -19,
     BAD_VALUE               = -22,
     DEAD_OBJECT             = -32,
diff --git a/memtrack/1.0/Android.bp b/memtrack/1.0/Android.bp
index 4f13463..4a4e179 100644
--- a/memtrack/1.0/Android.bp
+++ b/memtrack/1.0/Android.bp
@@ -44,6 +44,7 @@
     generated_sources: ["android.hardware.memtrack@1.0_genc++"],
     generated_headers: ["android.hardware.memtrack@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.memtrack@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/nfc/1.0/Android.bp b/nfc/1.0/Android.bp
index 7ee3a9e..f583a42 100644
--- a/nfc/1.0/Android.bp
+++ b/nfc/1.0/Android.bp
@@ -51,6 +51,7 @@
     generated_sources: ["android.hardware.nfc@1.0_genc++"],
     generated_headers: ["android.hardware.nfc@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.nfc@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/power/1.0/Android.bp b/power/1.0/Android.bp
index f9d18c8..5958b12 100644
--- a/power/1.0/Android.bp
+++ b/power/1.0/Android.bp
@@ -44,6 +44,7 @@
     generated_sources: ["android.hardware.power@1.0_genc++"],
     generated_headers: ["android.hardware.power@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.power@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/power/1.0/default/Power.cpp b/power/1.0/default/Power.cpp
index 6ea9167..51f87f5 100644
--- a/power/1.0/default/Power.cpp
+++ b/power/1.0/default/Power.cpp
@@ -145,25 +145,27 @@
 }
 
 IPower* HIDL_FETCH_IPower(const char* /* name */) {
-    int ret = 0;
-    const hw_module_t* hw_module = NULL;
-    power_module_t *power_module;
-    ret = hw_get_module(POWER_HARDWARE_MODULE_ID, &hw_module);
-    if (ret == 0 && hw_module->methods->open) {
-        ret = hw_module->methods->open(hw_module, POWER_HARDWARE_MODULE_ID,
-                reinterpret_cast<hw_device_t**>(&power_module));
-        if (ret == 0) {
-            return new Power(power_module);
-        }
-        else {
-            ALOGE("Passthrough failed to load legacy power HAL.");
+    const hw_module_t* hw_module = nullptr;
+    power_module_t* power_module = nullptr;
+    int err = hw_get_module(POWER_HARDWARE_MODULE_ID, &hw_module);
+    if (err) {
+        ALOGE("hw_get_module %s failed: %d", POWER_HARDWARE_MODULE_ID, err);
+        return nullptr;
+    }
+
+    if (!hw_module->methods || !hw_module->methods->open) {
+        power_module = reinterpret_cast<power_module_t*>(
+            const_cast<hw_module_t*>(hw_module));
+    } else {
+        err = hw_module->methods->open(
+            hw_module, POWER_HARDWARE_MODULE_ID,
+            reinterpret_cast<hw_device_t**>(&power_module));
+        if (err) {
+            ALOGE("Passthrough failed to load legacy HAL.");
             return nullptr;
         }
     }
-    else {
-        ALOGE ("hw_get_module %s failed: %d", POWER_HARDWARE_MODULE_ID, ret);
-        return nullptr;
-    }
+    return new Power(power_module);
 }
 
 } // namespace implementation
diff --git a/radio/1.0/Android.bp b/radio/1.0/Android.bp
index e457795..768de49 100644
--- a/radio/1.0/Android.bp
+++ b/radio/1.0/Android.bp
@@ -72,6 +72,7 @@
     generated_sources: ["android.hardware.radio@1.0_genc++"],
     generated_headers: ["android.hardware.radio@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.radio@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/radio/1.0/IRadio.hal b/radio/1.0/IRadio.hal
index 2976290..236dbf5 100644
--- a/radio/1.0/IRadio.hal
+++ b/radio/1.0/IRadio.hal
@@ -1285,10 +1285,11 @@
      *
      * @param serial Serial number of request.
      * @param aid AID value, See ETSI 102.221 and 101.220.
+     * @param p2 P2 value, described in ISO 7816-4. Ignore if equal to P2Constant:NO_P2
      *
      * Response callback is IRadioResponse.iccOpenLogicalChannelResponse()
      */
-    oneway iccOpenLogicalChannel(int32_t serial, string aid);
+    oneway iccOpenLogicalChannel(int32_t serial, string aid, int32_t p2);
 
     /**
      * Close a previously opened logical channel. This command reflects TS 27.007
diff --git a/radio/1.0/types.hal b/radio/1.0/types.hal
index 2224c8b..c5d7f8a 100644
--- a/radio/1.0/types.hal
+++ b/radio/1.0/types.hal
@@ -1161,6 +1161,10 @@
                                           // this doesn't mean no data is expected.
 };
 
+enum P2Constant : int32_t {
+    NO_P2 = -1,                           // No P2 value is provided
+};
+
 struct RadioResponseInfo {
     RadioResponseType type;               // Response type
     int32_t serial;                       // Serial number of the request
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp b/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
index 19738d5..b759c48 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
@@ -246,12 +246,15 @@
  */
 TEST_F(RadioHidlTest, iccOpenLogicalChannel) {
   int serial = 1;
-
+  int p2 = 0x04;
+  // Specified in ISO 7816-4 clause 7.1.1 0x04 means that FCP template is
+  // requested.
   for (int i = 0; i < (int)cardStatus.applications.size(); i++) {
-    radio->iccOpenLogicalChannel(++serial, cardStatus.applications[i].aidPtr);
-    EXPECT_EQ(std::cv_status::no_timeout, wait());
-    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
-    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+      radio->iccOpenLogicalChannel(++serial, cardStatus.applications[i].aidPtr,
+                                   p2);
+      EXPECT_EQ(std::cv_status::no_timeout, wait());
+      EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+      EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
   }
 }
 
@@ -317,4 +320,4 @@
   if (cardStatus.cardState == CardState::ABSENT) {
     ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::PASSWORD_INCORRECT);
   }
-}
\ No newline at end of file
+}
diff --git a/radio/deprecated/1.0/Android.bp b/radio/deprecated/1.0/Android.bp
index f8a9c64..e81186c 100644
--- a/radio/deprecated/1.0/Android.bp
+++ b/radio/deprecated/1.0/Android.bp
@@ -54,6 +54,7 @@
     generated_sources: ["android.hardware.radio.deprecated@1.0_genc++"],
     generated_headers: ["android.hardware.radio.deprecated@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.radio.deprecated@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/renderscript/1.0/Android.bp b/renderscript/1.0/Android.bp
index 9f2a589..b82dc4a 100644
--- a/renderscript/1.0/Android.bp
+++ b/renderscript/1.0/Android.bp
@@ -51,6 +51,7 @@
     generated_sources: ["android.hardware.renderscript@1.0_genc++"],
     generated_headers: ["android.hardware.renderscript@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.renderscript@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/renderscript/1.0/vts/functional/VtsMiscellaneousTests.cpp b/renderscript/1.0/vts/functional/VtsMiscellaneousTests.cpp
index 23b09ac..278dbf3 100644
--- a/renderscript/1.0/vts/functional/VtsMiscellaneousTests.cpp
+++ b/renderscript/1.0/vts/functional/VtsMiscellaneousTests.cpp
@@ -175,6 +175,8 @@
     ASSERT_NE(NativeWindow(0), nativeWindow);
 
     ((ANativeWindow *)nativeWindow)->incStrong(nullptr);
+    native_window_api_connect((ANativeWindow*)nativeWindow,
+                              NATIVE_WINDOW_API_CPU);
 
     context->allocationSetNativeWindow(allocationSend, nativeWindow);
     context->allocation2DWrite(allocationSend, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
@@ -239,6 +241,8 @@
     EXPECT_EQ(nativeWindow2, nativeWindow1);
 
     ((ANativeWindow *)nativeWindow1)->incStrong(nullptr);
+    native_window_api_connect((ANativeWindow*)nativeWindow1,
+                              NATIVE_WINDOW_API_CPU);
 
     context->allocationSetNativeWindow(allocationSend, nativeWindow1);
     context->allocation2DWrite(allocationSend, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
diff --git a/sensors/1.0/Android.bp b/sensors/1.0/Android.bp
index 9f7895d..043e139 100644
--- a/sensors/1.0/Android.bp
+++ b/sensors/1.0/Android.bp
@@ -44,6 +44,7 @@
     generated_sources: ["android.hardware.sensors@1.0_genc++"],
     generated_headers: ["android.hardware.sensors@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.sensors@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/sensors/1.0/default/Android.bp b/sensors/1.0/default/Android.bp
index 2ab1b90..8144590 100644
--- a/sensors/1.0/default/Android.bp
+++ b/sensors/1.0/default/Android.bp
@@ -23,6 +23,7 @@
 
 cc_library_static {
     name: "android.hardware.sensors@1.0-convert",
+    vendor_available: true,
     defaults: ["hidl_defaults"],
     srcs: ["convert.cpp"],
     export_include_dirs: ["include"],
diff --git a/soundtrigger/2.0/Android.bp b/soundtrigger/2.0/Android.bp
index d2a04be..742311d 100644
--- a/soundtrigger/2.0/Android.bp
+++ b/soundtrigger/2.0/Android.bp
@@ -51,6 +51,7 @@
     generated_sources: ["android.hardware.soundtrigger@2.0_genc++"],
     generated_headers: ["android.hardware.soundtrigger@2.0_genc++_headers"],
     export_generated_headers: ["android.hardware.soundtrigger@2.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/soundtrigger/2.0/types.hal b/soundtrigger/2.0/types.hal
index fc7d019..99bbd56 100644
--- a/soundtrigger/2.0/types.hal
+++ b/soundtrigger/2.0/types.hal
@@ -75,8 +75,3 @@
     vec<ConfidenceLevel> levels;
 };
 
-/** TODO(elaurent) remove when Java build problem is fixed */
-union Dummy {
-  uint32_t dummy1;
-  int32_t dummy2;
-};
diff --git a/tests/bar/1.0/Android.bp b/tests/bar/1.0/Android.bp
index 2edde20..f7a6f75 100644
--- a/tests/bar/1.0/Android.bp
+++ b/tests/bar/1.0/Android.bp
@@ -72,6 +72,7 @@
     generated_sources: ["android.hardware.tests.bar@1.0_genc++"],
     generated_headers: ["android.hardware.tests.bar@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.bar@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/tests/baz/1.0/Android.bp b/tests/baz/1.0/Android.bp
index 1d5013b..e55a782 100644
--- a/tests/baz/1.0/Android.bp
+++ b/tests/baz/1.0/Android.bp
@@ -65,6 +65,7 @@
     generated_sources: ["android.hardware.tests.baz@1.0_genc++"],
     generated_headers: ["android.hardware.tests.baz@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.baz@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/tests/expression/1.0/Android.bp b/tests/expression/1.0/Android.bp
index 5279503..6fcc0f8 100644
--- a/tests/expression/1.0/Android.bp
+++ b/tests/expression/1.0/Android.bp
@@ -47,6 +47,7 @@
     generated_sources: ["android.hardware.tests.expression@1.0_genc++"],
     generated_headers: ["android.hardware.tests.expression@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.expression@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/tests/extension/light/2.0/Android.bp b/tests/extension/light/2.0/Android.bp
index 93f9da1..14403b6 100644
--- a/tests/extension/light/2.0/Android.bp
+++ b/tests/extension/light/2.0/Android.bp
@@ -44,6 +44,7 @@
     generated_sources: ["android.hardware.tests.extension.light@2.0_genc++"],
     generated_headers: ["android.hardware.tests.extension.light@2.0_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.extension.light@2.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/tests/foo/1.0/Android.bp b/tests/foo/1.0/Android.bp
index b221201..a631be8 100644
--- a/tests/foo/1.0/Android.bp
+++ b/tests/foo/1.0/Android.bp
@@ -72,6 +72,7 @@
     generated_sources: ["android.hardware.tests.foo@1.0_genc++"],
     generated_headers: ["android.hardware.tests.foo@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.foo@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/tests/foo/1.0/default/lib/Android.bp b/tests/foo/1.0/default/lib/Android.bp
index 895582c..b512311 100644
--- a/tests/foo/1.0/default/lib/Android.bp
+++ b/tests/foo/1.0/default/lib/Android.bp
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "libfootest",
+    vendor: true,
     defaults: ["hidl_defaults"],
     srcs: [
         "FooHelper.cpp"
diff --git a/tests/hash/1.0/Android.bp b/tests/hash/1.0/Android.bp
index c217e5c..aeefeed 100644
--- a/tests/hash/1.0/Android.bp
+++ b/tests/hash/1.0/Android.bp
@@ -40,6 +40,7 @@
     generated_sources: ["android.hardware.tests.hash@1.0_genc++"],
     generated_headers: ["android.hardware.tests.hash@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.hash@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/tests/inheritance/1.0/Android.bp b/tests/inheritance/1.0/Android.bp
index f50aee4..11ee4f9 100644
--- a/tests/inheritance/1.0/Android.bp
+++ b/tests/inheritance/1.0/Android.bp
@@ -61,6 +61,7 @@
     generated_sources: ["android.hardware.tests.inheritance@1.0_genc++"],
     generated_headers: ["android.hardware.tests.inheritance@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.inheritance@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/tests/libhwbinder/1.0/Android.bp b/tests/libhwbinder/1.0/Android.bp
index 580e961..9c0fe45 100644
--- a/tests/libhwbinder/1.0/Android.bp
+++ b/tests/libhwbinder/1.0/Android.bp
@@ -40,6 +40,7 @@
     generated_sources: ["android.hardware.tests.libhwbinder@1.0_genc++"],
     generated_headers: ["android.hardware.tests.libhwbinder@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.libhwbinder@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/tests/memory/1.0/Android.bp b/tests/memory/1.0/Android.bp
index 49faf41..e49f436 100644
--- a/tests/memory/1.0/Android.bp
+++ b/tests/memory/1.0/Android.bp
@@ -40,6 +40,7 @@
     generated_sources: ["android.hardware.tests.memory@1.0_genc++"],
     generated_headers: ["android.hardware.tests.memory@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.memory@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/tests/msgq/1.0/Android.bp b/tests/msgq/1.0/Android.bp
index 2d42699..98bdd19 100644
--- a/tests/msgq/1.0/Android.bp
+++ b/tests/msgq/1.0/Android.bp
@@ -47,6 +47,7 @@
     generated_sources: ["android.hardware.tests.msgq@1.0_genc++"],
     generated_headers: ["android.hardware.tests.msgq@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.msgq@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/tests/pointer/1.0/Android.bp b/tests/pointer/1.0/Android.bp
index 7f66e2a..48f2ec0 100644
--- a/tests/pointer/1.0/Android.bp
+++ b/tests/pointer/1.0/Android.bp
@@ -47,6 +47,7 @@
     generated_sources: ["android.hardware.tests.pointer@1.0_genc++"],
     generated_headers: ["android.hardware.tests.pointer@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.pointer@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/tests/pointer/1.0/default/lib/Android.bp b/tests/pointer/1.0/default/lib/Android.bp
index ae07b04..1fe0896 100644
--- a/tests/pointer/1.0/default/lib/Android.bp
+++ b/tests/pointer/1.0/default/lib/Android.bp
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "libpointertest",
+    vendor: true,
     defaults: ["hidl_defaults"],
     srcs: [
         "PointerHelper.cpp"
diff --git a/tests/versioning/1.0/Android.bp b/tests/versioning/1.0/Android.bp
index fbabc10..ee41ea4 100644
--- a/tests/versioning/1.0/Android.bp
+++ b/tests/versioning/1.0/Android.bp
@@ -40,6 +40,7 @@
     generated_sources: ["android.hardware.tests.versioning@1.0_genc++"],
     generated_headers: ["android.hardware.tests.versioning@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.versioning@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/tests/versioning/2.2/Android.bp b/tests/versioning/2.2/Android.bp
index 953b6df..bf412a6 100644
--- a/tests/versioning/2.2/Android.bp
+++ b/tests/versioning/2.2/Android.bp
@@ -47,6 +47,7 @@
     generated_sources: ["android.hardware.tests.versioning@2.2_genc++"],
     generated_headers: ["android.hardware.tests.versioning@2.2_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.versioning@2.2_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/tests/versioning/2.3/Android.bp b/tests/versioning/2.3/Android.bp
index 3cc2076..a8aee8e 100644
--- a/tests/versioning/2.3/Android.bp
+++ b/tests/versioning/2.3/Android.bp
@@ -54,6 +54,7 @@
     generated_sources: ["android.hardware.tests.versioning@2.3_genc++"],
     generated_headers: ["android.hardware.tests.versioning@2.3_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.versioning@2.3_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/tests/versioning/2.4/Android.bp b/tests/versioning/2.4/Android.bp
index 9d8303c..37e787f 100644
--- a/tests/versioning/2.4/Android.bp
+++ b/tests/versioning/2.4/Android.bp
@@ -40,6 +40,7 @@
     generated_sources: ["android.hardware.tests.versioning@2.4_genc++"],
     generated_headers: ["android.hardware.tests.versioning@2.4_genc++_headers"],
     export_generated_headers: ["android.hardware.tests.versioning@2.4_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/thermal/1.0/Android.bp b/thermal/1.0/Android.bp
index d7d5184..41f5ab8 100644
--- a/thermal/1.0/Android.bp
+++ b/thermal/1.0/Android.bp
@@ -44,6 +44,7 @@
     generated_sources: ["android.hardware.thermal@1.0_genc++"],
     generated_headers: ["android.hardware.thermal@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.thermal@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/tv/cec/1.0/Android.bp b/tv/cec/1.0/Android.bp
index a5d7b86..3f8973d 100644
--- a/tv/cec/1.0/Android.bp
+++ b/tv/cec/1.0/Android.bp
@@ -51,6 +51,7 @@
     generated_sources: ["android.hardware.tv.cec@1.0_genc++"],
     generated_headers: ["android.hardware.tv.cec@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.tv.cec@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/tv/input/1.0/Android.bp b/tv/input/1.0/Android.bp
index e9c2d63..65a7b02 100644
--- a/tv/input/1.0/Android.bp
+++ b/tv/input/1.0/Android.bp
@@ -51,6 +51,7 @@
     generated_sources: ["android.hardware.tv.input@1.0_genc++"],
     generated_headers: ["android.hardware.tv.input@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.tv.input@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/usb/1.0/Android.bp b/usb/1.0/Android.bp
index f939c8b..11856a0 100644
--- a/usb/1.0/Android.bp
+++ b/usb/1.0/Android.bp
@@ -51,6 +51,7 @@
     generated_sources: ["android.hardware.usb@1.0_genc++"],
     generated_headers: ["android.hardware.usb@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.usb@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/vibrator/1.0/Android.bp b/vibrator/1.0/Android.bp
index 11ae996..204ff50 100644
--- a/vibrator/1.0/Android.bp
+++ b/vibrator/1.0/Android.bp
@@ -44,6 +44,7 @@
     generated_sources: ["android.hardware.vibrator@1.0_genc++"],
     generated_headers: ["android.hardware.vibrator@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.vibrator@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/vibrator/1.0/Android.mk b/vibrator/1.0/Android.mk
index d921a7e..8de1ac3 100644
--- a/vibrator/1.0/Android.mk
+++ b/vibrator/1.0/Android.mk
@@ -36,6 +36,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (EffectStrength)
+#
+GEN := $(intermediates)/android/hardware/vibrator/V1_0/EffectStrength.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.vibrator@1.0::types.EffectStrength
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (Status)
 #
 GEN := $(intermediates)/android/hardware/vibrator/V1_0/Status.java
@@ -111,6 +130,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (EffectStrength)
+#
+GEN := $(intermediates)/android/hardware/vibrator/V1_0/EffectStrength.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.vibrator@1.0::types.EffectStrength
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (Status)
 #
 GEN := $(intermediates)/android/hardware/vibrator/V1_0/Status.java
@@ -158,7 +196,7 @@
 LOCAL_MODULE := android.hardware.vibrator@1.0-java-constants
 LOCAL_MODULE_CLASS := JAVA_LIBRARIES
 
-intermediates := $(local-generated-sources-dir)
+intermediates := $(call local-generated-sources-dir, COMMON)
 
 HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
 #
diff --git a/vr/1.0/Android.bp b/vr/1.0/Android.bp
index b48d010..66c346e 100644
--- a/vr/1.0/Android.bp
+++ b/vr/1.0/Android.bp
@@ -40,6 +40,7 @@
     generated_sources: ["android.hardware.vr@1.0_genc++"],
     generated_headers: ["android.hardware.vr@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.vr@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/wifi/1.0/Android.bp b/wifi/1.0/Android.bp
index df5c9d2..9126aaf 100644
--- a/wifi/1.0/Android.bp
+++ b/wifi/1.0/Android.bp
@@ -128,6 +128,7 @@
     generated_sources: ["android.hardware.wifi@1.0_genc++"],
     generated_headers: ["android.hardware.wifi@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.wifi@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/wifi/supplicant/1.0/Android.bp b/wifi/supplicant/1.0/Android.bp
index a0adb8d..d6cb071 100644
--- a/wifi/supplicant/1.0/Android.bp
+++ b/wifi/supplicant/1.0/Android.bp
@@ -121,6 +121,7 @@
     generated_sources: ["android.hardware.wifi.supplicant@1.0_genc++"],
     generated_headers: ["android.hardware.wifi.supplicant@1.0_genc++_headers"],
     export_generated_headers: ["android.hardware.wifi.supplicant@1.0_genc++_headers"],
+    vendor_available: true,
     shared_libs: [
         "libhidlbase",
         "libhidltransport",
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp
index 7bb43b8..42bbd09 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp
@@ -20,6 +20,7 @@
 
 #include <android/hardware/wifi/supplicant/1.0/ISupplicantP2pIface.h>
 
+#include "supplicant_hidl_call_util.h"
 #include "supplicant_hidl_test_utils.h"
 
 using ::android::sp;
@@ -28,6 +29,7 @@
 using ::android::hardware::hidl_vec;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
+using ::android::hardware::wifi::supplicant::V1_0::IfaceType;
 using ::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIface;
 using ::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIfaceCallback;
 using ::android::hardware::wifi::supplicant::V1_0::SupplicantNetworkId;
@@ -42,6 +44,7 @@
 constexpr char kTestGroupIfName[] = "TestGroup";
 constexpr uint32_t kTestConnectGoIntent = 6;
 constexpr uint32_t kTestFindTimeout = 5;
+constexpr uint32_t kTestSetGroupIdleTimeout = 6;
 constexpr SupplicantNetworkId kTestNetworkId = 5;
 constexpr uint32_t kTestChannel = 1;
 constexpr uint32_t kTestOperatingClass = 81;
@@ -178,6 +181,26 @@
 }
 
 /*
+ * GetName
+ */
+TEST_F(SupplicantP2pIfaceHidlTest, GetName) {
+    const auto& status_and_interface_name = HIDL_INVOKE(p2p_iface_, getName);
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS,
+              status_and_interface_name.first.code);
+    EXPECT_FALSE(std::string(status_and_interface_name.second).empty());
+}
+
+/*
+ * GetType
+ */
+TEST_F(SupplicantP2pIfaceHidlTest, GetType) {
+    const auto& status_and_interface_type = HIDL_INVOKE(p2p_iface_, getType);
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS,
+              status_and_interface_type.first.code);
+    EXPECT_EQ(status_and_interface_type.second, IfaceType::P2P);
+}
+
+/*
  * GetDeviceAddress
  */
 TEST_F(SupplicantP2pIfaceHidlTest, GetDeviceAddress) {
@@ -286,6 +309,15 @@
 }
 
 /*
+ * RemoveGroup
+ */
+TEST_F(SupplicantP2pIfaceHidlTest, RemoveGroup) {
+    // This is not going to work with fake values.
+    EXPECT_NE(SupplicantStatusCode::SUCCESS,
+              HIDL_INVOKE(p2p_iface_, removeGroup, kTestGroupIfName).code);
+}
+
+/*
  * Reject
  */
 TEST_F(SupplicantP2pIfaceHidlTest, Reject) {
@@ -407,3 +439,28 @@
                                               status.code);
                                 });
 }
+
+/*
+ * SetGroupIdle
+ */
+TEST_F(SupplicantP2pIfaceHidlTest, SetGroupIdle) {
+    // This is not going to work with fake values.
+    EXPECT_NE(SupplicantStatusCode::SUCCESS,
+              HIDL_INVOKE(p2p_iface_, setGroupIdle, kTestGroupIfName,
+                          kTestSetGroupIdleTimeout)
+                  .code);
+}
+
+/*
+ * SetPowerSave
+ */
+TEST_F(SupplicantP2pIfaceHidlTest, SetPowerSave) {
+    // This is not going to work with fake values.
+    EXPECT_NE(
+        SupplicantStatusCode::SUCCESS,
+        HIDL_INVOKE(p2p_iface_, setPowerSave, kTestGroupIfName, true).code);
+    // This is not going to work with fake values.
+    EXPECT_NE(
+        SupplicantStatusCode::SUCCESS,
+        HIDL_INVOKE(p2p_iface_, setPowerSave, kTestGroupIfName, false).code);
+}
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp
index 5abf4e0..2797160 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp
@@ -20,6 +20,7 @@
 
 #include <android/hardware/wifi/supplicant/1.0/ISupplicantStaIface.h>
 
+#include "supplicant_hidl_call_util.h"
 #include "supplicant_hidl_test_utils.h"
 
 using ::android::sp;
@@ -28,6 +29,7 @@
 using ::android::hardware::hidl_vec;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
+using ::android::hardware::wifi::supplicant::V1_0::IfaceType;
 using ::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIface;
 using ::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIfaceCallback;
 using ::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork;
@@ -45,6 +47,10 @@
     ISupplicantStaIface::Hs20AnqpSubtypes::WAN_METRICS,
     ISupplicantStaIface::Hs20AnqpSubtypes::OPERATOR_FRIENDLY_NAME};
 constexpr char kTestHs20IconFile[] = "TestFile";
+constexpr char kTestRadioWorkName[] = "TestRadioWork";
+constexpr uint32_t kTestRadioWorkFrequency = 2412;
+constexpr uint32_t kTestRadioWorkTimeout = 8;
+constexpr uint32_t kTestRadioWorkId = 16;
 constexpr int8_t kTestCountryCode[] = {'U', 'S'};
 }  // namespace
 
@@ -163,6 +169,26 @@
 }
 
 /*
+ * GetName
+ */
+TEST_F(SupplicantStaIfaceHidlTest, GetName) {
+    const auto& status_and_interface_name = HIDL_INVOKE(sta_iface_, getName);
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS,
+              status_and_interface_name.first.code);
+    EXPECT_FALSE(std::string(status_and_interface_name.second).empty());
+}
+
+/*
+ * GetType
+ */
+TEST_F(SupplicantStaIfaceHidlTest, GetType) {
+    const auto& status_and_interface_type = HIDL_INVOKE(sta_iface_, getType);
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS,
+              status_and_interface_type.first.code);
+    EXPECT_EQ(status_and_interface_type.second, IfaceType::STA);
+}
+
+/*
  * listNetworks.
  */
 TEST_F(SupplicantStaIfaceHidlTest, listNetworks) {
@@ -405,3 +431,38 @@
             EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code);
         });
 }
+
+/*
+ * SetExternalSim
+ */
+TEST_F(SupplicantStaIfaceHidlTest, SetExternalSim) {
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS,
+              HIDL_INVOKE(sta_iface_, setExternalSim, true).code);
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS,
+              HIDL_INVOKE(sta_iface_, setExternalSim, false).code);
+}
+
+/*
+ * AddExtRadioWork
+ */
+TEST_F(SupplicantStaIfaceHidlTest, AddExtRadioWork) {
+    const auto& status_and_radio_work_id =
+        HIDL_INVOKE(sta_iface_, addExtRadioWork, kTestRadioWorkName,
+                    kTestRadioWorkFrequency, kTestRadioWorkTimeout);
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS,
+              status_and_radio_work_id.first.code);
+    // removeExtRadio only succeeds if the added radio work hasn't started yet.
+    // So there this no guaranteed result from calling removeExtRadioWork here.
+    // That being said, currently we are not able to test addExtRadioWork and
+    // removeExtRadioWork in a row.
+}
+
+/*
+ * RemoveExtRadioWork
+ */
+TEST_F(SupplicantStaIfaceHidlTest, RemoveExtRadioWork) {
+    // This fails because there is no on going radio work with kTestRadioWorkId.
+    EXPECT_NE(
+        SupplicantStatusCode::SUCCESS,
+        HIDL_INVOKE(sta_iface_, removeExtRadioWork, kTestRadioWorkId).code);
+}
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
index aa84e9a..832dd41 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
@@ -22,6 +22,7 @@
 
 #include <android/hardware/wifi/supplicant/1.0/ISupplicantStaNetwork.h>
 
+#include "supplicant_hidl_call_util.h"
 #include "supplicant_hidl_test_utils.h"
 
 using ::android::sp;
@@ -30,6 +31,7 @@
 using ::android::hardware::hidl_vec;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
+using ::android::hardware::wifi::supplicant::V1_0::IfaceType;
 using ::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIface;
 using ::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork;
 using ::android::hardware::wifi::supplicant::V1_0::
@@ -39,7 +41,7 @@
 
 namespace {
 constexpr char kTestSsidStr[] = "TestSsid1234";
-constexpr char kTestPsk[] = "TestPsk123";
+constexpr char kTestPskPassphrase[] = "TestPsk123";
 constexpr char kTestIdStr[] = "TestIdstr";
 constexpr char kTestEapPasswdStr[] = "TestEapPasswd1234";
 constexpr char kTestEapCert[] = "keystore://CERT";
@@ -54,7 +56,10 @@
 constexpr uint8_t kTestIk[] = {[0 ... 15] = 0x65};
 constexpr uint8_t kTestCk[] = {[0 ... 15] = 0x45};
 constexpr uint8_t kTestIdentity[] = {0x45, 0x67, 0x98, 0x67, 0x56};
+constexpr uint8_t kTestPsk[] = {[0 ... 31] = 0x12};
+constexpr uint8_t kTestAutParam[] = {[0 ... 13] = 0xe1};
 constexpr uint32_t kTestWepTxKeyIdx = 2;
+constexpr uint32_t kTestUpdateIdentifier = 21;
 constexpr uint32_t kTestKeyMgmt = (ISupplicantStaNetwork::KeyMgmtMask::WPA_PSK |
                                    ISupplicantStaNetwork::KeyMgmtMask::WPA_EAP);
 constexpr uint32_t kTestProto = (ISupplicantStaNetwork::ProtoMask::OSEN |
@@ -137,6 +142,27 @@
         });
 }
 
+/*
+ * GetInterfaceName
+ */
+TEST_F(SupplicantStaNetworkHidlTest, GetInterfaceName) {
+    const auto& status_and_interface_name =
+        HIDL_INVOKE(sta_network_, getInterfaceName);
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS,
+              status_and_interface_name.first.code);
+    EXPECT_FALSE(std::string(status_and_interface_name.second).empty());
+}
+
+/*
+ * GetType
+ */
+TEST_F(SupplicantStaNetworkHidlTest, GetType) {
+    const auto& status_and_interface_type = HIDL_INVOKE(sta_network_, getType);
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS,
+              status_and_interface_type.first.code);
+    EXPECT_EQ(status_and_interface_type.second, IfaceType::STA);
+}
+
 /* Tests out the various setter/getter methods. */
 /*
  * SetGetSsid
@@ -246,17 +272,29 @@
  */
 TEST_F(SupplicantStaNetworkHidlTest, SetGetPskPassphrase) {
     sta_network_->setPskPassphrase(
-        kTestPsk, [](const SupplicantStatus& status) {
+        kTestPskPassphrase, [](const SupplicantStatus& status) {
             EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code);
         });
     sta_network_->getPskPassphrase(
         [&](const SupplicantStatus& status, const hidl_string& psk) {
             EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code);
-            EXPECT_EQ(kTestPsk, std::string(psk.c_str()));
+            EXPECT_EQ(kTestPskPassphrase, std::string(psk.c_str()));
         });
 }
 
 /*
+ * SetGetPsk
+ */
+TEST_F(SupplicantStaNetworkHidlTest, SetGetPsk) {
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS,
+              HIDL_INVOKE(sta_network_, setPsk, kTestPsk).code);
+    const auto& status_and_psk = HIDL_INVOKE(sta_network_, getPsk);
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS, status_and_psk.first.code);
+    hidl_array<uint8_t, 32> expected_psk(kTestPsk);
+    EXPECT_EQ(expected_psk, status_and_psk.second);
+}
+
+/*
  * SetGetWepKeys
  */
 TEST_F(SupplicantStaNetworkHidlTest, SetGetWepTxKeyIdx) {
@@ -361,6 +399,12 @@
  * SetGetEapPhase2Method
  */
 TEST_F(SupplicantStaNetworkHidlTest, SetGetEapPhase2Method) {
+    ISupplicantStaNetwork::EapMethod set_eap_method =
+        ISupplicantStaNetwork::EapMethod::PEAP;
+    sta_network_->setEapMethod(
+        set_eap_method, [](const SupplicantStatus& status) {
+            EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code);
+        });
     ISupplicantStaNetwork::EapPhase2Method set_eap_phase2_method =
         ISupplicantStaNetwork::EapPhase2Method::NONE;
     sta_network_->setEapPhase2Method(
@@ -500,6 +544,21 @@
 }
 
 /*
+ * SetGetEapSubjectMatch
+ */
+TEST_F(SupplicantStaNetworkHidlTest, SetGetEapSubjectMatch) {
+    EXPECT_EQ(
+        SupplicantStatusCode::SUCCESS,
+        HIDL_INVOKE(sta_network_, setEapSubjectMatch, kTestEapMatch).code);
+    const auto& status_and_subject_match =
+        HIDL_INVOKE(sta_network_, getEapSubjectMatch);
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS,
+              status_and_subject_match.first.code);
+    EXPECT_EQ(kTestEapMatch,
+              std::string(status_and_subject_match.second.c_str()));
+}
+
+/*
  * SetGetEapDomainSuffixMatch
  */
 TEST_F(SupplicantStaNetworkHidlTest, SetGetEapDomainSuffixMatch) {
@@ -634,6 +693,14 @@
 }
 
 /*
+ * SendNetworkEapSimGsmAuthFailure
+ */
+TEST_F(SupplicantStaNetworkHidlTest, SendNetworkEapSimGsmAuthFailure) {
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS,
+              HIDL_INVOKE(sta_network_, sendNetworkEapSimGsmAuthFailure).code);
+}
+
+/*
  * SendNetworkEapSimUmtsAuthResponse
  */
 TEST_F(SupplicantStaNetworkHidlTest, SendNetworkEapSimUmtsAuthResponse) {
@@ -648,6 +715,24 @@
 }
 
 /*
+ * SendNetworkEapSimUmtsAuthFailure
+ */
+TEST_F(SupplicantStaNetworkHidlTest, SendNetworkEapSimUmtsAuthFailure) {
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS,
+              HIDL_INVOKE(sta_network_, sendNetworkEapSimUmtsAuthFailure).code);
+}
+
+/*
+ * SendNetworkEapSimUmtsAutsResponse
+ */
+TEST_F(SupplicantStaNetworkHidlTest, SendNetworkEapSimUmtsAutsResponse) {
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS,
+              HIDL_INVOKE(sta_network_, sendNetworkEapSimUmtsAutsResponse,
+                          kTestAutParam)
+                  .code);
+}
+
+/*
  * SendNetworkEapIdentityResponse
  */
 TEST_F(SupplicantStaNetworkHidlTest, SendNetworkEapIdentityResponse) {
@@ -658,3 +743,40 @@
             EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code);
         });
 }
+
+/*
+ * SetUpdateIdentifier
+ */
+TEST_F(SupplicantStaNetworkHidlTest, SetUpdateIdentifier) {
+    EXPECT_EQ(
+        SupplicantStatusCode::SUCCESS,
+        HIDL_INVOKE(sta_network_, setUpdateIdentifier, kTestUpdateIdentifier)
+            .code);
+}
+
+/*
+ * SetProactiveKeyCaching
+ */
+TEST_F(SupplicantStaNetworkHidlTest, SetProactiveKeyCaching) {
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS,
+              HIDL_INVOKE(sta_network_, setProactiveKeyCaching, true).code);
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS,
+              HIDL_INVOKE(sta_network_, setProactiveKeyCaching, false).code);
+}
+
+/*
+ * GetWpsNfcConfigurationToken
+ */
+TEST_F(SupplicantStaNetworkHidlTest, GetWpsNfcConfigurationToken) {
+    ASSERT_EQ(SupplicantStatusCode::SUCCESS,
+              HIDL_INVOKE(sta_network_, setSsid, ssid_).code);
+    ASSERT_EQ(SupplicantStatusCode::SUCCESS,
+              HIDL_INVOKE(sta_network_, setKeyMgmt, kTestKeyMgmt).code);
+    ASSERT_EQ(
+        SupplicantStatusCode::SUCCESS,
+        HIDL_INVOKE(sta_network_, setPskPassphrase, kTestPskPassphrase).code);
+    const auto& status_and_token =
+        HIDL_INVOKE(sta_network_, getWpsNfcConfigurationToken);
+    EXPECT_EQ(SupplicantStatusCode::SUCCESS, status_and_token.first.code);
+    EXPECT_FALSE(0 == status_and_token.second.size());
+}