Merge "Add VTS tests for Sap Apis."
diff --git a/bluetooth/1.0/Android.bp b/bluetooth/1.0/Android.bp
index 2373ceb..75cdcfc 100644
--- a/bluetooth/1.0/Android.bp
+++ b/bluetooth/1.0/Android.bp
@@ -32,6 +32,7 @@
     ],
     out: [
         "android/hardware/bluetooth/1.0/types.h",
+        "android/hardware/bluetooth/1.0/hwtypes.h",
         "android/hardware/bluetooth/1.0/IBluetoothHci.h",
         "android/hardware/bluetooth/1.0/IHwBluetoothHci.h",
         "android/hardware/bluetooth/1.0/BnHwBluetoothHci.h",
diff --git a/bluetooth/1.0/IBluetoothHci.hal b/bluetooth/1.0/IBluetoothHci.hal
index 8722616..7996ac3 100644
--- a/bluetooth/1.0/IBluetoothHci.hal
+++ b/bluetooth/1.0/IBluetoothHci.hal
@@ -18,7 +18,7 @@
 
 import IBluetoothHciCallbacks;
 
-/*
+/**
  * The Host Controller Interface (HCI) is the layer defined by the Bluetooth
  * specification between the software that runs on the host and the Bluetooth
  * controller chip. This boundary is the natural choice for a Hardware
diff --git a/bluetooth/1.0/IBluetoothHciCallbacks.hal b/bluetooth/1.0/IBluetoothHciCallbacks.hal
index 15db1ce..b22fa34 100644
--- a/bluetooth/1.0/IBluetoothHciCallbacks.hal
+++ b/bluetooth/1.0/IBluetoothHciCallbacks.hal
@@ -16,7 +16,7 @@
 
 package android.hardware.bluetooth@1.0;
 
-/* The interface from the Bluetooth Controller to the stack. */
+/** The interface from the Bluetooth Controller to the stack. */
 interface IBluetoothHciCallbacks {
     /**
      * Invoked when the Bluetooth controller initialization has been
diff --git a/bluetooth/1.0/default/bluetooth_hci.cc b/bluetooth/1.0/default/bluetooth_hci.cc
index fec5b81..8eccfc7 100644
--- a/bluetooth/1.0/default/bluetooth_hci.cc
+++ b/bluetooth/1.0/default/bluetooth_hci.cc
@@ -15,9 +15,10 @@
 //
 
 #define LOG_TAG "android.hardware.bluetooth@1.0-impl"
+#include "bluetooth_hci.h"
+
 #include <utils/Log.h>
 
-#include "bluetooth_hci.h"
 #include "vendor_interface.h"
 
 namespace android {
@@ -38,59 +39,77 @@
       uint64_t /*cookie*/,
       const wp<::android::hidl::base::V1_0::IBase>& /*who*/) {
     ALOGE("BluetoothDeathRecipient::serviceDied - Bluetooth service died");
+    has_died_ = true;
     mHci->close();
   }
   sp<IBluetoothHci> mHci;
+  bool getHasDied() const { return has_died_; }
+  void setHasDied(bool has_died) { has_died_ = has_died; }
+
+ private:
+  bool has_died_;
 };
 
 BluetoothHci::BluetoothHci()
-    : deathRecipient(new BluetoothDeathRecipient(this)) {}
+    : death_recipient_(new BluetoothDeathRecipient(this)) {}
 
 Return<void> BluetoothHci::initialize(
     const ::android::sp<IBluetoothHciCallbacks>& cb) {
-  ALOGW("BluetoothHci::initialize()");
-  cb->linkToDeath(deathRecipient, 0);
-  event_cb_ = cb;
+  ALOGI("BluetoothHci::initialize()");
+  if (cb == nullptr) {
+    ALOGE("cb == nullptr! -> Unable to call initializationComplete(ERR)");
+    return Void();
+  }
+
+  death_recipient_->setHasDied(false);
+  cb->linkToDeath(death_recipient_, 0);
 
   bool rc = VendorInterface::Initialize(
-      [this](bool status) {
-        auto hidl_status = event_cb_->initializationComplete(
+      [cb](bool status) {
+        auto hidl_status = cb->initializationComplete(
             status ? Status::SUCCESS : Status::INITIALIZATION_ERROR);
         if (!hidl_status.isOk()) {
           ALOGE("VendorInterface -> Unable to call initializationComplete()");
         }
       },
-      [this](const hidl_vec<uint8_t>& packet) {
-        auto hidl_status = event_cb_->hciEventReceived(packet);
+      [cb](const hidl_vec<uint8_t>& packet) {
+        auto hidl_status = cb->hciEventReceived(packet);
         if (!hidl_status.isOk()) {
           ALOGE("VendorInterface -> Unable to call hciEventReceived()");
         }
       },
-      [this](const hidl_vec<uint8_t>& packet) {
-        auto hidl_status = event_cb_->aclDataReceived(packet);
+      [cb](const hidl_vec<uint8_t>& packet) {
+        auto hidl_status = cb->aclDataReceived(packet);
         if (!hidl_status.isOk()) {
           ALOGE("VendorInterface -> Unable to call aclDataReceived()");
         }
       },
-      [this](const hidl_vec<uint8_t>& packet) {
-        auto hidl_status = event_cb_->scoDataReceived(packet);
+      [cb](const hidl_vec<uint8_t>& packet) {
+        auto hidl_status = cb->scoDataReceived(packet);
         if (!hidl_status.isOk()) {
           ALOGE("VendorInterface -> Unable to call scoDataReceived()");
         }
       });
   if (!rc) {
-    auto hidl_status =
-        event_cb_->initializationComplete(Status::INITIALIZATION_ERROR);
+    auto hidl_status = cb->initializationComplete(Status::INITIALIZATION_ERROR);
     if (!hidl_status.isOk()) {
       ALOGE("VendorInterface -> Unable to call initializationComplete(ERR)");
     }
   }
+
+  unlink_cb_ = [cb](sp<BluetoothDeathRecipient>& death_recipient) {
+    if (death_recipient->getHasDied())
+      ALOGI("Skipping unlink call, service died.");
+    else
+      cb->unlinkToDeath(death_recipient);
+  };
+
   return Void();
 }
 
 Return<void> BluetoothHci::close() {
-  ALOGW("BluetoothHci::close()");
-  event_cb_->unlinkToDeath(deathRecipient);
+  ALOGI("BluetoothHci::close()");
+  unlink_cb_(death_recipient_);
   VendorInterface::Shutdown();
   return Void();
 }
diff --git a/bluetooth/1.0/default/bluetooth_hci.h b/bluetooth/1.0/default/bluetooth_hci.h
index 4f92231..6912405 100644
--- a/bluetooth/1.0/default/bluetooth_hci.h
+++ b/bluetooth/1.0/default/bluetooth_hci.h
@@ -44,8 +44,8 @@
 
  private:
   void sendDataToController(const uint8_t type, const hidl_vec<uint8_t>& data);
-  ::android::sp<IBluetoothHciCallbacks> event_cb_;
-  ::android::sp<BluetoothDeathRecipient> deathRecipient;
+  ::android::sp<BluetoothDeathRecipient> death_recipient_;
+  std::function<void(sp<BluetoothDeathRecipient>&)> unlink_cb_;
 };
 
 extern "C" IBluetoothHci* HIDL_FETCH_IBluetoothHci(const char* name);
diff --git a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
index 9a4efae..6156553 100644
--- a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
+++ b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
@@ -23,9 +23,8 @@
 #include <hardware/bluetooth.h>
 #include <utils/Log.h>
 
+#include <VtsHalHidlTargetCallbackBase.h>
 #include <VtsHalHidlTargetTestBase.h>
-#include <condition_variable>
-#include <mutex>
 #include <queue>
 
 using ::android::hardware::bluetooth::V1_0::IBluetoothHci;
@@ -92,6 +91,11 @@
 #define ACL_BROADCAST_ACTIVE_SLAVE (0x1 << 4)
 #define ACL_PACKET_BOUNDARY_COMPLETE (0x3 << 6)
 
+constexpr char kCallbackNameAclEventReceived[] = "aclDataReceived";
+constexpr char kCallbackNameHciEventReceived[] = "hciEventReceived";
+constexpr char kCallbackNameInitializationComplete[] = "initializationComplete";
+constexpr char kCallbackNameScoEventReceived[] = "scoDataReceived";
+
 class ThroughputLogger {
  public:
   ThroughputLogger(std::string task)
@@ -121,7 +125,8 @@
  public:
   virtual void SetUp() override {
     // currently test passthrough mode only
-    bluetooth = ::testing::VtsHalHidlTargetTestBase::getService<IBluetoothHci>();
+    bluetooth =
+        ::testing::VtsHalHidlTargetTestBase::getService<IBluetoothHci>();
     ASSERT_NE(bluetooth, nullptr);
     ALOGI("%s: getService() for bluetooth is %s", __func__,
           bluetooth->isRemote() ? "remote" : "local");
@@ -135,10 +140,6 @@
     max_sco_data_packets = 0;
 
     initialized = false;
-    initialized_count = 0;
-    event_count = 0;
-    acl_count = 0;
-    sco_count = 0;
     event_cb_count = 0;
     acl_cb_count = 0;
     sco_cb_count = 0;
@@ -146,7 +147,18 @@
     ASSERT_EQ(initialized, false);
     bluetooth->initialize(bluetooth_cb);
 
-    wait_for_init_callback();
+    bluetooth_cb->SetWaitTimeout(kCallbackNameInitializationComplete,
+                                 WAIT_FOR_INIT_TIMEOUT);
+    bluetooth_cb->SetWaitTimeout(kCallbackNameHciEventReceived,
+                                 WAIT_FOR_HCI_EVENT_TIMEOUT);
+    bluetooth_cb->SetWaitTimeout(kCallbackNameAclEventReceived,
+                                 WAIT_FOR_ACL_DATA_TIMEOUT);
+    bluetooth_cb->SetWaitTimeout(kCallbackNameScoEventReceived,
+                                 WAIT_FOR_SCO_DATA_TIMEOUT);
+
+    EXPECT_TRUE(
+        bluetooth_cb->WaitForCallback(kCallbackNameInitializationComplete)
+            .first);
 
     ASSERT_EQ(initialized, true);
   }
@@ -171,82 +183,10 @@
   void wait_for_command_complete_event(hidl_vec<uint8_t> cmd);
   int wait_for_completed_packets_event(uint16_t handle);
 
-  // Inform the test about the initialization callback
-  inline void notify_initialized() {
-    std::unique_lock<std::mutex> lock(initialized_mutex);
-    initialized_count++;
-    initialized_condition.notify_one();
-  }
-
-  // Test code calls this function to wait for the init callback
-  inline void wait_for_init_callback() {
-    std::unique_lock<std::mutex> lock(initialized_mutex);
-
-    auto start_time = std::chrono::steady_clock::now();
-    while (initialized_count == 0)
-      if (initialized_condition.wait_until(lock,
-                                     start_time + WAIT_FOR_INIT_TIMEOUT) ==
-          std::cv_status::timeout)
-        return;
-    initialized_count--;
-  }
-
-  // Inform the test about an event callback
-  inline void notify_event_received() {
-    std::unique_lock<std::mutex> lock(event_mutex);
-    event_count++;
-    event_condition.notify_one();
-  }
-
-  // Test code calls this function to wait for an event callback
-  inline void wait_for_event() {
-    std::unique_lock<std::mutex> lock(event_mutex);
-
-    auto start_time = std::chrono::steady_clock::now();
-    while (event_count == 0)
-      if (event_condition.wait_until(lock,
-                                     start_time + WAIT_FOR_HCI_EVENT_TIMEOUT) ==
-          std::cv_status::timeout)
-        return;
-    event_count--;
-  }
-
-  // Inform the test about an acl data callback
-  inline void notify_acl_data_received() {
-    std::unique_lock<std::mutex> lock(acl_mutex);
-    acl_count++;
-    acl_condition.notify_one();
-  }
-
-  // Test code calls this function to wait for an acl data callback
-  inline void wait_for_acl() {
-    std::unique_lock<std::mutex> lock(acl_mutex);
-
-    while (acl_count == 0)
-      acl_condition.wait_until(
-          lock, std::chrono::steady_clock::now() + WAIT_FOR_ACL_DATA_TIMEOUT);
-    acl_count--;
-  }
-
-  // Inform the test about a sco data callback
-  inline void notify_sco_data_received() {
-    std::unique_lock<std::mutex> lock(sco_mutex);
-    sco_count++;
-    sco_condition.notify_one();
-  }
-
-  // Test code calls this function to wait for a sco data callback
-  inline void wait_for_sco() {
-    std::unique_lock<std::mutex> lock(sco_mutex);
-
-    while (sco_count == 0)
-      sco_condition.wait_until(
-          lock, std::chrono::steady_clock::now() + WAIT_FOR_SCO_DATA_TIMEOUT);
-    sco_count--;
-  }
-
   // A simple test implementation of BluetoothHciCallbacks.
-  class BluetoothHciCallbacks : public IBluetoothHciCallbacks {
+  class BluetoothHciCallbacks
+      : public ::testing::VtsHalHidlTargetCallbackBase<BluetoothHidlTest>,
+        public IBluetoothHciCallbacks {
     BluetoothHidlTest& parent_;
 
    public:
@@ -256,7 +196,7 @@
 
     Return<void> initializationComplete(Status status) override {
       parent_.initialized = (status == Status::SUCCESS);
-      parent_.notify_initialized();
+      NotifyFromCallback(kCallbackNameInitializationComplete);
       ALOGV("%s (status = %d)", __func__, static_cast<int>(status));
       return Void();
     };
@@ -265,7 +205,7 @@
         const ::android::hardware::hidl_vec<uint8_t>& event) override {
       parent_.event_cb_count++;
       parent_.event_queue.push(event);
-      parent_.notify_event_received();
+      NotifyFromCallback(kCallbackNameHciEventReceived);
       ALOGV("Event received (length = %d)", static_cast<int>(event.size()));
       return Void();
     };
@@ -274,7 +214,7 @@
         const ::android::hardware::hidl_vec<uint8_t>& data) override {
       parent_.acl_cb_count++;
       parent_.acl_queue.push(data);
-      parent_.notify_acl_data_received();
+      NotifyFromCallback(kCallbackNameAclEventReceived);
       return Void();
     };
 
@@ -282,13 +222,13 @@
         const ::android::hardware::hidl_vec<uint8_t>& data) override {
       parent_.sco_cb_count++;
       parent_.sco_queue.push(data);
-      parent_.notify_sco_data_received();
+      NotifyFromCallback(kCallbackNameScoEventReceived);
       return Void();
     };
   };
 
   sp<IBluetoothHci> bluetooth;
-  sp<IBluetoothHciCallbacks> bluetooth_cb;
+  sp<BluetoothHciCallbacks> bluetooth_cb;
   std::queue<hidl_vec<uint8_t>> event_queue;
   std::queue<hidl_vec<uint8_t>> acl_queue;
   std::queue<hidl_vec<uint8_t>> sco_queue;
@@ -303,20 +243,6 @@
   int max_sco_data_packet_length;
   int max_acl_data_packets;
   int max_sco_data_packets;
-
- private:
-  std::mutex initialized_mutex;
-  std::mutex event_mutex;
-  std::mutex sco_mutex;
-  std::mutex acl_mutex;
-  std::condition_variable initialized_condition;
-  std::condition_variable event_condition;
-  std::condition_variable sco_condition;
-  std::condition_variable acl_condition;
-  int initialized_count;
-  int event_count;
-  int sco_count;
-  int acl_count;
 };
 
 // A class for test environment setup (kept since this file is a template).
@@ -334,7 +260,8 @@
   int status_event_count = 0;
   hidl_vec<uint8_t> event;
   do {
-    wait_for_event();
+    EXPECT_TRUE(
+        bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived).first);
     EXPECT_LT(static_cast<size_t>(0), event_queue.size());
     if (event_queue.size() == 0) {
       event.resize(0);
@@ -366,7 +293,8 @@
   hidl_vec<uint8_t> cmd = COMMAND_HCI_READ_BUFFER_SIZE;
   bluetooth->sendHciCommand(cmd);
 
-  wait_for_event();
+  EXPECT_TRUE(
+      bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived).first);
 
   EXPECT_LT(static_cast<size_t>(0), event_queue.size());
   if (event_queue.size() == 0) return;
@@ -420,7 +348,8 @@
     bluetooth->sendHciCommand(cmd);
 
     // Check the loopback of the HCI packet
-    wait_for_event();
+    EXPECT_TRUE(
+        bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived).first);
     hidl_vec<uint8_t> event = event_queue.front();
     event_queue.pop();
     size_t compare_length =
@@ -456,7 +385,8 @@
     bluetooth->sendScoData(sco_vector);
 
     // Check the loopback of the SCO packet
-    wait_for_sco();
+    EXPECT_TRUE(
+        bluetooth_cb->WaitForCallback(kCallbackNameScoEventReceived).first);
     hidl_vec<uint8_t> sco_loopback = sco_queue.front();
     sco_queue.pop();
 
@@ -501,7 +431,8 @@
     bluetooth->sendAclData(acl_vector);
 
     // Check the loopback of the ACL packet
-    wait_for_acl();
+    EXPECT_TRUE(
+        bluetooth_cb->WaitForCallback(kCallbackNameAclEventReceived).first);
     hidl_vec<uint8_t> acl_loopback = acl_queue.front();
     acl_queue.pop();
 
@@ -527,7 +458,8 @@
 
 // Return the number of completed packets reported by the controller.
 int BluetoothHidlTest::wait_for_completed_packets_event(uint16_t handle) {
-  wait_for_event();
+  EXPECT_TRUE(
+      bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived).first);
   int packets_processed = 0;
   while (event_queue.size() > 0) {
     hidl_vec<uint8_t> event = event_queue.front();
@@ -554,7 +486,8 @@
   int connection_event_count = 0;
   hidl_vec<uint8_t> event;
   do {
-    wait_for_event();
+    EXPECT_TRUE(
+        bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived).first);
     event = event_queue.front();
     event_queue.pop();
     EXPECT_GT(event.size(),
@@ -592,7 +525,7 @@
 }
 
 // Empty test: Initialize()/Close() are called in SetUp()/TearDown().
-TEST_F(BluetoothHidlTest, InitializeAndClose) { }
+TEST_F(BluetoothHidlTest, InitializeAndClose) {}
 
 // Send an HCI Reset with sendHciCommand and wait for a command complete event.
 TEST_F(BluetoothHidlTest, HciReset) {
@@ -607,7 +540,8 @@
   hidl_vec<uint8_t> cmd = COMMAND_HCI_READ_LOCAL_VERSION_INFORMATION;
   bluetooth->sendHciCommand(cmd);
 
-  wait_for_event();
+  EXPECT_TRUE(
+      bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived).first);
 
   hidl_vec<uint8_t> event = event_queue.front();
   event_queue.pop();
@@ -627,7 +561,8 @@
   hidl_vec<uint8_t> cmd = COMMAND_HCI_SHOULD_BE_UNKNOWN;
   bluetooth->sendHciCommand(cmd);
 
-  wait_for_event();
+  EXPECT_TRUE(
+      bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived).first);
 
   hidl_vec<uint8_t> event = event_queue.front();
   event_queue.pop();
diff --git a/boot/1.0/Android.bp b/boot/1.0/Android.bp
index 7265cc2..498c940 100644
--- a/boot/1.0/Android.bp
+++ b/boot/1.0/Android.bp
@@ -30,6 +30,7 @@
     ],
     out: [
         "android/hardware/boot/1.0/types.h",
+        "android/hardware/boot/1.0/hwtypes.h",
         "android/hardware/boot/1.0/IBootControl.h",
         "android/hardware/boot/1.0/IHwBootControl.h",
         "android/hardware/boot/1.0/BnHwBootControl.h",
diff --git a/configstore/1.0/Android.bp b/configstore/1.0/Android.bp
index c2cd54a..712e9a7 100644
--- a/configstore/1.0/Android.bp
+++ b/configstore/1.0/Android.bp
@@ -30,6 +30,7 @@
     ],
     out: [
         "android/hardware/configstore/1.0/types.h",
+        "android/hardware/configstore/1.0/hwtypes.h",
         "android/hardware/configstore/1.0/ISurfaceFlingerConfigs.h",
         "android/hardware/configstore/1.0/IHwSurfaceFlingerConfigs.h",
         "android/hardware/configstore/1.0/BnHwSurfaceFlingerConfigs.h",
diff --git a/configstore/1.0/default/Android.mk b/configstore/1.0/default/Android.mk
index b168029..e017cfd 100644
--- a/configstore/1.0/default/Android.mk
+++ b/configstore/1.0/default/Android.mk
@@ -2,25 +2,6 @@
 
 ################################################################################
 include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.configstore@1.0-impl
-LOCAL_PROPRIETARY_MODULE := true
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-LOCAL_MODULE_RELATIVE_PATH := hw
-
-include $(LOCAL_PATH)/surfaceflinger.mk
-
-LOCAL_SHARED_LIBRARIES := \
-    libbase \
-    libhidlbase \
-    libhidltransport \
-    libutils \
-    android.hardware.configstore@1.0 \
-    android.hidl.base@1.0
-
-include $(BUILD_SHARED_LIBRARY)
-
-################################################################################
-include $(CLEAR_VARS)
 LOCAL_MODULE := android.hardware.configstore@1.0-service
 LOCAL_PROPRIETARY_MODULE := true
 LOCAL_MODULE_CLASS := EXECUTABLES
@@ -28,13 +9,14 @@
 LOCAL_INIT_RC := android.hardware.configstore@1.0-service.rc
 LOCAL_SRC_FILES:= service.cpp
 
+include $(LOCAL_PATH)/surfaceflinger.mk
+
 LOCAL_SHARED_LIBRARIES := \
-    liblog \
-    libdl \
-    libutils \
+    android.hardware.configstore@1.0 \
     libhidlbase \
     libhidltransport \
-    android.hardware.configstore@1.0 \
+    libbase \
+    liblog \
+    libutils \
 
 include $(BUILD_EXECUTABLE)
-
diff --git a/configstore/1.0/default/SurfaceFlingerConfigs.cpp b/configstore/1.0/default/SurfaceFlingerConfigs.cpp
index 5d62b15..acc3d1f 100644
--- a/configstore/1.0/default/SurfaceFlingerConfigs.cpp
+++ b/configstore/1.0/default/SurfaceFlingerConfigs.cpp
@@ -29,12 +29,6 @@
     return Void();
 }
 
-// Methods from ::android::hidl::base::V1_0::IBase follow.
-
-ISurfaceFlingerConfigs* HIDL_FETCH_ISurfaceFlingerConfigs(const char* /* name */) {
-    return new SurfaceFlingerConfigs();
-}
-
 }  // namespace implementation
 }  // namespace V1_0
 }  // namespace configstore
diff --git a/configstore/1.0/default/SurfaceFlingerConfigs.h b/configstore/1.0/default/SurfaceFlingerConfigs.h
index c9652fc..5bdf7bb 100644
--- a/configstore/1.0/default/SurfaceFlingerConfigs.h
+++ b/configstore/1.0/default/SurfaceFlingerConfigs.h
@@ -31,8 +31,6 @@
 
 };
 
-extern "C" ISurfaceFlingerConfigs* HIDL_FETCH_ISurfaceFlingerConfigs(const char* name);
-
 }  // namespace implementation
 }  // namespace V1_0
 }  // namespace configstore
diff --git a/configstore/1.0/default/service.cpp b/configstore/1.0/default/service.cpp
index cb04215..60b69ab 100644
--- a/configstore/1.0/default/service.cpp
+++ b/configstore/1.0/default/service.cpp
@@ -17,13 +17,15 @@
 #define LOG_TAG "android.hardware.configstore@1.0-service"
 
 #include <android/hardware/configstore/1.0/ISurfaceFlingerConfigs.h>
-#include <hidl/LegacySupport.h>
+#include <hidl/HidlTransportSupport.h>
 
-using android::hardware::configstore::V1_0::ISurfaceFlingerConfigs;
+#include "SurfaceFlingerConfigs.h"
+
 using android::hardware::configureRpcThreadpool;
-using android::hardware::registerPassthroughServiceImplementation;
 using android::hardware::joinRpcThreadpool;
-
+using android::hardware::configstore::V1_0::ISurfaceFlingerConfigs;
+using android::hardware::configstore::V1_0::implementation::SurfaceFlingerConfigs;
+using android::sp;
 using android::status_t;
 using android::OK;
 
@@ -31,9 +33,8 @@
     // TODO(b/34857894): tune the max thread count.
     configureRpcThreadpool(10, true);
 
-    status_t status;
-
-    status = registerPassthroughServiceImplementation<ISurfaceFlingerConfigs>();
+    sp<ISurfaceFlingerConfigs> surfaceFlingerConfigs = new SurfaceFlingerConfigs;
+    status_t status = surfaceFlingerConfigs->registerAsService();
     LOG_ALWAYS_FATAL_IF(status != OK, "Could not register ISurfaceFlingerConfigs");
 
     // other interface registration comes here
diff --git a/ir/1.0/Android.bp b/ir/1.0/Android.bp
index da49579..5bff1d3 100644
--- a/ir/1.0/Android.bp
+++ b/ir/1.0/Android.bp
@@ -30,6 +30,7 @@
     ],
     out: [
         "android/hardware/ir/1.0/types.h",
+        "android/hardware/ir/1.0/hwtypes.h",
         "android/hardware/ir/1.0/IConsumerIr.h",
         "android/hardware/ir/1.0/IHwConsumerIr.h",
         "android/hardware/ir/1.0/BnHwConsumerIr.h",
diff --git a/ir/1.0/IConsumerIr.hal b/ir/1.0/IConsumerIr.hal
index f9e6316..0881dfb 100644
--- a/ir/1.0/IConsumerIr.hal
+++ b/ir/1.0/IConsumerIr.hal
@@ -17,7 +17,7 @@
 package android.hardware.ir@1.0;
 
 interface IConsumerIr {
-    /*
+    /**
      * transmit() sends an IR pattern at a given carrierFreq.
      *
      * The pattern is alternating series of carrier on and off periods measured in
@@ -30,7 +30,7 @@
      */
     transmit(int32_t carrierFreq, vec<int32_t> pattern) generates (bool success);
 
-    /*
+    /**
      * getCarrierFreqs() enumerates which frequencies the IR transmitter supports.
      *
      * returns: On success, true and a vector of all supported frequency
diff --git a/nfc/1.0/Android.bp b/nfc/1.0/Android.bp
index e7305b4..7ee3a9e 100644
--- a/nfc/1.0/Android.bp
+++ b/nfc/1.0/Android.bp
@@ -32,6 +32,7 @@
     ],
     out: [
         "android/hardware/nfc/1.0/types.h",
+        "android/hardware/nfc/1.0/hwtypes.h",
         "android/hardware/nfc/1.0/INfc.h",
         "android/hardware/nfc/1.0/IHwNfc.h",
         "android/hardware/nfc/1.0/BnHwNfc.h",
diff --git a/nfc/1.0/INfc.hal b/nfc/1.0/INfc.hal
index c6e1511..74b69a0 100644
--- a/nfc/1.0/INfc.hal
+++ b/nfc/1.0/INfc.hal
@@ -19,7 +19,7 @@
 import INfcClientCallback;
 
 interface INfc {
-    /*
+    /**
      * Opens the NFC controller device and performs initialization.
      * This may include patch download and other vendor-specific initialization.
      *
@@ -37,7 +37,7 @@
     @callflow(next={"write", "coreInitialized", "prediscover", "powerCycle", "controlGranted"})
     open(INfcClientCallback clientCallback) generates (NfcStatus status);
 
-    /*
+    /**
      * Performs an NCI write.
      *
      * This method may queue writes and return immediately. The only
@@ -49,7 +49,7 @@
                     "controlGranted"})
     write(NfcData data) generates (uint32_t retval);
 
-    /*
+    /**
      * coreInitialized() is called after the CORE_INIT_RSP is received from the
      * NFCC. At this time, the HAL can do any chip-specific configuration.
      *
@@ -62,7 +62,7 @@
     @callflow(next={"write", "prediscover", "close"})
     coreInitialized(NfcData data) generates (NfcStatus status);
 
-    /*
+    /**
      * prediscover is called every time before starting RF discovery.
      * It is a good place to do vendor-specific configuration that must be
      * performed every time RF discovery is about to be started.
@@ -76,7 +76,7 @@
     @callflow(next={"write", "close", "coreInitialized", "powerCycle", "controlGranted"})
     prediscover() generates (NfcStatus status);
 
-    /*
+    /**
      * Close the NFC controller. Should free all resources.
      *
      * @return NfcStatus::OK on success and NfcStatus::FAILED on error.
@@ -84,7 +84,7 @@
     @exit
     close() generates (NfcStatus status);
 
-    /*
+    /**
      * Grant HAL the exclusive control to send NCI commands.
      * Called in response to NfcEvent.REQUEST_CONTROL.
      * Must only be called when there are no NCI commands pending.
@@ -95,7 +95,7 @@
     @callflow(next={"write", "close", "prediscover", "coreInitialized", "powerCycle"})
     controlGranted() generates (NfcStatus status);
 
-     /*
+     /**
      * Restart controller by power cyle;
      * NfcEvent.OPEN_CPLT will notify when operation is complete.
      *
diff --git a/nfc/1.0/INfcClientCallback.hal b/nfc/1.0/INfcClientCallback.hal
index a56cc09..9972ada 100644
--- a/nfc/1.0/INfcClientCallback.hal
+++ b/nfc/1.0/INfcClientCallback.hal
@@ -17,13 +17,13 @@
 package android.hardware.nfc@1.0;
 
 interface INfcClientCallback {
-    /*
+    /**
      * The callback passed in from the NFC stack that the HAL
      * can use to pass events back to the stack.
      */
     sendEvent(NfcEvent event, NfcStatus status);
 
-    /*
+    /**
      * The callback passed in from the NFC stack that the HAL
      * can use to pass incomming data to the stack.
      */
diff --git a/nfc/1.0/default/Nfc.cpp b/nfc/1.0/default/Nfc.cpp
index c610406..d337a36 100644
--- a/nfc/1.0/default/Nfc.cpp
+++ b/nfc/1.0/default/Nfc.cpp
@@ -12,7 +12,7 @@
 namespace V1_0 {
 namespace implementation {
 
-sp<INfcClientCallback> Nfc::mCallback = NULL;
+sp<INfcClientCallback> Nfc::mCallback = nullptr;
 
 Nfc::Nfc(nfc_nci_device_t* device) : mDevice(device),
     mDeathRecipient(new NfcDeathRecipient(this)) {
@@ -21,35 +21,58 @@
 // Methods from ::android::hardware::nfc::V1_0::INfc follow.
 ::android::hardware::Return<NfcStatus> Nfc::open(const sp<INfcClientCallback>& clientCallback)  {
     mCallback = clientCallback;
+
+    if (mDevice == nullptr || mCallback == nullptr) {
+        return NfcStatus::FAILED;
+    }
     mCallback->linkToDeath(mDeathRecipient, 0 /*cookie*/);
     int ret = mDevice->open(mDevice, eventCallback, dataCallback);
     return ret == 0 ? NfcStatus::OK : NfcStatus::FAILED;
 }
 
 ::android::hardware::Return<uint32_t> Nfc::write(const hidl_vec<uint8_t>& data)  {
+    if (mDevice == nullptr) {
+        return -1;
+    }
     return mDevice->write(mDevice, data.size(), &data[0]);
 }
 
 ::android::hardware::Return<NfcStatus> Nfc::coreInitialized(const hidl_vec<uint8_t>& data)  {
     hidl_vec<uint8_t> copy = data;
+
+    if (mDevice == nullptr) {
+        return NfcStatus::FAILED;
+    }
     int ret = mDevice->core_initialized(mDevice, &copy[0]);
     return ret == 0 ? NfcStatus::OK : NfcStatus::FAILED;
 }
 
 ::android::hardware::Return<NfcStatus> Nfc::prediscover()  {
+    if (mDevice == nullptr) {
+        return NfcStatus::FAILED;
+    }
     return mDevice->pre_discover(mDevice) ? NfcStatus::FAILED : NfcStatus::OK;
 }
 
 ::android::hardware::Return<NfcStatus> Nfc::close()  {
+    if (mDevice == nullptr || mCallback == nullptr) {
+        return NfcStatus::FAILED;
+    }
     mCallback->unlinkToDeath(mDeathRecipient);
     return mDevice->close(mDevice) ? NfcStatus::FAILED : NfcStatus::OK;
 }
 
 ::android::hardware::Return<NfcStatus> Nfc::controlGranted()  {
+    if (mDevice == nullptr) {
+        return NfcStatus::FAILED;
+    }
     return mDevice->control_granted(mDevice) ? NfcStatus::FAILED : NfcStatus::OK;
 }
 
 ::android::hardware::Return<NfcStatus> Nfc::powerCycle()  {
+    if (mDevice == nullptr) {
+        return NfcStatus::FAILED;
+    }
     return mDevice->power_cycle(mDevice) ? NfcStatus::FAILED : NfcStatus::OK;
 }
 
@@ -57,11 +80,10 @@
 INfc* HIDL_FETCH_INfc(const char * /*name*/) {
     nfc_nci_device_t* nfc_device;
     int ret = 0;
-    const hw_module_t* hw_module = NULL;
+    const hw_module_t* hw_module = nullptr;
 
     ret = hw_get_module (NFC_NCI_HARDWARE_MODULE_ID, &hw_module);
-    if (ret == 0)
-    {
+    if (ret == 0) {
         ret = nfc_nci_open (hw_module, &nfc_device);
         if (ret != 0) {
             ALOGE ("nfc_nci_open failed: %d", ret);
diff --git a/radio/1.0/Android.bp b/radio/1.0/Android.bp
index f59cf66..e457795 100644
--- a/radio/1.0/Android.bp
+++ b/radio/1.0/Android.bp
@@ -38,6 +38,7 @@
     ],
     out: [
         "android/hardware/radio/1.0/types.h",
+        "android/hardware/radio/1.0/hwtypes.h",
         "android/hardware/radio/1.0/IRadio.h",
         "android/hardware/radio/1.0/IHwRadio.h",
         "android/hardware/radio/1.0/BnHwRadio.h",
diff --git a/radio/1.0/IRadio.hal b/radio/1.0/IRadio.hal
index 0b1bf40..2976290 100644
--- a/radio/1.0/IRadio.hal
+++ b/radio/1.0/IRadio.hal
@@ -19,7 +19,7 @@
 import IRadioResponse;
 import IRadioIndication;
 
-/*
+/**
  * This interface is used by telephony & telecom to talk to cellular radio.
  * All the functions have minimum one parameter:
  * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
@@ -27,7 +27,7 @@
  * serial to different methods), multiple responses (one for each method call) must still be served.
  */
 interface IRadio {
-    /*
+    /**
      * Set response functions for radio requests & radio indications.
      *
      * @param radioResponse Object containing response functions
@@ -36,7 +36,7 @@
     setResponseFunctions(IRadioResponse radioResponse,
             IRadioIndication radioIndication);
 
-    /*
+    /**
      * Requests status of the ICC card
      *
      * @param serial Serial number of request.
@@ -46,7 +46,7 @@
      */
     oneway getIccCardStatus(int32_t serial);
 
-    /*
+    /**
      * Supplies ICC PIN. Only called if CardStatus has AppState.PIN state
      *
      * @param serial Serial number of request.
@@ -58,7 +58,7 @@
      */
     oneway supplyIccPinForApp(int32_t serial, string pin, string aid);
 
-    /*
+    /**
      * Supplies ICC PUK and new PIN.
      *
      * @param serial Serial number of request.
@@ -71,7 +71,7 @@
      */
     oneway supplyIccPukForApp(int32_t serial, string puk, string pin, string aid);
 
-    /*
+    /**
      * Supplies ICC PIN2. Only called following operation where SIM_PIN2 was
      * returned as a a failure from a previous operation.
      *
@@ -84,7 +84,7 @@
      */
     oneway supplyIccPin2ForApp(int32_t serial, string pin2, string aid);
 
-    /*
+    /**
      * Supplies ICC PUK2 and new PIN2.
      *
      * @param serial Serial number of request.
@@ -98,7 +98,7 @@
     oneway supplyIccPuk2ForApp(int32_t serial, string puk2, string pin2,
             string aid);
 
-    /*
+    /**
      * Supplies old ICC PIN and new PIN.
      *
      * @param serial Serial number of request.
@@ -112,7 +112,7 @@
     oneway changeIccPinForApp(int32_t serial, string oldPin, string newPin,
             string aid);
 
-    /*
+    /**
      * Supplies old ICC PIN2 and new PIN2.
      *
      * @param serial Serial number of request.
@@ -126,7 +126,7 @@
     oneway changeIccPin2ForApp(int32_t serial, string oldPin2, string newPin2,
             string aid);
 
-    /*
+    /**
      * Requests that network personalization be deactivated
      *
      * @param serial Serial number of request.
@@ -137,7 +137,7 @@
      */
     oneway supplyNetworkDepersonalization(int32_t serial, string netPin);
 
-    /*
+    /**
      * Requests current call list
      *
      * @param serial Serial number of request.
@@ -147,7 +147,7 @@
      */
     oneway getCurrentCalls(int32_t serial);
 
-    /*
+    /**
      * Initiate voice call.
      * This method is never used for supplementary service codes
      *
@@ -159,7 +159,7 @@
      */
     oneway dial(int32_t serial, Dial dialInfo);
 
-    /*
+    /**
      * Get the SIM IMSI
      * Only valid when radio state is "RADIO_STATE_ON"
      *
@@ -171,7 +171,7 @@
      */
     oneway getImsiForApp(int32_t serial, string aid);
 
-    /*
+    /**
      * Hang up a specific line (like AT+CHLD=1x)
      * After this HANGUP request returns, Radio must show the connection is NOT
      * active anymore in next requestGetCurrentCalls query.
@@ -184,7 +184,7 @@
      */
     oneway hangup(int32_t serial, int32_t gsmIndex);
 
-    /*
+    /**
      * Hang up waiting or held (like AT+CHLD=0)
      * After this HANGUP request returns, Radio must show the connection is NOT
      * active anymore in next getCurrentCalls() query.
@@ -196,7 +196,7 @@
      */
     oneway hangupWaitingOrBackground(int32_t serial);
 
-    /*
+    /**
      * Hang up waiting or held (like AT+CHLD=1)
      * After this HANGUP request returns, Radio must show the connection is NOT
      * active anymore in next getCurrentCalls query.
@@ -208,7 +208,7 @@
      */
     oneway hangupForegroundResumeBackground(int32_t serial);
 
-    /*
+    /**
      * Switch waiting or holding call and active call (like AT+CHLD=2)
      * State transitions must be as follows:
      *
@@ -229,7 +229,7 @@
      */
     oneway switchWaitingOrHoldingAndActive(int32_t serial);
 
-    /*
+    /**
      * Conference holding and active (like AT+CHLD=3)
      *
      * @param serial Serial number of request.
@@ -239,7 +239,7 @@
      */
     oneway conference(int32_t serial);
 
-    /*
+    /**
      * Send UDUB (user determined user busy) to ringing or
      * waiting call answer)
      *
@@ -250,7 +250,7 @@
      */
     oneway rejectCall(int32_t serial);
 
-    /*
+    /**
      * Requests the failure cause code for the most recently terminated call.
      *
      * @param serial Serial number of request.
@@ -260,7 +260,7 @@
      */
     oneway getLastCallFailCause(int32_t serial);
 
-    /*
+    /**
      * Requests current signal strength and associated information.
      * Must succeed if radio is on.
      *
@@ -270,7 +270,7 @@
      */
     oneway getSignalStrength(int32_t serial);
 
-    /*
+    /**
      * Request current voice registration state
      *
      * @param serial Serial number of request.
@@ -279,7 +279,7 @@
      */
     oneway getVoiceRegistrationState(int32_t serial);
 
-    /*
+    /**
      * Request current data registration state
      *
      * @param serial Serial number of request.
@@ -288,7 +288,7 @@
      */
     oneway getDataRegistrationState(int32_t serial);
 
-    /*
+    /**
      * Request current operator ONS or EONS
      *
      * @param serial Serial number of request.
@@ -297,7 +297,7 @@
      */
     oneway getOperator(int32_t serial);
 
-    /*
+    /**
      * Toggle radio on and off (for "airplane" mode)
      * If the radio is turned off/on the radio modem subsystem
      * is expected return to an initialized state. For instance,
@@ -311,7 +311,7 @@
      */
     oneway setRadioPower(int32_t serial, bool on);
 
-    /*
+    /**
      * Send a DTMF tone
      *
      * If the implementation is currently playing a tone requested via
@@ -325,7 +325,7 @@
      */
     oneway sendDtmf(int32_t serial, string s);
 
-    /*
+    /**
      * Send an SMS message
      *
      * @param serial Serial number of request.
@@ -339,7 +339,7 @@
      */
     oneway sendSms(int32_t serial, GsmSmsMessage message);
 
-    /*
+    /**
      * Send an SMS message. Identical to sendSms,
      * except that more messages are expected to be sent soon. If possible,
      * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
@@ -355,7 +355,7 @@
      */
     oneway sendSMSExpectMore(int32_t serial, GsmSmsMessage message);
 
-    /*
+    /**
      * Setup a packet data connection. If DataCallResponse.status
      * return DataCallFailCause:NONE it is added to the list of data calls and a
      * unsolDataCallListChanged() is sent. The call remains in the
@@ -391,7 +391,7 @@
             DataProfileInfo dataProfileInfo, bool modemCognitive, bool roamingAllowed,
             bool isRoaming);
 
-    /*
+    /**
      * Request ICC I/O operation.
      * This is similar to the TS 27.007 "restricted SIM" operation
      * where it assumes all of the EF selection must be done by the
@@ -411,7 +411,7 @@
      */
     oneway iccIOForApp(int32_t serial, IccIo iccIo);
 
-    /*
+    /**
      * Send a USSD message.
      *
      * If a USSD session already exists, the message must be sent in the
@@ -434,7 +434,7 @@
      */
     oneway sendUssd(int32_t serial, string ussd);
 
-    /*
+    /**
      * Cancel the current USSD session if one exists.
      *
      * @param serial Serial number of request.
@@ -443,7 +443,7 @@
      */
     oneway cancelPendingUssd(int32_t serial);
 
-    /*
+    /**
      * Gets current CLIR status
      *
      * @param serial Serial number of request.
@@ -452,7 +452,7 @@
      */
     oneway getClir(int32_t serial);
 
-    /*
+    /**
      * Set current CLIR status
      *
      * @param serial Serial number of request.
@@ -462,7 +462,7 @@
      */
     oneway setClir(int32_t serial, int32_t status);
 
-    /*
+    /**
      * Request call forward status.
      *
      * @param serial Serial number of request.
@@ -473,7 +473,7 @@
     oneway getCallForwardStatus(int32_t serial,
             CallForwardInfo callInfo);
 
-    /*
+    /**
      * Configure call forward rule
      *
      * @param serial Serial number of request.
@@ -483,7 +483,7 @@
      */
     oneway setCallForward(int32_t serial, CallForwardInfo callInfo);
 
-    /*
+    /**
      * Query current call waiting state
      *
      * @param serial Serial number of request.
@@ -493,7 +493,7 @@
      */
     oneway getCallWaiting(int32_t serial, int32_t serviceClass);
 
-    /*
+    /**
      * Configure current call waiting state
      *
      * @param serial Serial number of request.
@@ -505,7 +505,7 @@
     oneway setCallWaiting(int32_t serial, bool enable,
             int32_t serviceClass);
 
-    /*
+    /**
      * Acknowledge successful or failed receipt of SMS previously indicated
      * via unsolResponseNewSms
      *
@@ -521,7 +521,7 @@
     oneway acknowledgeLastIncomingGsmSms(int32_t serial, bool success,
             SmsAcknowledgeFailCause cause);
 
-    /*
+    /**
      * Answer incoming call
      * Must not be called for WAITING calls.
      * switchWaitingOrHoldingAndActive() must be used in this case
@@ -533,7 +533,7 @@
      */
     oneway acceptCall(int32_t serial);
 
-    /*
+    /**
      * Deactivate packet data connection and remove from the
      * data call list if RadioError:NONE is returned. Any other return
      * values must also try to remove the call from the list. An
@@ -551,7 +551,7 @@
     oneway deactivateDataCall(int32_t serial, int32_t cid,
             bool reasonRadioShutDown);
 
-    /*
+    /**
      * Query the status of a facility lock state
      *
      * @param serial Serial number of request.
@@ -567,7 +567,7 @@
     oneway getFacilityLockForApp(int32_t serial, string facility,
             string password, int32_t serviceClass, string appId);
 
-    /*
+    /**
      * Enable/disable one facility lock
      *
      * @param serial Serial number of request.
@@ -585,7 +585,7 @@
     oneway setFacilityLockForApp(int32_t serial, string facility, bool lockState,
             string password, int32_t serviceClass, string appId);
 
-    /*
+    /**
      * Change call barring facility password
      *
      * @param serial Serial number of request.
@@ -598,7 +598,7 @@
     oneway setBarringPassword(int32_t serial, string facility,
             string oldPassword, string newPassword);
 
-    /*
+    /**
      * Query current network selection mode
      *
      * @param serial Serial number of request.
@@ -607,7 +607,7 @@
      */
     oneway getNetworkSelectionMode(int32_t serial);
 
-    /*
+    /**
      * Specify that the network must be selected automatically.
      * This request must not respond until the new operator is selected and registered.
      *
@@ -617,7 +617,7 @@
      */
     oneway setNetworkSelectionModeAutomatic(int32_t serial);
 
-    /*
+    /**
      * Manually select a specified network.
      * This request must not respond until the new operator is selected and registered.
      *
@@ -628,7 +628,7 @@
      */
     oneway setNetworkSelectionModeManual(int32_t serial, string operatorNumeric);
 
-    /*
+    /**
      * Scans for available networks
      *
      * @param serial Serial number of request.
@@ -637,7 +637,7 @@
      */
     oneway getAvailableNetworks(int32_t serial);
 
-    /*
+    /**
      * Start playing a DTMF tone. Continue playing DTMF tone until
      * stopDtmf is received.
      * If a startDtmf() is received while a tone is currently playing,
@@ -650,7 +650,7 @@
      */
     oneway startDtmf(int32_t serial, string s);
 
-    /*
+    /**
      * Stop playing a currently playing DTMF tone.
      *
      * @param serial Serial number of request.
@@ -659,7 +659,7 @@
      */
     oneway stopDtmf(int32_t serial);
 
-    /*
+    /**
      * Return string value indicating baseband version, eg response from AT+CGMR
      *
      * @param serial Serial number of request.
@@ -668,7 +668,7 @@
      */
     oneway getBasebandVersion(int32_t serial);
 
-    /*
+    /**
      * Separate a party from a multiparty call placing the multiparty call
      * (less the specified party) on hold and leaving the specified party
      * as the only other member of the current (active) call
@@ -686,7 +686,7 @@
      */
     oneway separateConnection(int32_t serial, int32_t gsmIndex);
 
-    /*
+    /**
      * Turn on or off uplink (microphone) mute.
      * Must only be sent while voice call is active.
      * Must always be reset to "disable mute" when a new voice call is initiated
@@ -698,7 +698,7 @@
      */
     oneway setMute(int32_t serial, bool enable);
 
-    /*
+    /**
      * Queries the current state of the uplink mute setting
      *
      * @param serial Serial number of request.
@@ -707,7 +707,7 @@
      */
     oneway getMute(int32_t serial);
 
-    /*
+    /**
      * Queries the status of the CLIP supplementary service
      * (for MMI code "*#30#")
      *
@@ -717,7 +717,7 @@
      */
     oneway getClip(int32_t serial);
 
-    /*
+    /**
      * Returns the data call list. An entry is added when a
      * setupDataCall() is issued and removed on a
      * deactivateDataCall(). The list is emptied when
@@ -729,7 +729,7 @@
      */
     oneway getDataCallList(int32_t serial);
 
-    /*
+    /**
      * Enables/disables supplementary service related notifications from the network.
      * Notifications are reported via unsolSuppSvcNotification().
      *
@@ -740,7 +740,7 @@
      */
     oneway setSuppServiceNotifications(int32_t serial, bool enable);
 
-    /*
+    /**
      * Stores a SMS message to SIM memory.
      *
      * @param serial Serial number of request.
@@ -750,7 +750,7 @@
      */
     oneway writeSmsToSim(int32_t serial, SmsWriteArgs smsWriteArgs);
 
-    /*
+    /**
      * Deletes a SMS message from SIM memory.
      *
      * @param serial Serial number of request.
@@ -760,7 +760,7 @@
      */
     oneway deleteSmsOnSim(int32_t serial, int32_t index);
 
-    /*
+    /**
      * Assign a specified band for RF configuration.
      *
      * @param serial Serial number of request.
@@ -770,7 +770,7 @@
      */
     oneway setBandMode(int32_t serial, RadioBandMode mode);
 
-    /*
+    /**
      * Get the list of band modes supported by RF.
      *
      * @param serial Serial number of request.
@@ -779,7 +779,7 @@
      */
     oneway getAvailableBandModes(int32_t serial);
 
-    /*
+    /**
      * Requests to send a SAT/USAT envelope command to SIM.
      * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
      *
@@ -790,7 +790,7 @@
      */
     oneway sendEnvelope(int32_t serial, string command);
 
-    /*
+    /**
      * Requests to send a terminal response to SIM for a received proactive command
      *
      * @param serial Serial number of request.
@@ -801,7 +801,7 @@
      */
     oneway sendTerminalResponseToSim(int32_t serial, string commandResponse);
 
-    /*
+    /**
      * When STK application gets stkCallSetup(), the call actually has
      * been initialized by mobile device already. (We could see the call has been in the 'call
      * list') So, STK application needs to accept/reject the call according to user
@@ -815,7 +815,7 @@
     oneway handleStkCallSetupRequestFromSim(int32_t serial,
             bool accept);
 
-    /*
+    /**
      * Connects the two calls and disconnects the subscriber from both calls.
      *
      * @param serial Serial number of request.
@@ -824,7 +824,7 @@
      */
     oneway explicitCallTransfer(int32_t serial);
 
-    /*
+    /**
      * Requests to set the preferred network type for searching and registering
      * (CS/PS domain, RAT, and operation mode)
      *
@@ -836,7 +836,7 @@
     oneway setPreferredNetworkType(int32_t serial,
             PreferredNetworkType nwType);
 
-    /*
+    /**
      * Query the preferred network type (CS/PS domain, RAT, and operation mode)
      * for searching and registering
      *
@@ -846,7 +846,7 @@
      */
     oneway getPreferredNetworkType(int32_t serial);
 
-    /*
+    /**
      * Request neighboring cell id in GSM network
      *
      * @param serial Serial number of request.
@@ -855,7 +855,7 @@
      */
     oneway getNeighboringCids(int32_t serial);
 
-    /*
+    /**
      * Enables/disables network state change notifications due to changes in
      * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
      * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
@@ -869,7 +869,7 @@
      */
     oneway setLocationUpdates(int32_t serial, bool enable);
 
-    /*
+    /**
      * Request to set the location where the CDMA subscription shall
      * be retrieved
      *
@@ -881,7 +881,7 @@
     oneway setCdmaSubscriptionSource(int32_t serial,
             CdmaSubscriptionSource cdmaSub);
 
-    /*
+    /**
      * Request to set the roaming preferences in CDMA
      *
      * @param serial Serial number of request.
@@ -892,7 +892,7 @@
     oneway setCdmaRoamingPreference(int32_t serial,
             CdmaRoamingType type);
 
-    /*
+    /**
      * Request the actual setting of the roaming preferences in CDMA in the modem
      *
      * @param serial Serial number of request.
@@ -901,7 +901,7 @@
      */
     oneway getCdmaRoamingPreference(int32_t serial);
 
-    /*
+    /**
      * Request to set the TTY mode
      *
      * @param serial Serial number of request.
@@ -911,7 +911,7 @@
      */
     oneway setTTYMode(int32_t serial, TtyMode mode);
 
-    /*
+    /**
      * Request the setting of TTY mode
      *
      * @param serial Serial number of request.
@@ -920,7 +920,7 @@
      */
     oneway getTTYMode(int32_t serial);
 
-    /*
+    /**
      * Request to set the preferred voice privacy mode used in voice scrambling.
      *
      * @param serial Serial number of request.
@@ -931,7 +931,7 @@
      */
     oneway setPreferredVoicePrivacy(int32_t serial, bool enable);
 
-    /*
+    /**
      * Request the setting of preferred voice privacy mode.
      *
      * @param serial Serial number of request.
@@ -940,7 +940,7 @@
      */
     oneway getPreferredVoicePrivacy(int32_t serial);
 
-    /*
+    /**
      * Send FLASH command
      *
      * @param serial Serial number of request.
@@ -950,7 +950,7 @@
      */
     oneway sendCDMAFeatureCode(int32_t serial, string featureCode);
 
-    /*
+    /**
      * Send DTMF string
      *
      * @param serial Serial number of request.
@@ -962,7 +962,7 @@
      */
     oneway sendBurstDtmf(int32_t serial, string dtmf, int32_t on, int32_t off);
 
-    /*
+    /**
      * Send a CDMA SMS message
      *
      * @param serial Serial number of request.
@@ -972,7 +972,7 @@
      */
     oneway sendCdmaSms(int32_t serial, CdmaSmsMessage sms);
 
-    /*
+    /**
      * Acknowledge the success or failure in the receipt of SMS
      * previously indicated via responseCdmaNewSms()
      *
@@ -983,7 +983,7 @@
      */
     oneway acknowledgeLastIncomingCdmaSms(int32_t serial, CdmaSmsAck smsAck);
 
-    /*
+    /**
      * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
      *
      * @param serial Serial number of request.
@@ -992,7 +992,7 @@
      */
     oneway getGsmBroadcastConfig(int32_t serial);
 
-    /*
+    /**
      * Set GSM/WCDMA Cell Broadcast SMS config
      *
      * @param serial Serial number of request.
@@ -1002,7 +1002,7 @@
      */
     oneway setGsmBroadcastConfig(int32_t serial, vec<GsmBroadcastSmsConfigInfo> configInfo);
 
-    /*
+    /**
      * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
      *
      * @param serial Serial number of request.
@@ -1013,7 +1013,7 @@
      */
     oneway setGsmBroadcastActivation(int32_t serial, bool activate);
 
-    /*
+    /**
      * Request the setting of CDMA Broadcast SMS config
      *
      * @param serial Serial number of request.
@@ -1022,7 +1022,7 @@
      */
     oneway getCdmaBroadcastConfig(int32_t serial);
 
-    /*
+    /**
      * Set CDMA Broadcast SMS config
      *
      * @param serial Serial number of request.
@@ -1032,7 +1032,7 @@
      */
     oneway setCdmaBroadcastConfig(int32_t serial, vec<CdmaBroadcastSmsConfigInfo> configInfo);
 
-    /*
+    /**
      * Enable or disable the reception of CDMA Cell Broadcast SMS
      *
      * @param serial Serial number of request.
@@ -1043,7 +1043,7 @@
      */
     oneway setCdmaBroadcastActivation(int32_t serial, bool activate);
 
-    /*
+    /**
      * Request the device MDN / H_SID / H_NID.
      * The request is only allowed when CDMA subscription is available. When CDMA
      * subscription is changed, application layer must re-issue the request to
@@ -1055,7 +1055,7 @@
      */
     oneway getCDMASubscription(int32_t serial);
 
-    /*
+    /**
      * Stores a CDMA SMS message to RUIM memory.
      *
      * @param serial Serial number of request.
@@ -1065,7 +1065,7 @@
      */
     oneway writeSmsToRuim(int32_t serial, CdmaSmsWriteArgs cdmaSms);
 
-    /*
+    /**
      * Deletes a CDMA SMS message from RUIM memory.
      *
      * @param serial Serial number of request.
@@ -1075,7 +1075,7 @@
      */
     oneway deleteSmsOnRuim(int32_t serial, int32_t index);
 
-    /*
+    /**
      * Request the device ESN / MEID / IMEI / IMEISV.
      * The request is always allowed and contains GSM and CDMA device identity.
      * When CDMA subscription is changed the ESN/MEID changes. The application
@@ -1087,7 +1087,7 @@
      */
     oneway getDeviceIdentity(int32_t serial);
 
-    /*
+    /**
      * Request the radio's system selection module to exit emergency
      * callback mode. Radio must not respond with SUCCESS until the modem has
      * completely exited from Emergency Callback Mode.
@@ -1098,7 +1098,7 @@
      */
     oneway exitEmergencyCallbackMode(int32_t serial);
 
-    /*
+    /**
      * Get the default Short Message Service Center address on the device.
      *
      * @param serial Serial number of request.
@@ -1107,7 +1107,7 @@
      */
     oneway getSmscAddress(int32_t serial);
 
-    /*
+    /**
      * Set the default Short Message Service Center address on the device.
      *
      * @param serial Serial number of request.
@@ -1117,7 +1117,7 @@
      */
     oneway setSmscAddress(int32_t serial, string smsc);
 
-    /*
+    /**
      * Indicates whether there is storage available for new SMS messages.
      *
      * @param serial Serial number of request.
@@ -1128,7 +1128,7 @@
      */
     oneway reportSmsMemoryStatus(int32_t serial, bool available);
 
-    /*
+    /**
      * Indicates that the StkService is running and is
      * ready to receive unsolicited stkXXXXX commands.
      *
@@ -1138,7 +1138,7 @@
      */
     oneway reportStkServiceIsRunning(int32_t serial);
 
-    /*
+    /**
      * Request to query the location where the CDMA subscription shall be retrieved.
      *
      * @param serial Serial number of request.
@@ -1147,7 +1147,7 @@
      */
     oneway getCdmaSubscriptionSource(int32_t serial);
 
-    /*
+    /**
      * Request the ISIM application on the UICC to perform AKA
      * challenge/response algorithm for IMS authentication
      *
@@ -1158,7 +1158,7 @@
      */
     oneway requestIsimAuthentication(int32_t serial, string challenge);
 
-    /*
+    /**
      * Acknowledge successful or failed receipt of SMS previously indicated
      * via unsol responseNewSms(), including acknowledgement TPDU to send
      * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
@@ -1172,7 +1172,7 @@
      */
     oneway acknowledgeIncomingGsmSmsWithPdu(int32_t serial, bool success, string ackPdu);
 
-    /*
+    /**
      * Requests to send a SAT/USAT envelope command to SIM.
      * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
      *
@@ -1191,7 +1191,7 @@
      */
     oneway sendEnvelopeWithStatus(int32_t serial, string contents);
 
-    /*
+    /**
      * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
      * when radio state is not RADIO_STATE_UNAVAILABLE
      *
@@ -1201,7 +1201,7 @@
      */
     oneway getVoiceRadioTechnology(int32_t serial);
 
-    /*
+    /**
      * Request all of the current cell information known to the radio. The radio
      * must return list of all current cells, including the neighboring cells. If for a particular
      * cell information isn't known then the appropriate unknown value will be returned.
@@ -1213,7 +1213,7 @@
      */
     oneway getCellInfoList(int32_t serial);
 
-    /*
+    /**
      * Sets the minimum time between when unsolicited cellInfoList() must be invoked.
      * A value of 0, means invoke cellInfoList() when any of the reported
      * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
@@ -1226,7 +1226,7 @@
      */
     oneway setCellInfoListRate(int32_t serial, int32_t rate);
 
-    /*
+    /**
      * Set an apn to initial attach network
      *
      * @param serial Serial number of request.
@@ -1243,7 +1243,7 @@
     oneway setInitialAttachApn(int32_t serial, DataProfileInfo dataProfileInfo,
             bool modemCognitive, bool isRoaming);
 
-    /*
+    /**
      * Request current IMS registration state
      *
      * @param serial Serial number of request.
@@ -1252,7 +1252,7 @@
      */
     oneway getImsRegistrationState(int32_t serial);
 
-    /*
+    /**
      * Send a SMS message over IMS.
      * Based on the return error, caller decides to resend if sending sms
      * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
@@ -1265,7 +1265,7 @@
      */
     oneway sendImsSms(int32_t serial, ImsSmsMessage message);
 
-    /*
+    /**
      * Request APDU exchange on the basic channel. This command reflects TS 27.007
      * "generic SIM access" operation (+CSIM). The modem must ensure proper function
      * of GSM/CDMA, and filter commands appropriately. It must filter
@@ -1279,7 +1279,7 @@
      */
     oneway iccTransmitApduBasicChannel(int32_t serial, SimApdu message);
 
-    /*
+    /**
      * Open a new logical channel and select the given application. This command
      * reflects TS 27.007 "open logical channel" operation (+CCHO).
      *
@@ -1290,7 +1290,7 @@
      */
     oneway iccOpenLogicalChannel(int32_t serial, string aid);
 
-    /*
+    /**
      * Close a previously opened logical channel. This command reflects TS 27.007
      * "close logical channel" operation (+CCHC).
      *
@@ -1301,7 +1301,7 @@
      */
     oneway iccCloseLogicalChannel(int32_t serial, int32_t channelId);
 
-    /*
+    /**
      * Exchange APDUs with a UICC over a previously opened logical channel. This
      * command reflects TS 27.007 "generic logical channel access" operation
      * (+CGLA). The modem must filter channel management and SELECT by DF name
@@ -1314,7 +1314,7 @@
      */
     oneway iccTransmitApduLogicalChannel(int32_t serial, SimApdu message);
 
-    /*
+    /**
      * Read one of the radio NV items.
      * This is used for device configuration by some CDMA operators.
      *
@@ -1325,7 +1325,7 @@
      */
     oneway nvReadItem(int32_t serial, NvItem itemId);
 
-    /*
+    /**
      * Write one of the radio NV items.
      * This is used for device configuration by some CDMA operators.
      *
@@ -1336,7 +1336,7 @@
      */
     oneway nvWriteItem(int32_t serial, NvWriteItem item);
 
-    /*
+    /**
      * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
      * This is used for device configuration by some CDMA operators.
      *
@@ -1347,7 +1347,7 @@
      */
     oneway nvWriteCdmaPrl(int32_t serial, vec<uint8_t> prl);
 
-    /*
+    /**
      * Reset the radio NV configuration to the factory state.
      * This is used for device configuration by some CDMA operators.
      *
@@ -1358,7 +1358,7 @@
      */
     oneway nvResetConfig(int32_t serial, ResetNvType resetType);
 
-    /*
+    /**
      * Selection/de-selection of a subscription from a SIM card
      *
      * @param serial Serial number of request.
@@ -1368,7 +1368,7 @@
      */
     oneway setUiccSubscription(int32_t serial, SelectUiccSub uiccSub);
 
-    /*
+    /**
      * Tells the modem whether data calls are allowed or not
      *
      * @param serial Serial number of request.
@@ -1378,7 +1378,7 @@
      */
     oneway setDataAllowed(int32_t serial, bool allow);
 
-    /*
+    /**
      * Request all of the current hardware (modem and sim) associated with Radio.
      *
      * @param serial Serial number of request.
@@ -1387,7 +1387,7 @@
      */
     oneway getHardwareConfig(int32_t serial);
 
-    /*
+    /**
      * Returns the response of SIM Authentication through Radio challenge request.
      *
      * @param serial Serial number of request.
@@ -1401,7 +1401,7 @@
     oneway requestIccSimAuthentication(int32_t serial, int32_t authContext, string authData,
             string aid);
 
-    /*
+    /**
      * Set data profile in modem.
      * Modem must erase existed profiles from framework, and apply new profiles
      *
@@ -1416,7 +1416,7 @@
      */
     oneway setDataProfile(int32_t serial, vec<DataProfileInfo> profiles, bool isRoaming);
 
-    /*
+    /**
      * Device is shutting down. All further commands are ignored
      * and RADIO_NOT_AVAILABLE must be returned.
      *
@@ -1426,7 +1426,7 @@
      */
     oneway requestShutdown(int32_t serial);
 
-    /*
+    /**
      * Used to get phone radio capability.
      *
      * @param serial Serial number of request.
@@ -1435,7 +1435,7 @@
      */
     oneway getRadioCapability(int32_t serial);
 
-    /*
+    /**
      * Used to set the phones radio capability. Be VERY careful
      * using this request as it may cause some vendor modems to reset. Because
      * of the possible modem reset any radio commands after this one may not be
@@ -1448,7 +1448,7 @@
      */
     oneway setRadioCapability(int32_t serial, RadioCapability rc);
 
-    /*
+    /**
      * Start Link Capacity Estimate (LCE) service if supported by the radio.
      *
      * @param serial Serial number of request.
@@ -1459,7 +1459,7 @@
      */
     oneway startLceService(int32_t serial, int32_t reportInterval, bool pullMode);
 
-    /*
+    /**
      * Stop Link Capacity Estimate (LCE) service, the STOP operation must be
      * idempotent for the radio modem.
      *
@@ -1469,7 +1469,7 @@
      */
     oneway stopLceService(int32_t serial);
 
-    /*
+    /**
      * Pull LCE service for capacity information.
      *
      * @param serial Serial number of request.
@@ -1478,7 +1478,7 @@
      */
     oneway pullLceData(int32_t serial);
 
-    /*
+    /**
      * Get modem activity information for power consumption estimation.
      * Request clear-on-read statistics information that is used for
      * estimating the per-millisecond power consumption of the cellular
@@ -1490,7 +1490,7 @@
      */
     oneway getModemActivityInfo(int32_t serial);
 
-    /*
+    /**
      * Set carrier restrictions. Expected modem behavior:
      *  If never receives this command
      *  - Must allow all carriers
@@ -1514,7 +1514,7 @@
      */
     oneway setAllowedCarriers(int32_t serial, bool allAllowed, CarrierRestrictions carriers);
 
-    /*
+    /**
      * Get carrier restrictions.
      *
      * @param serial Serial number of request.
@@ -1523,7 +1523,7 @@
      */
     oneway getAllowedCarriers(int32_t serial);
 
-    /*
+    /**
      * Send the updated device state.
      * This is providing the device state information for the modem to perform power saving
      * strategies.
@@ -1536,7 +1536,7 @@
      */
     oneway sendDeviceState(int32_t serial, DeviceStateType deviceStateType, bool state);
 
-    /*
+    /**
      * Set the indication filter.
      * This is used to prevent unnecessary application processor wake up for power saving purposes
      * by suppressing the indications in certain scenarios.
@@ -1549,7 +1549,7 @@
      */
     oneway setIndicationFilter(int32_t serial, bitfield<IndicationFilter> indicationFilter);
 
-    /*
+    /**
      * Set SIM card power state.
      * Request is equivalent to inserting or removing the card.
      *
@@ -1563,7 +1563,7 @@
      */
     oneway setSimCardPower(int32_t serial, bool powerUp);
 
-    /*
+    /**
      * When response type received from a radio indication or radio response is
      * RadioIndicationType:UNSOLICITED_ACK_EXP or RadioResponseType:SOLICITED_ACK_EXP respectively,
      * acknowledge the receipt of those messages by sending responseAcknowledgement().
diff --git a/radio/1.0/IRadioIndication.hal b/radio/1.0/IRadioIndication.hal
index 0b95821..eb07226 100644
--- a/radio/1.0/IRadioIndication.hal
+++ b/radio/1.0/IRadioIndication.hal
@@ -16,11 +16,11 @@
 
 package android.hardware.radio@1.0;
 
-/*
+/**
  * Interface declaring unsolicited radio indications.
  */
 interface IRadioIndication {
-    /*
+    /**
      * Indicates when radio state changes.
      *
      * @param type Type of radio indication
@@ -28,7 +28,7 @@
      */
     oneway radioStateChanged(RadioIndicationType type, RadioState radioState);
 
-    /*
+    /**
      * Indicates when call state has changed.
      * Callee must invoke IRadio.getCurrentCalls()
      * Must be invoked on, for example,
@@ -41,7 +41,7 @@
      */
     oneway callStateChanged(RadioIndicationType type);
 
-    /*
+    /**
      * Indicates when voice or data network state changed
      * Callee must invoke IRadio.getVoiceRegistrationState(), IRadio.getDataRegistrationState(),
      * and IRadio.getOperator()
@@ -50,7 +50,7 @@
      */
     oneway networkStateChanged(RadioIndicationType type);
 
-    /*
+    /**
      * Indicates when new SMS is received.
      * Callee must subsequently confirm the receipt of the SMS with a
      * acknowledgeLastIncomingGsmSms()
@@ -64,7 +64,7 @@
      */
     oneway newSms(RadioIndicationType type, vec<uint8_t> pdu);
 
-    /*
+    /**
      * Indicates when new SMS Status Report is received.
      * Callee must subsequently confirm the receipt of the SMS with a
      * acknowledgeLastIncomingGsmSms()
@@ -78,7 +78,7 @@
      */
     oneway newSmsStatusReport(RadioIndicationType type, vec<uint8_t> pdu);
 
-    /*
+    /**
      * Indicates when new SMS has been stored on SIM card
      *
      * @param type Type of radio indication
@@ -86,7 +86,7 @@
      */
     oneway newSmsOnSim(RadioIndicationType type, int32_t recordNumber);
 
-    /*
+    /**
      * Indicates when a new USSD message is received.
      * The USSD session is assumed to persist if the type code is REQUEST, otherwise
      * the current session (if any) is assumed to have terminated.
@@ -97,7 +97,7 @@
      */
     oneway onUssd(RadioIndicationType type, UssdModeType modeType, string msg);
 
-    /*
+    /**
      * Indicates when radio has received a NITZ time message.
      *
      * @param type Type of radio indication
@@ -106,7 +106,7 @@
      */
     oneway nitzTimeReceived(RadioIndicationType type, string nitzTime, uint64_t receivedTime);
 
-    /*
+    /**
      * Indicates current signal strength of the radio.
      *
      * @param type Type of radio indication
@@ -114,7 +114,7 @@
      */
     oneway currentSignalStrength(RadioIndicationType type, SignalStrength signalStrength);
 
-    /*
+    /**
      * Indicates data call contexts have changed.
      *
      * @param type Type of radio indication
@@ -127,7 +127,7 @@
      */
     oneway dataCallListChanged(RadioIndicationType type, vec<SetupDataCallResult> dcList);
 
-    /*
+    /**
      * Reports supplementary service related notification from the network.
      *
      * @param type Type of radio indication
@@ -135,14 +135,14 @@
      */
     oneway suppSvcNotify(RadioIndicationType type, SuppSvcNotification suppSvc);
 
-    /*
+    /**
      * Indicates when STK session is terminated by SIM.
      *
      * @param type Type of radio indication
      */
     oneway stkSessionEnd(RadioIndicationType type);
 
-    /*
+    /**
      * Indicates when SIM issue a STK proactive command to applications
      *
      * @param type Type of radio indication
@@ -151,7 +151,7 @@
      */
     oneway stkProactiveCommand(RadioIndicationType type, string cmd);
 
-    /*
+    /**
      * Indicates when SIM notifies applcations some event happens.
      *
      * @param type Type of radio indication
@@ -162,7 +162,7 @@
      */
     oneway stkEventNotify(RadioIndicationType type, string cmd);
 
-    /*
+    /**
      * Indicates when SIM wants application to setup a voice call.
      *
      * @param type Type of radio indication
@@ -170,7 +170,7 @@
      */
     oneway stkCallSetup(RadioIndicationType type, int64_t timeout);
 
-    /*
+    /**
      * Indicates that SMS storage on the SIM is full. Sent when the network
      * attempts to deliver a new SMS message. Messages cannot be saved on the
      * SIM until space is freed. In particular, incoming Class 2 messages must not
@@ -180,7 +180,7 @@
      */
     oneway simSmsStorageFull(RadioIndicationType type);
 
-    /*
+    /**
      * Indicates that file(s) on the SIM have been updated, or the SIM
      * has been reinitialized.
      * Note: If the SIM state changes as a result of the SIM refresh (eg,
@@ -192,7 +192,7 @@
      */
     oneway simRefresh(RadioIndicationType type, SimRefreshResult refreshResult);
 
-    /*
+    /**
      * Ring indication for an incoming call (eg, RING or CRING event).
      * There must be at least one callRing() at the beginning
      * of a call and sending multiple is optional. If the system property
@@ -210,7 +210,7 @@
      */
     oneway callRing(RadioIndicationType type, bool isGsm, CdmaSignalInfoRecord record);
 
-    /*
+    /**
      * Indicates that SIM state changes.
      * Callee must invoke getIccCardStatus()
      *
@@ -218,7 +218,7 @@
      */
     oneway simStatusChanged(RadioIndicationType type);
 
-    /*
+    /**
      * Indicates when new CDMA SMS is received
      * Callee must subsequently confirm the receipt of the SMS with
      * acknowledgeLastIncomingCdmaSms()
@@ -230,7 +230,7 @@
      */
     oneway cdmaNewSms(RadioIndicationType type, CdmaSmsMessage msg);
 
-    /*
+    /**
      * Indicates when new Broadcast SMS is received
      *
      * @param type Type of radio indication
@@ -243,7 +243,7 @@
      */
     oneway newBroadcastSms(RadioIndicationType type, vec<uint8_t> data);
 
-    /*
+    /**
      * Indicates that SMS storage on the RUIM is full. Messages
      * cannot be saved on the RUIM until space is freed.
      *
@@ -251,7 +251,7 @@
      */
     oneway cdmaRuimSmsStorageFull(RadioIndicationType type);
 
-    /*
+    /**
      * Indicates a restricted state change (eg, for Domain Specific Access Control).
      * Radio must send this msg after radio off/on cycle no matter it is changed or not.
      *
@@ -260,7 +260,7 @@
      */
     oneway restrictedStateChanged(RadioIndicationType type, PhoneRestrictedState state);
 
-    /*
+    /**
      * Indicates that the radio system selection module has
      * autonomously entered emergency callback mode.
      *
@@ -268,7 +268,7 @@
      */
     oneway enterEmergencyCallbackMode(RadioIndicationType type);
 
-    /*
+    /**
      * Indicates when CDMA radio receives a call waiting indication.
      *
      * @param type Type of radio indication
@@ -276,7 +276,7 @@
      */
     oneway cdmaCallWaiting(RadioIndicationType type, CdmaCallWaiting callWaitingRecord);
 
-    /*
+    /**
      * Indicates when CDMA radio receives an update of the progress of an OTASP/OTAPA call.
      *
      * @param type Type of radio indication
@@ -284,7 +284,7 @@
      */
     oneway cdmaOtaProvisionStatus(RadioIndicationType type, CdmaOtaProvisionStatus status);
 
-   /*
+   /**
     * Indicates when CDMA radio receives one or more info recs.
     *
     * @param type Type of radio indication
@@ -292,7 +292,7 @@
     */
    oneway cdmaInfoRec(RadioIndicationType type, CdmaInformationRecords records);
 
-   /*
+   /**
     * Indicates that nework doesn't have in-band information, need to
     * play out-band tone.
     *
@@ -301,14 +301,14 @@
     */
    oneway indicateRingbackTone(RadioIndicationType type, bool start);
 
-   /*
+   /**
     * Indicates that framework/application must reset the uplink mute state.
     *
     * @param type Type of radio indication
     */
    oneway resendIncallMute(RadioIndicationType type);
 
-   /*
+   /**
     * Indicates when CDMA subscription source changed.
     *
     * @param type Type of radio indication
@@ -317,7 +317,7 @@
    oneway cdmaSubscriptionSourceChanged(RadioIndicationType type,
            CdmaSubscriptionSource cdmaSource);
 
-   /*
+   /**
     * Indicates when PRL (preferred roaming list) changes.
     *
     * @param type Type of radio indication
@@ -325,7 +325,7 @@
     */
    oneway cdmaPrlChanged(RadioIndicationType type, int32_t version);
 
-   /*
+   /**
     * Indicates when Emergency Callback Mode Ends.
     * Indicates that the radio system selection module has
     * proactively exited emergency callback mode.
@@ -334,14 +334,14 @@
     */
    oneway exitEmergencyCallbackMode(RadioIndicationType type);
 
-   /*
+   /**
     * Indicates the ril connects and returns the version
     *
     * @param type Type of radio indication
     */
    oneway rilConnected(RadioIndicationType type);
 
-   /*
+   /**
     * Indicates that voice technology has changed. Responds with new rat.
     *
     * @param type Type of radio indication
@@ -349,7 +349,7 @@
     */
    oneway voiceRadioTechChanged(RadioIndicationType type, RadioTechnology rat);
 
-   /*
+   /**
     * Same information as returned by getCellInfoList().
     *
     * @param type Type of radio indication
@@ -357,7 +357,7 @@
     */
    oneway cellInfoList(RadioIndicationType type, vec<CellInfo> records);
 
-   /*
+   /**
     * Indicates when IMS registration state has changed.
     * To get IMS registration state and IMS SMS format, callee needs to invoke
     * getImsRegistrationState()
@@ -366,7 +366,7 @@
     */
    oneway imsNetworkStateChanged(RadioIndicationType type);
 
-   /*
+   /**
     * Indicated when there is a change in subscription status.
     * This event must be sent in the following scenarios
     *  - subscription readiness at modem, which was selected by telephony layer
@@ -378,7 +378,7 @@
     */
    oneway subscriptionStatusChanged(RadioIndicationType type, bool activate);
 
-   /*
+   /**
     * Indicates when Single Radio Voice Call Continuity (SRVCC)
     * progress state has changed
     *
@@ -387,7 +387,7 @@
     */
    oneway srvccStateNotify(RadioIndicationType type, SrvccState state);
 
-   /*
+   /**
     * Indicates when the hardware configuration associated with the RILd changes.
     *
     * @param type Type of radio indication
@@ -395,7 +395,7 @@
     */
    oneway hardwareConfigChanged(RadioIndicationType type, vec<HardwareConfig> configs);
 
-   /*
+   /**
     * Sent when setRadioCapability() completes.
     * Returns the phone radio capability exactly as
     * getRadioCapability() and must be the
@@ -406,7 +406,7 @@
     */
    oneway radioCapabilityIndication(RadioIndicationType type, RadioCapability rc);
 
-   /*
+   /**
     * Indicates when Supplementary service(SS) response is received when DIAL/USSD/SS is changed to
     * SS by call control.
     *
@@ -414,7 +414,7 @@
     */
    oneway onSupplementaryServiceIndication(RadioIndicationType type, StkCcUnsolSsResult ss);
 
-   /*
+   /**
     * Indicates when there is an ALPHA from UICC during Call Control.
     *
     * @param type Type of radio indication
@@ -422,7 +422,7 @@
     */
    oneway stkCallControlAlphaNotify(RadioIndicationType type, string alpha);
 
-   /*
+   /**
     * Indicates when there is an incoming Link Capacity Estimate (LCE) info report.
     *
     * @param type Type of radio indication
@@ -430,7 +430,7 @@
     */
    oneway lceData(RadioIndicationType type, LceDataInfo lce);
 
-   /*
+   /**
     * Indicates when there is new Carrier PCO data received for a data call. Ideally
     * only new data must be forwarded, though this is not required. Multiple
     * boxes of carrier PCO data for a given call must result in a series of
@@ -441,7 +441,7 @@
     */
    oneway pcoData(RadioIndicationType type, PcoDataInfo pco);
 
-   /*
+   /**
     * Indicates when there is a modem reset.
     *
     * When modem restarts, one of the following radio state transitions must happen
diff --git a/radio/1.0/IRadioResponse.hal b/radio/1.0/IRadioResponse.hal
index 42e53a7..2ba210b 100644
--- a/radio/1.0/IRadioResponse.hal
+++ b/radio/1.0/IRadioResponse.hal
@@ -16,13 +16,13 @@
 
 package android.hardware.radio@1.0;
 
-/*
+/**
  * Interface declaring response functions to solicited radio requests.
  * Response functions defined in this interface are as per following convention:
  * <xyz>Response is response to IRadio.<xyz>
  */
 interface IRadioResponse {
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param cardStatus ICC card status as defined by CardStatus in types.hal
      *
@@ -31,7 +31,7 @@
      */
     oneway getIccCardStatusResponse(RadioResponseInfo info, CardStatus cardStatus);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param remainingRetries Number of retries remaining, must be equal to -1 if unknown.
      *
@@ -42,7 +42,7 @@
      */
     oneway supplyIccPinForAppResponse(RadioResponseInfo info, int32_t remainingRetries);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param remainingRetries Number of retries remaining, must be equal to -1 if unknown.
      *
@@ -53,7 +53,7 @@
      */
     oneway supplyIccPukForAppResponse(RadioResponseInfo info, int32_t remainingRetries);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param remainingRetries Number of retries remaining, must be equal to -1 if unknown.
      *
@@ -64,7 +64,7 @@
      */
     oneway supplyIccPin2ForAppResponse(RadioResponseInfo info, int32_t remainingRetries);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param remainingRetries Number of retries remaining, must be equal to -1 if unknown.
      * Valid errors returned:
@@ -74,7 +74,7 @@
      */
     oneway supplyIccPuk2ForAppResponse(RadioResponseInfo info, int32_t remainingRetries);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param remainingRetries Number of retries remaining, must be equal to -1 if unknown.
      *
@@ -85,7 +85,7 @@
      */
     oneway changeIccPinForAppResponse(RadioResponseInfo info, int32_t remainingRetries);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param remainingRetries Number of retries remaining, must be equal to -1 if unknown.
      *
@@ -96,7 +96,7 @@
      */
     oneway changeIccPin2ForAppResponse(RadioResponseInfo info, int32_t remainingRetries);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param remainingRetries Number of retries remaining, must be equal to -1 if unknown.
      *
@@ -107,7 +107,7 @@
      */
     oneway supplyNetworkDepersonalizationResponse(RadioResponseInfo info, int32_t remainingRetries);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param calls Current call list
      *
@@ -119,7 +119,7 @@
      */
     oneway getCurrentCallsResponse(RadioResponseInfo info, vec<Call> calls);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -144,7 +144,7 @@
      */
     oneway dialResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param imsi String containing the IMSI
      *
@@ -154,7 +154,7 @@
      */
     oneway getIMSIForAppResponse(RadioResponseInfo info, string imsi);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -169,7 +169,7 @@
      */
     oneway hangupConnectionResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -186,7 +186,7 @@
      */
     oneway hangupWaitingOrBackgroundResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -203,7 +203,7 @@
      */
     oneway hangupForegroundResumeBackgroundResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -220,7 +220,7 @@
      */
     oneway switchWaitingOrHoldingAndActiveResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -236,7 +236,7 @@
      */
     oneway conferenceResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -253,7 +253,7 @@
      */
     oneway rejectCallResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param failCauseInfo Contains LastCallFailCause and vendor cause code.
      *
@@ -297,7 +297,7 @@
     oneway getLastCallFailCauseResponse(RadioResponseInfo info,
             LastCallFailCauseInfo failCauseinfo);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param sigStrength Current signal strength
      *
@@ -307,7 +307,7 @@
      */
     oneway getSignalStrengthResponse(RadioResponseInfo info, SignalStrength sigStrength);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param voiceRegResponse Current Voice registration response as defined by VoiceRegStateResult
      *        in types.hal
@@ -319,7 +319,7 @@
     oneway getVoiceRegistrationStateResponse(RadioResponseInfo info,
             VoiceRegStateResult voiceRegResponse);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param dataRegResponse Current Data registration response as defined by DataRegStateResult in
      *        types.hal
@@ -331,7 +331,7 @@
     oneway getDataRegistrationStateResponse(RadioResponseInfo info,
             DataRegStateResult dataRegResponse);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param longName is long alpha ONS or EONS or empty string if unregistered
      * @param shortName is short alpha ONS or EONS or empty string if unregistered
@@ -344,7 +344,7 @@
     oneway getOperatorResponse(RadioResponseInfo info, string longName, string shortName,
             string numeric);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -354,7 +354,7 @@
      */
     oneway setRadioPowerResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -368,7 +368,7 @@
      */
     oneway sendDtmfResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param sms Response to sms sent as defined by SendSmsResult in types.hal
      *
@@ -391,7 +391,7 @@
      */
     oneway sendSmsResponse(RadioResponseInfo info, SendSmsResult sms);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param sms Response to sms sent as defined by SendSmsResult in types.hal
      *
@@ -415,7 +415,7 @@
      */
     oneway sendSMSExpectMoreResponse(RadioResponseInfo info, SendSmsResult sms);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param dcResponse SetupDataCallResult defined in types.hal
      *
@@ -430,7 +430,7 @@
      */
     oneway setupDataCallResponse(RadioResponseInfo info, SetupDataCallResult dcResponse);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param iccIo ICC io operation response as defined by IccIoResult in types.hal
      *
@@ -442,7 +442,7 @@
      */
     oneway iccIOForAppResponse(RadioResponseInfo info, IccIoResult iccIo);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -464,7 +464,7 @@
      */
     oneway sendUssdResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -479,7 +479,7 @@
      */
     oneway cancelPendingUssdResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param n is "n" parameter from TS 27.007 7.7
      * @param m is "m" parameter from TS 27.007 7.7
@@ -498,7 +498,7 @@
      */
     oneway getClirResponse(RadioResponseInfo info, int32_t n, int32_t m);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -513,7 +513,7 @@
      */
     oneway setClirResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param callForwardInfos points to a vector of CallForwardInfo, one for
      *        each distinct registered phone number.
@@ -541,7 +541,7 @@
     oneway getCallForwardStatusResponse(RadioResponseInfo info,
             vec<CallForwardInfo> callForwardInfos);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -560,7 +560,7 @@
      */
     oneway setCallForwardResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param enable If current call waiting state is disabled, enable = false else true
      * @param serviceClass If enable, then callWaitingResp[1]
@@ -584,7 +584,7 @@
      */
     oneway getCallWaitingResponse(RadioResponseInfo info, bool enable, int32_t serviceClass);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -602,7 +602,7 @@
      */
     oneway setCallWaitingResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -611,7 +611,7 @@
      */
     oneway acknowledgeLastIncomingGsmSmsResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -626,7 +626,7 @@
      */
     oneway acceptCallResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -635,7 +635,7 @@
      */
     oneway deactivateDataCallResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param response 0 is the TS 27.007 service class bit vector of
      *        services for which the specified barring facility
@@ -656,7 +656,7 @@
      */
     oneway getFacilityLockForAppResponse(RadioResponseInfo info, int32_t response);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param retry 0 is the number of retries remaining, or -1 if unknown
      *
@@ -675,7 +675,7 @@
      */
     oneway setFacilityLockForAppResponse(RadioResponseInfo info, int32_t retry);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -693,7 +693,7 @@
      */
     oneway setBarringPasswordResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param selection false for automatic selection, true for manual selection
      *
@@ -703,7 +703,7 @@
      */
     oneway getNetworkSelectionModeResponse(RadioResponseInfo info, bool manual);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -718,7 +718,7 @@
      */
     oneway setNetworkSelectionModeAutomaticResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -733,7 +733,7 @@
      */
     oneway setNetworkSelectionModeManualResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param networkInfos List of network operator information as OperatorInfos defined in
      *         types.hal
@@ -751,7 +751,7 @@
     oneway getAvailableNetworksResponse(RadioResponseInfo info,
             vec<OperatorInfo> networkInfos);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -767,7 +767,7 @@
      */
     oneway startDtmfResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -784,7 +784,7 @@
      */
     oneway stopDtmfResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param version string containing version string for log reporting
      *
@@ -795,7 +795,7 @@
      */
     oneway getBasebandVersionResponse(RadioResponseInfo info, string version);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -813,7 +813,7 @@
      */
     oneway separateConnectionResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -825,7 +825,7 @@
      */
     oneway setMuteResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param enable true for "mute enabled" and false for "mute disabled"
      *
@@ -840,7 +840,7 @@
      */
     oneway getMuteResponse(RadioResponseInfo info, bool enable);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param status indicates CLIP status
      *
@@ -856,7 +856,7 @@
      */
     oneway getClipResponse(RadioResponseInfo info, ClipStatus status);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param dcResponse List of DataCallResult as defined in types.hal
      *
@@ -866,7 +866,7 @@
      */
     oneway getDataCallListResponse(RadioResponseInfo info, vec<SetupDataCallResult> dcResponse);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -881,7 +881,7 @@
      */
     oneway setSuppServiceNotificationsResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param index record index where the message is stored
      *
@@ -901,7 +901,7 @@
      */
     oneway writeSmsToSimResponse(RadioResponseInfo info, int32_t index);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -916,7 +916,7 @@
      */
     oneway deleteSmsOnSimResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -926,7 +926,7 @@
      */
     oneway setBandModeResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param bandModes List of RadioBandMode listing supported modes
      *
@@ -937,7 +937,7 @@
      */
     oneway getAvailableBandModesResponse(RadioResponseInfo info, vec<RadioBandMode> bandModes);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param commandResponse SAT/USAT response in hexadecimal format
      *        string starting with first byte of response
@@ -950,7 +950,7 @@
      */
     oneway sendEnvelopeResponse(RadioResponseInfo info, string commandResponse);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -961,7 +961,7 @@
      */
     oneway sendTerminalResponseToSimResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -972,7 +972,7 @@
      */
     oneway handleStkCallSetupRequestFromSimResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -990,7 +990,7 @@
      */
     oneway explicitCallTransferResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1001,7 +1001,7 @@
      */
     oneway setPreferredNetworkTypeResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param nwType RadioPreferredNetworkType defined in types.hal
      *
@@ -1012,7 +1012,7 @@
     oneway getPreferredNetworkTypeResponse(RadioResponseInfo info,
             PreferredNetworkType nwType);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param cells Vector of neighboring radio cell
      *
@@ -1023,7 +1023,7 @@
      */
     oneway getNeighboringCidsResponse(RadioResponseInfo info, vec<NeighboringCell> cells);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1032,7 +1032,7 @@
      */
     oneway setLocationUpdatesResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1043,7 +1043,7 @@
      */
     oneway setCdmaSubscriptionSourceResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1052,7 +1052,7 @@
      */
     oneway setCdmaRoamingPreferenceResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param type CdmaRoamingType defined in types.hal
      *
@@ -1063,7 +1063,7 @@
      */
     oneway getCdmaRoamingPreferenceResponse(RadioResponseInfo info, CdmaRoamingType type);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1076,7 +1076,7 @@
      */
     oneway setTTYModeResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param mode TtyMode
      *
@@ -1090,7 +1090,7 @@
      */
     oneway getTTYModeResponse(RadioResponseInfo info, TtyMode mode);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1103,7 +1103,7 @@
      */
     oneway setPreferredVoicePrivacyResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param enable false for Standard Privacy Mode (Public Long Code Mask)
      *        true for Enhanced Privacy Mode (Private Long Code Mask)
@@ -1118,7 +1118,7 @@
      */
     oneway getPreferredVoicePrivacyResponse(RadioResponseInfo info, bool enable);
 
-    /*
+    /**
      * Response callback for IRadio.sendCDMAFeatureCode()
      *
      * @param info Response info struct containing response type, serial no. and error
@@ -1136,7 +1136,7 @@
      */
     oneway sendCDMAFeatureCodeResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1152,7 +1152,7 @@
      */
     oneway sendBurstDtmfResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param sms Sms result struct as defined by SendSmsResult in types.hal
      *
@@ -1176,7 +1176,7 @@
      */
     oneway sendCdmaSmsResponse(RadioResponseInfo info, SendSmsResult sms);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1195,7 +1195,7 @@
      */
     oneway acknowledgeLastIncomingCdmaSmsResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param configs Vector of GSM/WCDMA Cell broadcast configs
      *
@@ -1213,7 +1213,7 @@
     oneway getGsmBroadcastConfigResponse(RadioResponseInfo info,
             vec<GsmBroadcastSmsConfigInfo> configs);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1228,7 +1228,7 @@
      */
     oneway setGsmBroadcastConfigResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1243,7 +1243,7 @@
      */
     oneway setGsmBroadcastActivationResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param configs Vector of CDMA Broadcast SMS configs.
      *
@@ -1261,7 +1261,7 @@
     oneway getCdmaBroadcastConfigResponse(RadioResponseInfo info,
             vec<CdmaBroadcastSmsConfigInfo> configs);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1276,7 +1276,7 @@
      */
     oneway setCdmaBroadcastConfigResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1291,7 +1291,7 @@
      */
     oneway setCdmaBroadcastActivationResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param mdn MDN if CDMA subscription is available
      * @param hSid is a comma separated list of H_SID (Home SID) if
@@ -1309,7 +1309,7 @@
     oneway getCDMASubscriptionResponse(RadioResponseInfo info, string mdn, string hSid,
             string hNid, string min, string prl);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param index record index where the cmda sms message is stored
      *
@@ -1330,7 +1330,7 @@
      */
     oneway writeSmsToRuimResponse(RadioResponseInfo info, uint32_t index);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1345,7 +1345,7 @@
      */
     oneway deleteSmsOnRuimResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param imei IMEI if GSM subscription is available
      * @param imeisv IMEISV if GSM subscription is available
@@ -1363,7 +1363,7 @@
     oneway getDeviceIdentityResponse(RadioResponseInfo info, string imei, string imeisv,
             string esn, string meid);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1373,7 +1373,7 @@
      */
     oneway exitEmergencyCallbackModeResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param smsc Short Message Service Center address on the device
      *
@@ -1391,7 +1391,7 @@
      */
     oneway getSmscAddressResponse(RadioResponseInfo info, string smsc);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1407,7 +1407,7 @@
      */
     oneway setSmscAddressResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1422,7 +1422,7 @@
      */
     oneway reportSmsMemoryStatusResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1431,7 +1431,7 @@
      */
     oneway reportStkServiceIsRunningResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param source CDMA subscription source
      *
@@ -1442,7 +1442,7 @@
      */
     oneway getCdmaSubscriptionSourceResponse(RadioResponseInfo info, CdmaSubscriptionSource source);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param response response string of the challenge/response algo for ISIM auth in base64 format
      *
@@ -1452,7 +1452,7 @@
      */
     oneway requestIsimAuthenticationResponse(RadioResponseInfo info, string response);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1461,7 +1461,7 @@
      */
     oneway acknowledgeIncomingGsmSmsWithPduResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param iccIo IccIoResult as defined in types.hal corresponding to ICC IO response
      *
@@ -1473,7 +1473,7 @@
      */
     oneway sendEnvelopeWithStatusResponse(RadioResponseInfo info, IccIoResult iccIo);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param rat Current voice RAT
      *
@@ -1483,7 +1483,7 @@
      */
     oneway getVoiceRadioTechnologyResponse(RadioResponseInfo info, RadioTechnology rat);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param cellInfo List of current cell information known to radio
      *
@@ -1493,7 +1493,7 @@
      */
     oneway getCellInfoListResponse(RadioResponseInfo info, vec<CellInfo> cellInfo);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1502,7 +1502,7 @@
      */
     oneway setCellInfoListRateResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1512,7 +1512,7 @@
      */
     oneway setInitialAttachApnResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param isRegistered false = not registered, true = registered
      * @param ratFamily RadioTechnologyFamily as defined in types.hal. This value is valid only if
@@ -1525,7 +1525,7 @@
     oneway getImsRegistrationStateResponse(RadioResponseInfo info, bool isRegistered,
             RadioTechnologyFamily ratFamily);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param sms Response to sms sent as defined by SendSmsResult in types.hal
      *
@@ -1548,7 +1548,7 @@
      */
     oneway sendImsSmsResponse(RadioResponseInfo info, SendSmsResult sms);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param result IccIoResult as defined in types.hal
      *
@@ -1558,7 +1558,7 @@
      */
     oneway iccTransmitApduBasicChannelResponse(RadioResponseInfo info, IccIoResult result);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param channelId session id of the logical channel.
      * @param selectResponse Contains the select response for the open channel command with one
@@ -1573,7 +1573,7 @@
     oneway iccOpenLogicalChannelResponse(RadioResponseInfo info, int32_t channelId,
             vec<int8_t> selectResponse);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1582,7 +1582,7 @@
      */
     oneway iccCloseLogicalChannelResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param result IccIoResult as defined in types.hal
      *
@@ -1592,7 +1592,7 @@
      */
     oneway iccTransmitApduLogicalChannelResponse(RadioResponseInfo info, IccIoResult result);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param result string containing the contents of the NV item
      *
@@ -1602,7 +1602,7 @@
      */
     oneway nvReadItemResponse(RadioResponseInfo info, string result);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1611,7 +1611,7 @@
      */
     oneway nvWriteItemResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1620,7 +1620,7 @@
      */
     oneway nvWriteCdmaPrlResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1629,7 +1629,7 @@
      */
     oneway nvResetConfigResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1639,7 +1639,7 @@
      */
     oneway setUiccSubscriptionResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1648,7 +1648,7 @@
      */
     oneway setDataAllowedResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param config Array of HardwareConfig of the radio.
      *
@@ -1658,7 +1658,7 @@
      */
     oneway getHardwareConfigResponse(RadioResponseInfo info, vec<HardwareConfig> config);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param result IccIoResult as defined in types.hal
      *
@@ -1668,7 +1668,7 @@
      */
     oneway requestIccSimAuthenticationResponse(RadioResponseInfo info, IccIoResult result);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1678,7 +1678,7 @@
      */
     oneway setDataProfileResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1688,7 +1688,7 @@
      */
     oneway requestShutdownResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param rc Radio capability as defined by RadioCapability in types.hal
      *
@@ -1699,7 +1699,7 @@
      */
     oneway getRadioCapabilityResponse(RadioResponseInfo info, RadioCapability rc);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param rc Radio capability as defined by RadioCapability in types.hal used to
      *        feedback return status
@@ -1711,7 +1711,7 @@
      */
     oneway setRadioCapabilityResponse(RadioResponseInfo info, RadioCapability rc);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param statusInfo LceStatusInfo indicating LCE status
      *
@@ -1722,7 +1722,7 @@
      */
     oneway startLceServiceResponse(RadioResponseInfo info, LceStatusInfo statusInfo);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param statusInfo LceStatusInfo indicating LCE status
      *
@@ -1733,7 +1733,7 @@
      */
     oneway stopLceServiceResponse(RadioResponseInfo info, LceStatusInfo statusInfo);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param lceInfo LceDataInfo indicating LCE data as defined in types.hal
      *
@@ -1744,7 +1744,7 @@
      */
     oneway pullLceDataResponse(RadioResponseInfo info, LceDataInfo lceInfo);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param activityInfo modem activity information
      *
@@ -1754,7 +1754,7 @@
      */
     oneway getModemActivityInfoResponse(RadioResponseInfo info, ActivityStatsInfo activityInfo);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param numAllowed number of allowed carriers which have been set correctly.
      *        On success, it must match the length of list Carriers->allowedCarriers.
@@ -1768,7 +1768,7 @@
      */
     oneway setAllowedCarriersResponse(RadioResponseInfo info, int32_t numAllowed);
 
-    /*
+    /**
      * Expected modem behavior:
      *  Return list of allowed carriers, and if all carriers are allowed.
      *
@@ -1785,7 +1785,7 @@
     oneway getAllowedCarriersResponse(RadioResponseInfo info, bool allAllowed,
             CarrierRestrictions carriers);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1794,7 +1794,7 @@
      */
     oneway sendDeviceStateResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1804,7 +1804,7 @@
      */
     oneway setIndicationFilterResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      *
      * Valid errors returned:
@@ -1816,7 +1816,7 @@
      */
     oneway setSimCardPowerResponse(RadioResponseInfo info);
 
-    /*
+    /**
      * Acknowledge the receipt of radio request sent to the vendor. This must be sent only for
      * radio request which take long time to respond.
      * For more details, refer https://source.android.com/devices/tech/connect/ril.html
diff --git a/radio/1.0/types.hal b/radio/1.0/types.hal
index ad9f392..2224c8b 100644
--- a/radio/1.0/types.hal
+++ b/radio/1.0/types.hal
@@ -288,7 +288,7 @@
     WAITING,                              // MT call only
 };
 
-/*
+/**
  * User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0
  */
 enum UusType : int32_t {
@@ -301,7 +301,7 @@
     TYPE3_NOT_REQUIRED,
 };
 
-/*
+/**
  * User-to-User Signaling Information data coding schemes. Possible values for
  * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
  * specified in section 10.5.4.25 of 3GPP TS 24.008
@@ -410,7 +410,8 @@
                                           // callback mode
     CDMA_ACCESS_BLOCKED = 1009,
 
-    /* OEM specific error codes. Used to distinguish error from
+    /**
+     * OEM specific error codes. Used to distinguish error from
      * CALL_FAIL_ERROR_UNSPECIFIED and help assist debugging */
     OEM_CAUSE_1 = 0xf001,
     OEM_CAUSE_2 = 0xf002,
@@ -526,7 +527,7 @@
     ERROR_UNSPECIFIED = 0xffff,
 };
 
-/*
+/**
  * Please note that registration state UNKNOWN is
  * treated as "out of service" in the Android telephony.
  * Registration state REG_DENIED must be returned if Location Update
@@ -1018,7 +1019,7 @@
     OTAPA_ABORTED
 };
 
-/* Names of the CDMA info records (C.S0005 section 3.7.5) */
+/** Names of the CDMA info records (C.S0005 section 3.7.5) */
 enum CdmaInfoRecName : int32_t {
     DISPLAY,
     CALLED_PARTY_NUMBER,
@@ -1033,7 +1034,7 @@
     T53_AUDIO_CONTROL
 };
 
-/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
+/** Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
 enum CdmaRedirectingReason : int32_t {
     UNKNOWN = 0,
     CALL_FORWARDING_BUSY = 1,
@@ -1187,7 +1188,7 @@
     vec<AppStatus> applications;          // size <= RadioConst:CARD_MAX_APPS
 };
 
-/*
+/**
  * User-to-User Signaling Information defined in 3GPP 23.087 v8.0
  */
 struct UusInfo {
@@ -1893,7 +1894,7 @@
                                           // For SIM_RESET result it is empty string.
 };
 
-/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
+/** CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
 struct CdmaSignalInfoRecord {
     bool isPresent;                       // true if signal information record is present
     int8_t signalType;                    // as defined 3.7.5.5-1
@@ -1911,7 +1912,7 @@
     CdmaCallWaitingNumberPlan numberPlan;
 };
 
-/*
+/**
  * Display Info Rec as defined in C.S0005 section 3.7.5.1
  * Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
  * Note: the Extended Display info rec contains multiple records of the
@@ -1924,7 +1925,7 @@
     string alphaBuf;                      // Max length = RadioConst:CDMA_ALPHA_INFO_BUFFER_LENGTH
 };
 
-/*
+/**
  * Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
  * Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
  * Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
@@ -1942,7 +1943,7 @@
     CdmaRedirectingReason redirectingReason; // redirectingReason is set to UNKNOWN if not included
 };
 
-/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
+/** Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
 struct CdmaLineControlInfoRecord {
     uint8_t lineCtrlPolarityIncluded;
     uint8_t lineCtrlToggle;
@@ -1950,12 +1951,12 @@
     uint8_t lineCtrlPowerDenial;
 };
 
-/* T53 CLIR Information Record */
+/** T53 CLIR Information Record */
 struct CdmaT53ClirInfoRecord {
     uint8_t cause;
 };
 
-/* T53 Audio Control Information Record */
+/** T53 Audio Control Information Record */
 struct CdmaT53AudioControlInfoRecord {
     uint8_t upLink;
     uint8_t downLink;
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp b/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp
index 5fa11fc..f704520 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp
@@ -417,6 +417,23 @@
 }
 
 /*
+ * Test IRadio.setCdmaSubscriptionSource() for the response returned.
+ */
+TEST_F(RadioHidlTest, setCdmaSubscriptionSource) {
+    int serial = 1;
+
+    radio->setCdmaSubscriptionSource(++serial, CdmaSubscriptionSource::RUIM_SIM);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::SIM_ABSENT
+                || radioRsp->rspInfo.error == RadioError::SUBSCRIPTION_NOT_AVAILABLE);
+    }
+}
+
+/*
  * Test IRadio.getVoiceRadioTechnology() for the response returned.
  */
 TEST_F(RadioHidlTest, getVoiceRadioTechnology) {
@@ -455,7 +472,7 @@
     int serial = 1;
 
     // TODO(sanketpadawe): RIL crashes with value of rate = 10
-    radio->setCellInfoListRate(++serial, 0);
+    radio->setCellInfoListRate(++serial, 10);
     EXPECT_EQ(std::cv_status::no_timeout, wait());
     EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp b/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp
index 3638ccb..fa2871d 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp
@@ -28,8 +28,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE
-                || radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS);
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
     }
 }
 
@@ -87,8 +86,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
-                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_STATE
                 || radioRsp->rspInfo.error == RadioError::MODEM_ERR
                 || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
     }
@@ -106,8 +104,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
-                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_STATE
                 || radioRsp->rspInfo.error == RadioError::MODEM_ERR
                 || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
     }
@@ -125,8 +122,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
-                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_STATE
                 || radioRsp->rspInfo.error == RadioError::MODEM_ERR
                 || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
     }
@@ -144,8 +140,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
-                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_STATE
                 || radioRsp->rspInfo.error == RadioError::MODEM_ERR
                 || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
     }
@@ -163,8 +158,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
-                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_STATE
                 || radioRsp->rspInfo.error == RadioError::MODEM_ERR
                 || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
     }
@@ -182,8 +176,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
-                || radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
     }
 }
 
@@ -218,8 +211,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
-                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_STATE
                 || radioRsp->rspInfo.error == RadioError::MODEM_ERR
                 || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
     }
@@ -319,8 +311,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
-                || radioRsp->rspInfo.error == RadioError::INVALID_STATE
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_STATE
                 || radioRsp->rspInfo.error == RadioError::MODEM_ERR
                 || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
     }
@@ -358,10 +349,29 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_STATE
+                || radioRsp->rspInfo.error == RadioError::MODEM_ERR
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+    }
+}
+
+/*
+ * Test IRadio.sendCDMAFeatureCode() for the response returned.
+ */
+TEST_F(RadioHidlTest, sendCDMAFeatureCode) {
+    int serial = 1;
+
+    radio->sendCDMAFeatureCode(serial, hidl_string());
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    if (cardStatus.cardState == CardState::ABSENT) {
         ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
                 || radioRsp->rspInfo.error == RadioError::INVALID_STATE
                 || radioRsp->rspInfo.error == RadioError::MODEM_ERR
-                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+                || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR
+                || radioRsp->rspInfo.error == RadioError::SYSTEM_ERR);
     }
 }
 
@@ -414,8 +424,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
-                || radioRsp->rspInfo.error == RadioError::SYSTEM_ERR
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::SYSTEM_ERR
                 || radioRsp->rspInfo.error == RadioError::MODEM_ERR
                 || radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
     }
@@ -450,8 +459,7 @@
     EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
     if (cardStatus.cardState == CardState::ABSENT) {
-        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS
-                || radioRsp->rspInfo.error == RadioError::NONE);
+        ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
     }
 }
 
diff --git a/radio/1.0/vts/functional/radio_response.cpp b/radio/1.0/vts/functional/radio_response.cpp
index 8759003..c889a18 100644
--- a/radio/1.0/vts/functional/radio_response.cpp
+++ b/radio/1.0/vts/functional/radio_response.cpp
@@ -496,7 +496,9 @@
     return Void();
 }
 
-Return<void> RadioResponse::setCdmaSubscriptionSourceResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse::setCdmaSubscriptionSourceResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
@@ -539,7 +541,9 @@
     return Void();
 }
 
-Return<void> RadioResponse::sendCDMAFeatureCodeResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse::sendCDMAFeatureCodeResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
diff --git a/radio/deprecated/1.0/IOemHookIndication.hal b/radio/deprecated/1.0/IOemHookIndication.hal
index 936779f..8636592 100644
--- a/radio/deprecated/1.0/IOemHookIndication.hal
+++ b/radio/deprecated/1.0/IOemHookIndication.hal
@@ -18,15 +18,15 @@
 
 import android.hardware.radio@1.0::types;
 
-/*
+/**
  * Interface declaring unsolicited oem hook indications.
  */
 interface IOemHookIndication {
-   /*
+   /**
     * This is for OEM specific use.
     *
     * @param type Type of radio indication
     * @param data data passed as raw bytes
     */
    oneway oemHookRaw(RadioIndicationType type, vec<uint8_t> data);
-};
\ No newline at end of file
+};
diff --git a/radio/deprecated/1.0/IOemHookResponse.hal b/radio/deprecated/1.0/IOemHookResponse.hal
index 4e49acc..e8e6445 100644
--- a/radio/deprecated/1.0/IOemHookResponse.hal
+++ b/radio/deprecated/1.0/IOemHookResponse.hal
@@ -18,13 +18,13 @@
 
 import android.hardware.radio@1.0::types;
 
-/*
+/**
  * Interface declaring response functions to solicited oem hook requests.
  * Response functions defined in this interface are as per following convention:
  * <xyz>Response is response to IOemHook.<xyz>
  */
 interface IOemHookResponse {
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param data data returned by oem
      *
@@ -36,7 +36,7 @@
      */
     oneway sendRequestRawResponse(RadioResponseInfo info, vec<uint8_t> data);
 
-    /*
+    /**
      * @param info Response info struct containing response type, serial no. and error
      * @param data data returned by oem
      *
@@ -47,4 +47,4 @@
      *   RadioError:OEM_ERROR_X
      */
     oneway sendRequestStringsResponse(RadioResponseInfo info, vec<string> data);
-};
\ No newline at end of file
+};
diff --git a/renderscript/1.0/Android.bp b/renderscript/1.0/Android.bp
index cce34e7..9f2a589 100644
--- a/renderscript/1.0/Android.bp
+++ b/renderscript/1.0/Android.bp
@@ -32,6 +32,7 @@
     ],
     out: [
         "android/hardware/renderscript/1.0/types.h",
+        "android/hardware/renderscript/1.0/hwtypes.h",
         "android/hardware/renderscript/1.0/IContext.h",
         "android/hardware/renderscript/1.0/IHwContext.h",
         "android/hardware/renderscript/1.0/BnHwContext.h",
diff --git a/renderscript/1.0/IContext.hal b/renderscript/1.0/IContext.hal
index 2e386d2..43a09e1 100644
--- a/renderscript/1.0/IContext.hal
+++ b/renderscript/1.0/IContext.hal
@@ -32,7 +32,7 @@
 
 interface IContext {
 
-    /*
+    /**
      * TODO: Do we need to define "selectors"? It may be a property of the
      * "adapted allocation" that's returned.
      *
@@ -56,7 +56,7 @@
     allocationAdapterCreate(Type type, Allocation baseAlloc)
                  generates (AllocationAdapter subAlloc);
 
-    /*
+    /**
      * TODO: Need to relate "offset" back to the terminology in
      * allocationAdapterCreate() -- the latter uses the terms "selector" and
      * "selected value". Can we use consistent terminology? Are "offset" and
@@ -72,7 +72,7 @@
     @callflow(next={"*"})
     allocationAdapterOffset(AllocationAdapter alloc, vec<uint32_t> offsets);
 
-    /*
+    /**
      * TODO: add more explanation here.
      *
      * Returns the Type of the Allocation.
@@ -83,7 +83,7 @@
     @callflow(next={"*"})
     allocationGetType(Allocation allocation) generates (Type type);
 
-    /*
+    /**
      * TODO: more clarification needed describing if the pointer can be aliased
      * or if the data can outlive the allocation.
      *
@@ -102,7 +102,7 @@
                           bitfield<AllocationUsageType> usage, Ptr ptr)
                generates (Allocation allocation);
 
-    /*
+    /**
      * Creates an Allocation from a Bitmap.
      *
      * @param type Type describing data layout
@@ -118,7 +118,7 @@
                                bitfield<AllocationUsageType> usage)
                     generates (Allocation allocation);
 
-    /*
+    /**
      * Creates a Cubemapped Allocation from a Bitmap.
      *
      * @param type Type describing data layout
@@ -135,7 +135,7 @@
                                    bitfield<AllocationUsageType> usage)
                         generates (Allocation allocation);
 
-    /*
+    /**
      * Returns the handle to a raw buffer that is being managed by the screen
      * compositor. This operation is only valid for Allocations with
      * USAGE_IO_INPUT.
@@ -147,7 +147,7 @@
     allocationGetNativeWindow(Allocation allocation)
                    generates (NativeWindow nativeWindow);
 
-    /*
+    /**
      * TODO: more clarification needed
      *
      * Sets the NativeWindow of an Allocation. This operation is only valid
@@ -159,7 +159,7 @@
     @callflow(next={"*"})
     allocationSetNativeWindow(Allocation allocation, NativeWindow nativewindow);
 
-    /*
+    /**
      * Initialize BufferQueue with specified max number of buffers.
      *
      * @param alloc Allocation
@@ -168,7 +168,7 @@
     @callflow(next={"*"})
     allocationSetupBufferQueue(Allocation alloc, uint32_t numBuffer);
 
-    /*
+    /**
      * TODO: clearly define baseAlloc vs subAlloc
      *
      * Shares the BufferQueue with another Allocation. Both must be
@@ -181,7 +181,7 @@
     @callflow(next={"*"})
     allocationShareBufferQueue(Allocation baseAlloc, Allocation subAlloc);
 
-    /*
+    /**
      * Copies from the Allocation into a Bitmap. The bitmap must match the
      * dimensions of the Allocation.
      *
@@ -195,7 +195,7 @@
     @callflow(next={"*"})
     allocationCopyToBitmap(Allocation allocation, Ptr data, Size sizeBytes);
 
-    /*
+    /**
      * TODO: should we consolidate all [123]DWrite functions or [123]DRead
      * functions into the same API call? Our current plan is to be very similar
      * to the dispatch table API. How much should we deviate from the original
@@ -219,7 +219,7 @@
     allocation1DWrite(Allocation allocation, uint32_t offset, uint32_t lod,
                       uint32_t count, vec<uint8_t> data);
 
-    /*
+    /**
      * Copies a value into a single sub-Element of this Allocation.
      *
      * @param allocation Allocation to be updated
@@ -237,7 +237,7 @@
                            uint32_t z, uint32_t lod, vec<uint8_t> data,
                            Size compIdx);
 
-    /*
+    /**
      * Copies from an array into a rectangular region in this Allocation.
      *
      * When this HAL entry is executed, all Vec3 elements have been explicitly
@@ -262,7 +262,7 @@
                       uint32_t lod, AllocationCubemapFace face, uint32_t w,
                       uint32_t h, vec<uint8_t> data, Size stride);
 
-    /*
+    /**
      * Copies from an array into a 3D region in this Allocation.
      *
      * When this HAL entry is executed, all Vec3 elements have been explicitly
@@ -288,7 +288,7 @@
                       uint32_t zoff, uint32_t lod, uint32_t w, uint32_t h,
                       uint32_t d, vec<uint8_t> data, Size stride);
 
-    /*
+    /**
      * Generates a mipmap chain. This is only valid if the Type of the
      * Allocation includes mipmaps.
      *
@@ -304,7 +304,7 @@
     @callflow(next={"*"})
     allocationGenerateMipmaps(Allocation allocation);
 
-    /*
+    /**
      * Copies all of an Allocation's data into an array.
      *
      * All Vec3 elements of an Allocation are padded to be Vec4, so the data
@@ -320,7 +320,7 @@
     @callflow(next={"*"})
     allocationRead(Allocation allocation, Ptr data, Size sizeBytes);
 
-    /*
+    /**
      * Copies a 1D region of this Allocation into an array.
      *
      * All Vec3 elements of an Allocation are padded to be Vec4, so the data
@@ -342,7 +342,7 @@
     allocation1DRead(Allocation allocation, uint32_t xoff, uint32_t lod,
                      uint32_t count, Ptr data, Size sizeBytes);
 
-    /*
+    /**
      * Returns the value of a single sub-Element of this Allocation.
      *
      * HIDL is always running in Passthrough mode for RenderScript, so the
@@ -362,7 +362,7 @@
                           uint32_t z, uint32_t lod, Ptr data, Size sizeBytes,
                           Size compIdx);
 
-    /*
+    /**
      * Copies from a rectangular region in this Allocation to an array.
      *
      * All Vec3 elements of an Allocation are padded to be Vec4, so the data
@@ -391,7 +391,7 @@
                      uint32_t lod, AllocationCubemapFace face, uint32_t w,
                      uint32_t h, Ptr data, Size sizeBytes, Size stride);
 
-    /*
+    /**
      * Copies from a rectangular cuboid region in this Allocation to an array.
      *
      * All Vec3 elements of an Allocation are padded to be Vec4, so the data
@@ -421,7 +421,7 @@
                      uint32_t zoff, uint32_t lod, uint32_t w, uint32_t h,
                      uint32_t d, Ptr data, Size sizeBytes, Size stride);
 
-    /*
+    /**
      * Propagates changes from one usage of the Allocation to the other usages
      * of the Allocation.
      *
@@ -431,7 +431,7 @@
     @callflow(next={"*"})
     allocationSyncAll(Allocation allocation, AllocationUsageType usageType);
 
-    /*
+    /**
      * TODO: describe the functionality of resize1D better
      * TODO: original Java Doc description seems to contradict itself ("with
      * null contents and the region is otherwise undefined")
@@ -455,7 +455,7 @@
     @callflow(next={"*"})
     allocationResize1D(Allocation allocation, uint32_t dimX);
 
-    /*
+    /**
      * TODO: There are allocationCopy2DRange and 3DRange, but no 1DRange. Should
      * the interface be cleaned up more?
      *
@@ -483,7 +483,7 @@
                           uint32_t srcXoff, uint32_t srcYoff, uint32_t srcMip,
                           AllocationCubemapFace srcFace);
 
-    /*
+    /**
      * Copies a rectangular cuboid region into the allocation from another
      * Allocation.
      *
@@ -508,7 +508,7 @@
                           Allocation srcAlloc, uint32_t srcXoff,
                           uint32_t srcYoff, uint32_t srcZoff, uint32_t srcMip);
 
-    /*
+    /**
      * TODO: define buffer and output stream
      *
      * Sends a buffer to the output stream. The contents of the Allocation may
@@ -520,7 +520,7 @@
     @callflow(next={"*"})
     allocationIoSend(Allocation allocation);
 
-    /*
+    /**
      * Receives the latest input into the Allocation. This operation is only
      * valid if USAGE_IO_INPUT is set on the Allocation, otherwise an error
      * must be reported and no operations may be executed.
@@ -530,7 +530,7 @@
     @callflow(next={"*"})
     allocationIoReceive(Allocation allocation);
 
-    /*
+    /**
      * TODO: describe default values for lod, face, and z better.
      * TODO: what cases can invalidate the pointer? Resize? It should be
      * clarified that this method should always return a valid pointer, but the
@@ -560,7 +560,7 @@
                          AllocationCubemapFace face, uint32_t z)
               generates (Ptr dataPtr, Size stride);
 
-    /*
+    /**
      * Retrieves an Element's metadata from native code.
      *
      * @param element Element to be read
@@ -570,7 +570,7 @@
     elementGetNativeMetadata(Element element)
                   generates (vec<uint32_t> elemData);
 
-    /*
+    /**
      * TODO: define Sub-Element handles better.
      *
      * Retrieves an Element's sub Elements, specifically their identifiers,
@@ -587,7 +587,7 @@
                generates (vec<Element> ids, vec<string> names,
                           vec<Size> arraySizes);
 
-    /*
+    /**
      * TODO: can normalization flag be removed?
      *
      * Creates an Element.
@@ -602,7 +602,7 @@
     elementCreate(DataType dt, DataKind dk, bool norm, uint32_t size)
        generates (Element element);
 
-    /*
+    /**
      * Creates a complex Element.
      *
      * @param einsPtr Container of input Elements
@@ -615,7 +615,7 @@
                          vec<Size> arraySizesPtr)
               generates (Element element);
 
-    /*
+    /**
      * Retrives a Type's metadata from native code.
      *
      * @param type Type describing data layout
@@ -624,7 +624,7 @@
     @callflow(next={"*"})
     typeGetNativeMetadata(Type type) generates (vec<OpaqueHandle> metadata);
 
-    /*
+    /**
      * Creates a new Type.
      *
      * If Type is 1D, Y and Z must be 0. If Type is 2D, Z must be 0.
@@ -644,14 +644,14 @@
                bool mipmaps, bool faces, YuvFormat yuv)
     generates (Type type);
 
-    /*
+    /**
      * Destroys provided RenderScript context, including all objects created in
      * this context.
      */
     @exit
     contextDestroy();
 
-    /*
+    /**
      * TODO: provide overview of messaging model and figure out if this should
      * be part of HAL or not.
      * TODO: what is the "client" for purposes of this interface?
@@ -671,7 +671,7 @@
     contextGetMessage(Ptr data, Size size)
            generates (MessageToClientType messageType, Size receiveLen);
 
-    /*
+    /**
      * TODO: define subID better.
      *
      * Gets the metadata of a message to ensure entire message can be properly
@@ -687,7 +687,7 @@
             generates (MessageToClientType messageType, Size receiveLen,
                        uint32_t subID);
 
-    /*
+    /**
      * TODO: Define "previous commands" better
      * TODO: Is the message identifier the same as subID?
      *
@@ -702,7 +702,7 @@
     @callflow(next={"*"})
     contextSendMessage(uint32_t id, vec<uint8_t> data);
 
-    /*
+    /**
      * TODO: Can this be done automatically as part of context creation? What
      * happens if we perform message operations before doing this?
      *
@@ -713,7 +713,7 @@
     @callflow(next={"*"})
     contextInitToClient();
 
-    /*
+    /**
      * TODO: Why doesn't this happen automatically as part of context
      * destruction? What happens if the FIFO is not empty?
      *
@@ -722,7 +722,7 @@
     @callflow(next={"*"})
     contextDeinitToClient();
 
-    /*
+    /**
      * TODO: do we need to mark asynchronous operations in this interface
      * definition?
      *
@@ -732,14 +732,14 @@
     @callflow(next={"*"})
     contextFinish();
 
-    /*
+    /**
      * Prints the currently available debugging information about the state of
      * the RS context to the logcat.
      */
     @callflow(next={"*"})
     contextLog();
 
-    /*
+    /**
      * TODO: full path? relative path? Investigate further.
      *
      * Sets the cache directory of the context.
@@ -749,7 +749,7 @@
     @callflow(next={"*"})
     contextSetCacheDir(string cacheDir);
 
-    /*
+    /**
      * TODO: does this apply to the GPU as well?
      *
      * Changes the priority of the cpu worker threads for this context.
@@ -759,7 +759,7 @@
     @callflow(next={"*"})
     contextSetPriority(ThreadPriorities priority);
 
-    /*
+    /**
      * TODO: does this need to be part of the HAL? What if the object already
      * has a name?
      *
@@ -771,7 +771,7 @@
     @callflow(next={"*"})
     assignName(ObjectBase obj, string name);
 
-    /*
+    /**
      * TODO: what if the object has no name?
      *
      * Returns the name of an object.
@@ -782,7 +782,7 @@
     @callflow(next={"*"})
     getName(ObjectBase obj) generates (string name);
 
-    /*
+    /**
      * TODO: starting here we have a set of interfaces for use with
      * ScriptGroups. At the very least we should indicate for each one that's
      * what it's for. Should we include ScriptGroup in the interface names?
@@ -810,7 +810,7 @@
                   vec<ScriptFieldID> depFieldIDS)
        generates (Closure closure);
 
-    /*
+    /**
      * Creates a Closure which represents a function call to a invocable
      * function, combined with arguments and values for global variables.
      *
@@ -827,7 +827,7 @@
                         vec<int32_t> sizes)
              generates (Closure closure);
 
-    /*
+    /**
      * Sets the argument of a Closure at specified index and size to provided
      * value.
      *
@@ -839,7 +839,7 @@
     @callflow(next={"*"})
     closureSetArg(Closure closure, uint32_t index, Ptr value, int32_t size);
 
-    /*
+    /**
      * Sets a global variable in a Closure.
      *
      * @param closure Closure
@@ -851,7 +851,7 @@
     closureSetGlobal(Closure closure, ScriptFieldID fieldID, int64_t value,
                      int32_t size);
 
-    /*
+    /**
      * TODO: should slot be unsigned? (applies to other two ID interfaces, too)
      *
      * Creates a Script Kernel ID.
@@ -866,7 +866,7 @@
                          bitfield<MetadataSignatureBitval> sig)
               generates (ScriptKernelID scriptKernelID);
 
-    /*
+    /**
      * Creates a Script Invoke ID.
      *
      * @param script Script
@@ -877,7 +877,7 @@
     scriptInvokeIDCreate(Script script, int32_t slot)
               generates (ScriptInvokeID scriptInvokeID);
 
-    /*
+    /**
      * TODO: describe the return value better. What is it?
      *
      * Creates a Script Field ID.
@@ -890,7 +890,7 @@
     scriptFieldIDCreate(Script script, int32_t slot)
              generates (ScriptFieldID scriptFieldID);
 
-    /*
+    /**
      * TODO: add more description
      *
      * Creates a Script Group.
@@ -908,7 +908,7 @@
                       vec<Type> types)
            generates (ScriptGroup scriptGroup);
 
-    /*
+    /**
      * Creates a Script Group.
      *
      * @param name Name
@@ -920,7 +920,7 @@
     scriptGroup2Create(string name, string cacheDir, vec<Closure> closures)
             generates (ScriptGroup2 scriptGroup2);
 
-    /*
+    /**
      * TODO: if SetInput/Output corresponds to the Java API setInput() and
      * setOutput(), which are documented as deprecated in API 23, do we need to
      * support them? Or can we fallback to the CPU when they're used? Or can't
@@ -937,7 +937,7 @@
     @callflow(next={"*"})
     scriptGroupSetOutput(ScriptGroup sg, ScriptKernelID kid, Allocation alloc);
 
-    /*
+    /**
      * Sets an input of the Script Group. This specifies an Allocation to be
      * used for kernels that require an input Allocation provided from outside
      * of the Script Group.
@@ -949,7 +949,7 @@
     @callflow(next={"*"})
     scriptGroupSetInput(ScriptGroup sg, ScriptKernelID kid, Allocation alloc);
 
-    /*
+    /**
      * Executes a Script Group.
      *
      * @param sg Script Group to be executed.
@@ -957,7 +957,7 @@
     @callflow(next={"*"})
     scriptGroupExecute( ScriptGroup sg);
 
-    /*
+    /**
      * Frees any native resources associated with this object. The primary use
      * is to force immediate cleanup of resources when it is believed the GC
      * may not respond quickly enough.
@@ -967,7 +967,7 @@
     @callflow(next={"*"})
     objDestroy(ObjectBase obj);
 
-    /*
+    /**
      * Creates a Sampler.
      *
      * @param magFilter Magnification value for the filter
@@ -984,7 +984,7 @@
                   float aniso)
        generates (Sampler sampler);
 
-    /*
+    /**
      * Binds an Allocation to a global pointer in the Script.
      *
      * @param script Script to be bound to
@@ -994,7 +994,7 @@
     @callflow(next={"*"})
     scriptBindAllocation(Script script, Allocation allocation, uint32_t slot);
 
-    /*
+    /**
      * TODO: is this necessary?
      *
      * Sets the timezone of a Script.
@@ -1005,7 +1005,7 @@
     @callflow(next={"*"})
     scriptSetTimeZone(Script script, string timeZone);
 
-    /*
+    /**
      * TODO: can scriptInvoke be combined with scriptInvokeV?
      *
      * Launches an invokable function.
@@ -1016,7 +1016,7 @@
     @callflow(next={"*"})
     scriptInvoke(Script vs, uint32_t slot);
 
-    /*
+    /**
      * Invokes a Script with values.
      *
      * @param vs Script to be invoked
@@ -1026,7 +1026,7 @@
     @callflow(next={"*"})
     scriptInvokeV(Script vs, uint32_t slot, vec<uint8_t> data);
 
-    /*
+    /**
      * TODO: add documentation for params
      * TODO: Should we rename "ScriptCall" to "LaunchOptions"?
      *
@@ -1043,7 +1043,7 @@
     scriptForEach(Script vs, uint32_t slot, vec<Allocation> vains,
                   Allocation vaout, vec<uint8_t> params, Ptr sc);
 
-    /*
+    /**
      * Launches a Reduction kernel.
      *
      * @param vs Script
@@ -1056,7 +1056,7 @@
     scriptReduce(Script vs, uint32_t slot, vec<Allocation> vains,
                  Allocation vaout, Ptr sc);
 
-    /*
+    /**
      * Sets a Script's integer variable to a value.
      *
      * @param vs RenderScript Script
@@ -1066,7 +1066,7 @@
     @callflow(next={"*"})
     scriptSetVarI(Script vs, uint32_t slot, int32_t value);
 
-    /*
+    /**
      * Sets a Script's Object variable to a value
      *
      * @param vs RenderScript Script
@@ -1076,7 +1076,7 @@
     @callflow(next={"*"})
     scriptSetVarObj( Script vs,  uint32_t slot, ObjectBase obj);
 
-    /*
+    /**
      * Sets a Script's long variable to a value.
      *
      * @param vs RenderScript Script
@@ -1086,7 +1086,7 @@
     @callflow(next={"*"})
     scriptSetVarJ(Script vs, uint32_t slot, int64_t value);
 
-    /*
+    /**
      * Sets a Script's float variable to a value.
      *
      * @param vs RenderScript Script
@@ -1096,7 +1096,7 @@
     @callflow(next={"*"})
     scriptSetVarF(Script vs, uint32_t slot, float value);
 
-    /*
+    /**
      * Sets a Script's double variable to a value.
      *
      * @param vs RenderScript Script
@@ -1106,7 +1106,7 @@
     @callflow(next={"*"})
     scriptSetVarD(Script vs, uint32_t slot, double value);
 
-    /*
+    /**
      * Sets a Script's struct variable to a value.
      *
      * @param vs RenderScript Script
@@ -1116,7 +1116,7 @@
     @callflow(next={"*"})
     scriptSetVarV(Script vs, uint32_t slot, vec<uint8_t> data);
 
-    /*
+    /**
      * TODO: Why do we have typed setters but only untyped getter?
      *
      * Retrieves the value from a global variable in a script.
@@ -1130,7 +1130,7 @@
     scriptGetVarV(Script vs, uint32_t slot, Size len)
        generates (vec<uint8_t> data);
 
-    /*
+    /**
      * TODO: Is this a value to be replicated for each member of the array? Or
      * is there a representation for each separate member?
      *
@@ -1147,7 +1147,7 @@
     scriptSetVarVE(Script vs, uint32_t slot, vec<uint8_t> data, Element ve,
                    vec<uint32_t> dims);
 
-    /*
+    /**
      * TODO: is cacheDir redundant with createCache() function? Can we remove
      * it?
      * TODO: define resName more clearly
@@ -1163,7 +1163,7 @@
     scriptCCreate(string resName, string cacheDir, vec<uint8_t> text)
        generates (Script script);
 
-    /*
+    /**
      * Creates a RenderScript Intrinsic script.
      *
      * @param id Intrinsic Script identifier
diff --git a/renderscript/1.0/IDevice.hal b/renderscript/1.0/IDevice.hal
index 7b1b866..62ce521 100644
--- a/renderscript/1.0/IDevice.hal
+++ b/renderscript/1.0/IDevice.hal
@@ -21,7 +21,7 @@
 
 interface IDevice {
 
-    /*
+    /**
      * Creates a RenderScript context.
      *
      * @param sdkVersion Target RS API level
diff --git a/renderscript/1.0/default/Context.cpp b/renderscript/1.0/default/Context.cpp
index ef17b463..389b6e7 100644
--- a/renderscript/1.0/default/Context.cpp
+++ b/renderscript/1.0/default/Context.cpp
@@ -63,7 +63,7 @@
 Return<void> Context::allocationAdapterOffset(Allocation alloc, const hidl_vec<uint32_t>& offsets) {
     RsAllocation _alloc = hidl_to_rs<RsAllocation>(alloc);
     const hidl_vec<uint32_t>& _offsets = offsets;
-    Device::getHal().AllocationAdapterOffset(mContext, _alloc, _offsets.data(), _offsets.size());
+    Device::getHal().AllocationAdapterOffset(mContext, _alloc, _offsets.data(), _offsets.size() * sizeof(uint32_t));
     return Void();
 }
 
@@ -552,7 +552,7 @@
     std::vector<RsScriptKernelID> _dstK    = hidl_to_rs<RsScriptKernelID>(dstK,    [](ScriptFieldID val) { return hidl_to_rs<RsScriptKernelID>(val); });
     std::vector<RsScriptFieldID>  _dstF    = hidl_to_rs<RsScriptFieldID>(dstF,     [](ScriptFieldID val) { return hidl_to_rs<RsScriptFieldID>(val); });
     std::vector<RsType>           _types   = hidl_to_rs<RsType>(types,             [](Type val) { return hidl_to_rs<RsType>(val); });
-    RsScriptGroup _scriptGroup = Device::getHal().ScriptGroupCreate(mContext, _kernels.data(), _kernels.size(), _srcK.data(), _srcK.size(), _dstK.data(), _dstK.size(), _dstF.data(), _dstF.size(), _types.data(), _types.size());
+    RsScriptGroup _scriptGroup = Device::getHal().ScriptGroupCreate(mContext, _kernels.data(), _kernels.size() * sizeof(RsScriptKernelID), _srcK.data(), _srcK.size() * sizeof(RsScriptKernelID), _dstK.data(), _dstK.size() * sizeof(RsScriptKernelID), _dstF.data(), _dstF.size() * sizeof(RsScriptFieldID), _types.data(), _types.size() * sizeof(RsType));
     return rs_to_hidl<ScriptGroup>(_scriptGroup);
 }
 
@@ -725,7 +725,7 @@
     size_t _len = data.size();
     RsElement _ve = hidl_to_rs<RsElement>(ve);
     const uint32_t* _dimsPtr = dims.data();
-    size_t _dimLen = dims.size();
+    size_t _dimLen = dims.size() * sizeof(uint32_t);
     Device::getHal().ScriptSetVarVE(mContext, _vs, _slot, _dataPtr, _len, _ve, _dimsPtr, _dimLen);
     return Void();
 }
diff --git a/renderscript/1.0/vts/functional/VtsCopyTests.cpp b/renderscript/1.0/vts/functional/VtsCopyTests.cpp
index 77217cb..168e681 100644
--- a/renderscript/1.0/vts/functional/VtsCopyTests.cpp
+++ b/renderscript/1.0/vts/functional/VtsCopyTests.cpp
@@ -43,9 +43,7 @@
     context->allocation1DWrite(allocation, 0, 0, (Size)dataIn.size(), _data);
     context->allocation1DRead(allocation, 0, 0, (uint32_t)dataOut.size(), (Ptr)dataOut.data(),
                               (Size)dataOut.size()*sizeof(float));
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                            [](float x){ static int val = 0; return x == (float)val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(dataIn, dataOut);
 }
 
 /*
@@ -76,9 +74,7 @@
                                _data, 0);
     context->allocation2DRead(allocation, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 128, 128,
                               (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(float), 0);
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                            [](float x){ static int val = 0; return x == (float)val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(dataIn, dataOut);
 }
 
 /*
@@ -108,9 +104,7 @@
     context->allocation3DWrite(allocation, 0, 0, 0, 0, 32, 32, 32, _data, 0);
     context->allocation3DRead(allocation, 0, 0, 0, 0, 32, 32, 32, (Ptr)dataOut.data(),
                               (Size)dataOut.size()*sizeof(float), 0);
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                            [](float x){ static int val = 0; return x == (float)val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(dataIn, dataOut);
 }
 
 /*
@@ -139,18 +133,14 @@
                                                                 AllocationMipmapControl::NONE,
                                                                 _data,
                                                                 (int)AllocationUsageType::SCRIPT);
-    EXPECT_NE(allocation, Allocation(0));
+    EXPECT_NE(Allocation(0), allocation);
 
     context->allocationCopyToBitmap(allocation, (Ptr)dataOut1.data(),
                                     (Size)dataOut1.size()*sizeof(float));
-    bool same1 = std::all_of(dataOut1.begin(), dataOut1.end(),
-                             [](float x){ static int val = 0; return x == (float)val++; });
-    EXPECT_EQ(true, same1);
+    EXPECT_EQ(dataIn, dataOut1);
 
     context->allocationRead(allocation, (Ptr)dataOut2.data(), (Size)dataOut2.size()*sizeof(float));
-    bool same2 = std::all_of(dataOut2.begin(), dataOut2.end(),
-                             [](float x){ static int val = 0; return x == (float)val++; });
-    EXPECT_EQ(true, same2);
+    EXPECT_EQ(dataIn, dataOut2);
 }
 
 /*
@@ -368,24 +358,20 @@
 /*
  * This test creates a complex element type (uint8_t, uint32_t) out of known
  * elements. It then verifies the element structure was created correctly.
- * Finally, the test creates a 128-wide, 1-dimension allocation of this type
- * and transfers memory to and from this structure.
+ * Finally, the test creates a 1-wide, 1-dimension allocation of this type
+ * and transfers memory to and from a single cell of this Allocation.
  *
  * Calls: elementCreate, elementComplexCreate, elementGetSubElements,
  * typeCreate, allocationCreateTyped, allocationElementWrite,
  * allocationElementRead
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
  */
-/*
 TEST_F(RenderscriptHidlTest, ComplexElementTest) {
     Element element1 = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 1);
     Element element2 = context->elementCreate(DataType::UNSIGNED_32, DataKind::USER, false, 1);
 
     hidl_vec<Element> eins = {element1, element2};
     hidl_vec<hidl_string> names = {hidl_string("first"), hidl_string("second")};
-    hidl_vec<Size> arraySizesPtr = {sizeof(uint8_t), sizeof(uint32_t)};
+    hidl_vec<Size> arraySizesPtr = {1, 1};
     Element element3 = context->elementComplexCreate(eins, names, arraySizesPtr);
     EXPECT_NE(Element(0), element3);
 
@@ -400,28 +386,25 @@
                                                         namesOut.push_back(_names[1]);
                                                         arraySizesOut = _arraySizes;
                                                     });
-    EXPECT_NE(Element(0), ids[0]);
-    EXPECT_NE(Element(0), ids[1]);
+    EXPECT_EQ(element1, ids[0]);
+    EXPECT_EQ(element2, ids[1]);
     EXPECT_EQ("first", namesOut[0]);
     EXPECT_EQ("second", namesOut[1]);
-    EXPECT_EQ(sizeof(uint8_t), arraySizesOut[0]);
-    EXPECT_EQ(sizeof(uint32_t), arraySizesOut[1]);
+    EXPECT_EQ(Size(1), arraySizesOut[0]);
+    EXPECT_EQ(Size(1), arraySizesOut[1]);
 
-    // 128 x (uint8_t, uint32_t)
-    Type type = context->typeCreate(element3, 128, 0, 0, false, false, YuvFormat::YUV_NONE);
-    // 128 x (uint8_t, uint32_t)
+    // 1 x (uint8_t, uint32_t)
+    Type type = context->typeCreate(element3, 1, 0, 0, false, false, YuvFormat::YUV_NONE);
+    // 1 x (uint8_t, uint32_t)
     Allocation allocation = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
                                                            (int)AllocationUsageType::SCRIPT,
                                                            (Ptr)nullptr);
-    std::vector<uint32_t> dataIn(128), dataOut(128);
+    std::vector<uint32_t> dataIn(1), dataOut(1);
     std::generate(dataIn.begin(), dataIn.end(), [](){ static uint32_t val = 0; return val++; });
     hidl_vec<uint8_t> _data;
     _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size()*sizeof(uint32_t));
     context->allocationElementWrite(allocation, 0, 0, 0, 0, _data, 1);
     context->allocationElementRead(allocation, 0, 0, 0, 0, (Ptr)dataOut.data(),
                                    (Size)dataOut.size()*sizeof(uint32_t), 1);
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                            [](uint32_t x){ static uint32_t val = 0; return x == val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(dataIn, dataOut);
 }
-*/
diff --git a/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h b/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h
index fc1b7e4..527fef0 100644
--- a/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h
+++ b/renderscript/1.0/vts/functional/VtsHalRenderscriptV1_0TargetTest.h
@@ -32,6 +32,7 @@
 using ::android::hardware::renderscript::V1_0::AllocationCubemapFace;
 using ::android::hardware::renderscript::V1_0::AllocationMipmapControl;
 using ::android::hardware::renderscript::V1_0::AllocationUsageType;
+using ::android::hardware::renderscript::V1_0::Closure;
 using ::android::hardware::renderscript::V1_0::IContext;
 using ::android::hardware::renderscript::V1_0::IDevice;
 using ::android::hardware::renderscript::V1_0::ContextType;
@@ -62,7 +63,26 @@
 using ::android::hardware::hidl_string;
 using ::android::sp;
 
-// bitcode variables
+// bitcode slots
+extern const int mExportVarIdx_var_int;
+extern const int mExportVarIdx_var_long;
+extern const int mExportVarIdx_var_float;
+extern const int mExportVarIdx_var_double;
+extern const int mExportVarIdx_var_allocation;
+extern const int mExportVarIdx_var_uint32_t;
+extern const int mExportVarIdx_var_point2;
+extern const int mExportVarIdx_var_int_ptr;
+// bitcode invoke slots
+//extern const int mExportForEachIdx_root;
+extern const int mExportForEachIdx_increment;
+// bitcode reduce slots
+extern const int mExportReduceIdx_summation;
+// bitcode invoke slots
+extern const int mExportFuncIdx_function;
+extern const int mExportFuncIdx_functionV;
+extern const int mExportFuncIdx_setBuffer;
+extern const int mExportFuncIdx_setAllocation;
+// bitcode
 typedef signed char int8_t;
 extern const int8_t bitCode[];
 extern const int bitCodeLength;
diff --git a/renderscript/1.0/vts/functional/VtsMiscellaneousTests.cpp b/renderscript/1.0/vts/functional/VtsMiscellaneousTests.cpp
index c2b3354..39d63ca 100644
--- a/renderscript/1.0/vts/functional/VtsMiscellaneousTests.cpp
+++ b/renderscript/1.0/vts/functional/VtsMiscellaneousTests.cpp
@@ -15,6 +15,7 @@
  */
 
 #include "VtsHalRenderscriptV1_0TargetTest.h"
+#include <system/window.h>
 
 /*
  * ContextCreateAndDestroy:
@@ -81,7 +82,7 @@
                                           elementMetadata = _metadata; });
     EXPECT_EQ(DataType::FLOAT_32, (DataType)elementMetadata[0]);
     EXPECT_EQ(DataKind::USER, (DataKind)elementMetadata[1]);
-    EXPECT_EQ(false, ((uint32_t)elementMetadata[2] == 1) ? true : false);
+    EXPECT_EQ(false, elementMetadata[2]);
     EXPECT_EQ(1u, (uint32_t)elementMetadata[3]);
     EXPECT_EQ(0u, (uint32_t)elementMetadata[4]);
 
@@ -134,21 +135,17 @@
  * Calls: elementCreate, typeCreate, allocationCreateTyped, allocation2DWrite,
  * allocationGetNativeWindow, allocationSetNativeWindow, allocationIoSend,
  * allocationIoReceive, allocation2DRead
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
  */
-/*
 TEST_F(RenderscriptHidlTest, NativeWindowIoTest) {
     // uint8x4
     Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 4);
     // 512 x 512 x uint8x4
     Type type = context->typeCreate(element, 512, 512, 0, false, false, YuvFormat::YUV_NONE);
     std::vector<uint32_t> dataIn(512*512), dataOut(512*512);
-    std::generate(dataIn.begin(), dataIn.end(), [](){ static int val = 0; return (uint32_t)val++; });
+    std::generate(dataIn.begin(), dataIn.end(), [](){ static uint32_t val = 0; return val++; });
     hidl_vec<uint8_t> _data;
     _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size()*sizeof(uint32_t));
-    // 512 x 512 x float1
+    // 512 x 512 x uint8x4
     Allocation allocationRecv = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
                                                                (int)(AllocationUsageType::SCRIPT
                                                                | AllocationUsageType::IO_INPUT),
@@ -157,21 +154,20 @@
                                                                (int)(AllocationUsageType::SCRIPT
                                                                | AllocationUsageType::IO_OUTPUT),
                                                                (Ptr)nullptr);
-    context->allocation2DWrite(allocationSend, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
-                               _data, 0);
     NativeWindow nativeWindow = context->allocationGetNativeWindow(allocationRecv);
     EXPECT_NE(NativeWindow(0), nativeWindow);
 
+    ((ANativeWindow *)nativeWindow)->incStrong(nullptr);
+
     context->allocationSetNativeWindow(allocationSend, nativeWindow);
+    context->allocation2DWrite(allocationSend, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
+                               _data, 0);
     context->allocationIoSend(allocationSend);
     context->allocationIoReceive(allocationRecv);
     context->allocation2DRead(allocationRecv, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
                               (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(uint32_t), 0);
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                             [](uint32_t x){ static int val = 0; return x == (uint32_t)val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(dataIn, dataOut);
 }
-*/
 
 /*
  * Three allocations are created, two with IO_INPUT and one with IO_OUTPUT. The
@@ -180,21 +176,17 @@
  * Calls: elementCreate, typeCreate, allocationCreateTyped,
  * allocationCreateFromBitmap, allocationSetupBufferQueue,
  * allocationShareBufferQueue
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
  */
-/*
 TEST_F(RenderscriptHidlTest, BufferQueueTest) {
-    // float1
-    Element element = context->elementCreate(DataType::FLOAT_32, DataKind::USER, false, 1);
-    // 512 x 512 x float1
+    // uint8x4
+    Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 4);
+    // 512 x 512 x uint8x4
     Type type = context->typeCreate(element, 512, 512, 0, false, false, YuvFormat::YUV_NONE);
-    std::vector<float> dataIn(512*512), dataOut1(512*512), dataOut2(512*512);
-    std::generate(dataIn.begin(), dataIn.end(), [](){ static int val = 0; return (float)val++; });
+    std::vector<uint32_t> dataIn(512*512), dataOut1(512*512), dataOut2(512*512);
+    std::generate(dataIn.begin(), dataIn.end(), [](){ static uint32_t val = 0; return val++; });
     hidl_vec<uint8_t> _data;
-    _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size()*sizeof(float));
-    // 512 x 512 x float1
+    _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size()*sizeof(uint32_t));
+    // 512 x 512 x uint8x4
     Allocation allocationRecv1 = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
                                                                 (int)(AllocationUsageType::SCRIPT
                                                                 | AllocationUsageType::IO_INPUT),
@@ -203,16 +195,37 @@
                                                                 (int)(AllocationUsageType::SCRIPT
                                                                 | AllocationUsageType::IO_INPUT),
                                                                 (Ptr)nullptr);
-    Allocation allocationSend = context->allocationCreateFromBitmap(type,
-                                                                    AllocationMipmapControl::NONE,
-                                                                    _data,
-                                                                   (int)(AllocationUsageType::SCRIPT
-                                                                 | AllocationUsageType::IO_OUTPUT));
+    Allocation allocationSend  = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
+                                                                (int)(AllocationUsageType::SCRIPT
+                                                                | AllocationUsageType::IO_INPUT),
+                                                                (Ptr)nullptr);
     context->allocationSetupBufferQueue(allocationRecv1, 2);
-    context->allocationShareBufferQueue(allocationRecv1, allocationRecv2);
-    // TODO: test the buffer queue
+    context->allocationShareBufferQueue(allocationRecv2, allocationRecv1);
+
+    NativeWindow nativeWindow1 = context->allocationGetNativeWindow(allocationRecv1);
+    EXPECT_NE(NativeWindow(0), nativeWindow1);
+    NativeWindow nativeWindow2 = context->allocationGetNativeWindow(allocationRecv2);
+    EXPECT_EQ(nativeWindow2, nativeWindow1);
+
+    ((ANativeWindow *)nativeWindow1)->incStrong(nullptr);
+
+    context->allocationSetNativeWindow(allocationSend, nativeWindow1);
+    context->allocation2DWrite(allocationSend, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
+                               _data, 0);
+    context->allocationIoSend(allocationSend);
+    context->allocationIoReceive(allocationRecv1);
+    context->allocation2DRead(allocationRecv1, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
+                              (Ptr)dataOut1.data(), (Size)dataOut1.size()*sizeof(uint32_t), 0);
+    EXPECT_EQ(dataIn, dataOut1);
+
+    context->allocation2DWrite(allocationSend, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
+                               _data, 0);
+    context->allocationIoSend(allocationSend);
+    context->allocationIoReceive(allocationRecv2);
+    context->allocation2DRead(allocationRecv2, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 512, 512,
+                              (Ptr)dataOut2.data(), (Size)dataOut2.size()*sizeof(uint32_t), 0);
+    EXPECT_EQ(dataIn, dataOut2);
 }
-*/
 
 /*
  * This test sets up the message queue, sends a message, peeks at the message,
@@ -220,33 +233,29 @@
  *
  * Calls: contextInitToClient, contextSendMessage, contextPeekMessage,
  * contextGetMessage, contextDeinitToClient, contextLog
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
  */
-/*
 TEST_F(RenderscriptHidlTest, ContextMessageTest) {
     context->contextInitToClient();
 
-    std::string messageOut = "correct";
+    const char * message = "correct";
+    std::vector<char> messageSend(message, message + sizeof(message));
     hidl_vec<uint8_t> _data;
-    _data.setToExternal((uint8_t*)const_cast<char*>(messageOut.c_str()), messageOut.length());
+    _data.setToExternal((uint8_t*)messageSend.data(), messageSend.size());
     context->contextSendMessage(0, _data);
     MessageToClientType messageType;
     size_t size;
     uint32_t subID;
     context->contextPeekMessage([&](MessageToClientType _type, Size _size, uint32_t _subID){
                                 messageType = _type; size = (uint32_t)_size; subID = _subID; });
-    std::vector<char> messageIn(size, '\0');
-    context->contextGetMessage(messageIn.data(), messageIn.size(),
+    std::vector<char> messageRecv(size, '\0');
+    context->contextGetMessage(messageRecv.data(), messageRecv.size(),
                                [&](MessageToClientType _type, Size _size){
                                messageType = _type; size = (uint32_t)_size; });
-    EXPECT_EQ(messageOut, messageIn.data());
+    EXPECT_EQ(messageSend, messageRecv);
 
     context->contextDeinitToClient();
     context->contextLog();
 }
-*/
 
 /*
  * Call through a bunch of APIs and make sure they don’t crash. Assign the name
diff --git a/renderscript/1.0/vts/functional/VtsScriptTests.cpp b/renderscript/1.0/vts/functional/VtsScriptTests.cpp
index 9531e19..6bb375a 100644
--- a/renderscript/1.0/vts/functional/VtsScriptTests.cpp
+++ b/renderscript/1.0/vts/functional/VtsScriptTests.cpp
@@ -46,27 +46,30 @@
     EXPECT_NE(Script(0), script);
 
     // arg tests
-    context->scriptSetVarI(script, 0, 100);
+    context->scriptSetVarI(script, mExportVarIdx_var_int, 100);
     int resultI = 0;
-    context->scriptGetVarV(script, 0, sizeof(int), [&](const hidl_vec<uint8_t>& _data){
-                               resultI = *((int*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_int, sizeof(int),
+                           [&](const hidl_vec<uint8_t>& _data){ resultI = *((int*)_data.data()); });
     EXPECT_EQ(100, resultI);
 
-    context->scriptSetVarJ(script, 1, 101l);
+    context->scriptSetVarJ(script, mExportVarIdx_var_long, 101l);
     int resultJ = 0;
-    context->scriptGetVarV(script, 1, sizeof(long), [&](const hidl_vec<uint8_t>& _data){
+    context->scriptGetVarV(script, mExportVarIdx_var_long, sizeof(long),
+                           [&](const hidl_vec<uint8_t>& _data){
                                resultJ = *((long*)_data.data()); });
-    EXPECT_EQ(101, resultJ);
+    EXPECT_EQ(101l, resultJ);
 
-    context->scriptSetVarF(script, 2, 102.0f);
+    context->scriptSetVarF(script, mExportVarIdx_var_float, 102.0f);
     int resultF = 0.0f;
-    context->scriptGetVarV(script, 2, sizeof(float), [&](const hidl_vec<uint8_t>& _data){
+    context->scriptGetVarV(script, mExportVarIdx_var_float, sizeof(float),
+                           [&](const hidl_vec<uint8_t>& _data){
                                resultF = *((float*)_data.data()); });
     EXPECT_EQ(102.0f, resultF);
 
-    context->scriptSetVarD(script, 3, 103.0);
+    context->scriptSetVarD(script, mExportVarIdx_var_double, 103.0);
     int resultD = 0.0;
-    context->scriptGetVarV(script, 3, sizeof(double), [&](const hidl_vec<uint8_t>& _data){
+    context->scriptGetVarV(script, mExportVarIdx_var_double, sizeof(double),
+                           [&](const hidl_vec<uint8_t>& _data){
                                resultD = *((double*)_data.data()); });
     EXPECT_EQ(103.0, resultD);
 
@@ -79,23 +82,21 @@
                                                              (int)AllocationUsageType::SCRIPT,
                                                              (Ptr)nullptr);
     Allocation allocationOut = Allocation(0);
-    context->scriptSetVarObj(script, 4, (ObjectBase)allocationIn);
-    context->scriptGetVarV(script, 4, sizeof(ObjectBase), [&](const hidl_vec<uint8_t>& _data){
+    context->scriptSetVarObj(script, mExportVarIdx_var_allocation, (ObjectBase)allocationIn);
+    context->scriptGetVarV(script, mExportVarIdx_var_allocation, sizeof(ObjectBase),
+                           [&](const hidl_vec<uint8_t>& _data){
                                allocationOut = (Allocation) *((ObjectBase*)_data.data()); });
     EXPECT_EQ(allocationOut, allocationIn);
 
-    std::vector<int> arrayIn = {500, 501, 502, 503};
-    std::vector<int> arrayOut(4);
-    hidl_vec<uint8_t> arrayData;
-    arrayData.setToExternal((uint8_t*)arrayIn.data(), arrayIn.size()*sizeof(int));
-    context->scriptSetVarV(script, 5, arrayData);
-    context->scriptGetVarV(script, 5, 4*sizeof(int), [&](const hidl_vec<uint8_t>& _data){
-                               arrayOut = std::vector<int>((int*)_data.data(),
-                                                           (int*)_data.data() + 4); });
-    EXPECT_EQ(500, arrayOut[0]);
-    EXPECT_EQ(501, arrayOut[1]);
-    EXPECT_EQ(502, arrayOut[2]);
-    EXPECT_EQ(503, arrayOut[3]);
+    uint32_t valueV = 104u;
+    hidl_vec<uint8_t> _dataV;
+    _dataV.setToExternal((uint8_t*)&valueV, sizeof(uint32_t));
+    context->scriptSetVarV(script, mExportVarIdx_var_uint32_t, _dataV);
+    uint32_t resultV = 0u;
+    context->scriptGetVarV(script, mExportVarIdx_var_uint32_t, sizeof(uint32_t),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultV = *((uint32_t*)_data.data()); });
+    EXPECT_EQ(104u, resultV);
 
     std::vector<int> dataVE = {1000, 1001};
     std::vector<uint32_t> dimsVE = {1};
@@ -104,12 +105,13 @@
     hidl_vec<uint32_t> _dimsVE;
     _dataVE.setToExternal((uint8_t*)dataVE.data(), dataVE.size()*sizeof(int));
     _dimsVE.setToExternal((uint32_t*)dimsVE.data(), dimsVE.size());
-    // intx2
+    // intx2 to represent point2 which is {int, int}
     Element elementVE = context->elementCreate(DataType::SIGNED_32, DataKind::USER, false, 2);
-    context->scriptSetVarVE(script, 6, _dataVE, elementVE, _dimsVE);
-    context->scriptGetVarV(script, 6, 2*sizeof(int), [&](const hidl_vec<uint8_t>& _data){
-                               outVE = std::vector<int>((int*)_data.data(),
-                                                        (int*)_data.data() + 2); });
+    context->scriptSetVarVE(script, mExportVarIdx_var_point2, _dataVE, elementVE, _dimsVE);
+    context->scriptGetVarV(script, mExportVarIdx_var_point2, 2*sizeof(int),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               outVE = std::vector<int>(
+                                   (int*)_data.data(), (int*)_data.data() + 2); });
     EXPECT_EQ(1000, outVE[0]);
     EXPECT_EQ(1001, outVE[1]);
 }
@@ -127,19 +129,47 @@
     EXPECT_NE(Script(0), script);
 
     // invoke test
-    int function_res = 0;
-    context->scriptInvoke(script, 0);
-    context->scriptGetVarV(script, 0, sizeof(int), [&](const hidl_vec<uint8_t>& _data){
-                               function_res = *((int*)_data.data()); });
-    EXPECT_NE(100, function_res);
+    int resultI = 0;
+    long resultJ = 0l;
+    float resultF = 0.0f;
+    double resultD = 0.0;
+    uint32_t resultV = 0u;
+    std::vector<int> resultVE(2);
+    context->scriptInvoke(script, mExportFuncIdx_function);
+    context->scriptGetVarV(script, mExportVarIdx_var_int, sizeof(int),
+                           [&](const hidl_vec<uint8_t>& _data){ resultI = *((int*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_long, sizeof(long),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultJ = *((long*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_float, sizeof(float),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultF = *((float*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_double, sizeof(double),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultD = *((double*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_uint32_t, sizeof(uint32_t),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultV = *((uint32_t*)_data.data()); });
+    context->scriptGetVarV(script, mExportVarIdx_var_point2, 2*sizeof(int),
+                           [&](const hidl_vec<uint8_t>& _data){
+                               resultVE = std::vector<int>(
+                                   (int*)_data.data(), (int*)_data.data() + 2); });
+    EXPECT_EQ(1, resultI);
+    EXPECT_EQ(2l, resultJ);
+    EXPECT_EQ(3.0f, resultF);
+    EXPECT_EQ(4.0, resultD);
+    EXPECT_EQ(5u, resultV);
+    EXPECT_EQ(6, resultVE[0]);
+    EXPECT_EQ(7, resultVE[1]);
 
     // invokeV test
     int functionV_arg = 5;
     int functionV_res = 0;
     hidl_vec<uint8_t> functionV_data;
     functionV_data.setToExternal((uint8_t*)&functionV_arg, sizeof(int));
-    context->scriptInvokeV(script, 1, functionV_data);
-    context->scriptGetVarV(script, 0, sizeof(int), [&](const hidl_vec<uint8_t>& _data){
+    context->scriptInvokeV(script, mExportFuncIdx_functionV, functionV_data);
+    context->scriptGetVarV(script, mExportVarIdx_var_int, sizeof(int),
+                           [&](const hidl_vec<uint8_t>& _data){
                                functionV_res = *((int*)_data.data()); });
     EXPECT_EQ(5, functionV_res);
 }
@@ -161,8 +191,9 @@
     Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 1);
     // 64 x uint8_t
     Type type = context->typeCreate(element, 64, 0, 0, false, false, YuvFormat::YUV_NONE);
-    std::vector<uint8_t> dataIn(64), dataOut(64);
+    std::vector<uint8_t> dataIn(64), dataOut(64), expected(64);
     std::generate(dataIn.begin(), dataIn.end(), [](){ static uint8_t val = 0; return val++; });
+    std::generate(expected.begin(), expected.end(), [](){ static uint8_t val = 1; return val++; });
     hidl_vec<uint8_t> _data;
     _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size());
     // 64 x float1
@@ -176,11 +207,9 @@
     hidl_vec<Allocation> vains;
     vains.setToExternal(&allocation, 1);
     hidl_vec<uint8_t> params;
-    context->scriptForEach(script, 1, vains, vout, params, nullptr);
+    context->scriptForEach(script, mExportForEachIdx_increment, vains, vout, params, nullptr);
     context->allocationRead(vout, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(uint8_t));
-    bool same = std::all_of(dataOut.begin(), dataOut.end(),
-                            [](uint8_t x){ static uint8_t val = 1; return x == val++; });
-    EXPECT_EQ(true, same);
+    EXPECT_EQ(expected, dataOut);
 }
 
 /*
@@ -215,7 +244,7 @@
     context->allocation1DWrite(allocation, 0, 0, (Size)dataIn.size(), _data);
     hidl_vec<Allocation> vains;
     vains.setToExternal(&allocation, 1);
-    context->scriptReduce(script, 0, vains, vaout, nullptr);
+    context->scriptReduce(script, mExportReduceIdx_summation, vains, vaout, nullptr);
     context->contextFinish();
     context->allocationRead(vaout, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(int));
     // sum of 0, 1, 2, ..., 62, 63
@@ -228,38 +257,34 @@
  * RenderScript script, represented in the bitcode.
  *
  * Calls: scriptCCreate, elementCreate, typeCreate, allocationCreateTyped,
- * allocationGetPointer, scriptBindAllocation
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
+ * scriptSetVarV, scriptBindAllocation, allocationRead
  */
-/*
 TEST_F(RenderscriptHidlTest, ScriptBindTest) {
     hidl_vec<uint8_t> bitcode;
     bitcode.setToExternal((uint8_t*)bitCode, bitCodeLength);
     Script script = context->scriptCCreate("struct_test", "/data/local/tmp/", bitcode);
     EXPECT_NE(Script(0), script);
 
-    // uint8_t
+    // in32
     Element element = context->elementCreate(DataType::SIGNED_32, DataKind::USER, false, 1);
-    // 64 x uint8_t
+    // 64 x int32
     Type type = context->typeCreate(element, 64, 0, 0, false, false, YuvFormat::YUV_NONE);
-    // 64 x float1
+    // 64 x int32
     Allocation allocation = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
                                                            (int)AllocationUsageType::SCRIPT,
                                                            (Ptr)nullptr);
-    Ptr dataPtr1, dataPtr2;
-    Size stride;
-    context->allocationGetPointer(allocation, 0, AllocationCubemapFace::POSITIVE_X, 0,
-                                  [&](Ptr _dataPtr, Size _stride){ dataPtr1 = _dataPtr;
-                                      stride = _stride; });
-    context->scriptBindAllocation(script, allocation, 7);
-    context->allocationGetPointer(allocation, 0, AllocationCubemapFace::POSITIVE_X, 0,
-                                  [&](Ptr _dataPtr, Size _stride){ dataPtr2 = _dataPtr;
-                                      stride = _stride; });
-    EXPECT_NE(dataPtr1, dataPtr2);
+    std::vector<int> dataIn(64), dataOut(64), expected(64, 5);
+    hidl_vec<uint8_t> _data;
+    _data.setToExternal((uint8_t*)dataIn.data(), dataIn.size()*sizeof(int));
+    context->allocation1DWrite(allocation, 0, 0, (Size)dataIn.size(), _data);
+    context->scriptBindAllocation(script, allocation, mExportVarIdx_var_int_ptr);
+    int dim = 64;
+    hidl_vec<uint8_t> _dim;
+    _dim.setToExternal((uint8_t*)&dim, sizeof(int));
+    context->scriptInvokeV(script, mExportFuncIdx_setBuffer, _dim);
+    context->allocationRead(allocation, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(int));
+    EXPECT_EQ(expected, dataOut);
 }
-*/
 
 /*
  * This test groups together two RenderScript intrinsic kernels to run one after
@@ -269,38 +294,25 @@
  * ScriptGroup.
  *
  * Calls: elementCreate, typeCreate, allocationCreateTyped, allocation2DWrite,
- * scriptIntrinsicCreate, scriptKernelIDCreate, scriptGroupCreate,
- * scriptGroupSetInput, scriptGroupSetOutput, scriptGroupExecute,
- * allocation2DRead
- *
- * This test currently has a bug, and should be fixed by 3/17.
- * TODO(butlermichael)
+ * scriptIntrinsicCreate, scriptKernelIDCreate, scriptFieldIDCreate,
+ * scriptGroupCreate, scriptGroupSetOutput, scriptGroupExecute, allocation2DRead
  */
-/*
 TEST_F(RenderscriptHidlTest, ScriptGroupTest) {
-    //std::vector<uint8_t> dataIn(256*256*1, 128), dataOut(256*256*3, 0);
-    std::vector<uint8_t> dataIn(256*256*1, 128), dataOut(256*256*4, 0);
+    std::vector<uint8_t> dataIn(256*256*1, 128), dataOut(256*256*4, 0), zeros(256*256*4, 0);
     hidl_vec<uint8_t> _dataIn, _dataOut;
     _dataIn.setToExternal(dataIn.data(), dataIn.size());
-    _dataOut.setToExternal(dataOut.data(), dataIn.size());
+    _dataOut.setToExternal(dataOut.data(), dataOut.size());
 
     // 256 x 256 YUV pixels
     Element element1 = context->elementCreate(DataType::UNSIGNED_8, DataKind::PIXEL_YUV, true, 1);
-    //Type type1 = context->typeCreate(element1, 256, 256, 0, false, false, YuvFormat::YUV_420_888);
-    Type type1 = context->typeCreate(element1, 256, 256, 0, false, false, YuvFormat::YUV_NV21);
+    Type type1 = context->typeCreate(element1, 256, 256, 0, false, false, YuvFormat::YUV_420_888);
     Allocation allocation1 = context->allocationCreateTyped(type1, AllocationMipmapControl::NONE,
                                                            (int)AllocationUsageType::SCRIPT,
                                                            (Ptr)nullptr);
     context->allocation2DWrite(allocation1, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 256, 256,
                                _dataIn, 0);
-    Script yuv2rgb = context->scriptIntrinsicCreate(ScriptIntrinsicID::ID_YUV_TO_RGB, element1);
-    EXPECT_NE(Script(0), yuv2rgb);
 
-    ScriptKernelID yuv2rgbKID = context->scriptKernelIDCreate(yuv2rgb, 0, 2);
-    EXPECT_NE(ScriptKernelID(0), yuv2rgbKID);
-
-    // 256 x 256 RGB pixels
-    //Element element2 = context->elementCreate(DataType::UNSIGNED_8, DataKind::PIXEL_RGB, true, 3);
+    // 256 x 256 RGBA pixels
     Element element2 = context->elementCreate(DataType::UNSIGNED_8, DataKind::PIXEL_RGBA, true, 4);
     Type type2 = context->typeCreate(element2, 256, 256, 0, false, false, YuvFormat::YUV_NONE);
     Allocation allocation2 = context->allocationCreateTyped(type2, AllocationMipmapControl::NONE,
@@ -308,83 +320,170 @@
                                                            (Ptr)nullptr);
     context->allocation2DWrite(allocation2, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 256, 256,
                                _dataOut, 0);
+
+    // create scripts
+    Script yuv2rgb = context->scriptIntrinsicCreate(ScriptIntrinsicID::ID_YUV_TO_RGB, element1);
+    EXPECT_NE(Script(0), yuv2rgb);
+
+    ScriptKernelID yuv2rgbKID = context->scriptKernelIDCreate(yuv2rgb, 0, 2);
+    EXPECT_NE(ScriptKernelID(0), yuv2rgbKID);
+
     Script blur = context->scriptIntrinsicCreate(ScriptIntrinsicID::ID_BLUR, element2);
     EXPECT_NE(Script(0), blur);
 
     ScriptKernelID blurKID = context->scriptKernelIDCreate(blur, 0, 2);
     EXPECT_NE(ScriptKernelID(0), blurKID);
+    ScriptFieldID blurFID = context->scriptFieldIDCreate(blur, 1);
+    EXPECT_NE(ScriptFieldID(0), blurFID);
 
     // ScriptGroup
     hidl_vec<ScriptKernelID> kernels = {yuv2rgbKID, blurKID};
     hidl_vec<ScriptKernelID> srcK = {yuv2rgbKID};
-    hidl_vec<ScriptKernelID> dstK = {blurKID};
-    hidl_vec<ScriptFieldID> dstF = {};
+    hidl_vec<ScriptKernelID> dstK = {ScriptKernelID(0)};
+    hidl_vec<ScriptFieldID> dstF = {blurFID};
     hidl_vec<Type> types = {type2};
     ScriptGroup scriptGroup = context->scriptGroupCreate(kernels, srcK, dstK, dstF, types);
     EXPECT_NE(ScriptGroup(0), scriptGroup);
 
-    context->scriptGroupSetInput(scriptGroup, yuv2rgbKID, allocation1);
+    context->scriptSetVarObj(yuv2rgb, 0, (ObjectBase)allocation1);
     context->scriptGroupSetOutput(scriptGroup, blurKID, allocation2);
     context->scriptGroupExecute(scriptGroup);
+    context->contextFinish();
 
     // verify contents were changed
     context->allocation2DRead(allocation2, 0, 0, 0, AllocationCubemapFace::POSITIVE_X, 256, 256,
                               (Ptr)dataOut.data(), (Size)dataOut.size(), 0);
-    bool same = std::all_of(dataOut.begin(), dataOut.end(), [](uint8_t x){ return x != 0; });
-    EXPECT_EQ(true, same);
+    EXPECT_NE(zeros, dataOut);
 }
-*/
 
 /*
  * Similar to the ScriptGroup test, this test verifies the execution flow of
  * RenderScript kernels and invokables.
  *
  * Calls: scriptFieldIDCreate, closureCreate, scriptInvokeIDCreate,
- * invokeClosureCreate, closureSetArg, closureSetGlobal, scriptGroup2Create,
- * scriptGroupExecute
- *
- * This test currently still a work in progress, and should be finished by 3/17.
- * TODO(butlermichael)
+ * invokeClosureCreate, closureSetGlobal, scriptGroup2Create, scriptGroupExecute
  */
-/*
 TEST_F(RenderscriptHidlTest, ScriptGroup2Test) {
+    hidl_vec<uint8_t> bitcode;
+    bitcode.setToExternal((uint8_t*)bitCode, bitCodeLength);
+    Script script = context->scriptCCreate("struct_test", "/data/local/tmp/", bitcode);
+    EXPECT_NE(Script(0), script);
 
-    ScriptFieldID fieldID = context->scriptFieldIDCreate(script, slot);
+    std::vector<uint8_t> dataIn(128, 128), dataOut(128, 0), expected(128, 7+1);
+    hidl_vec<uint8_t> _dataIn, _dataOut;
+    _dataIn.setToExternal(dataIn.data(), dataIn.size());
+
+    // 256 x 256 YUV pixels
+    Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 1);
+    Type type = context->typeCreate(element, 128, 0, 0, false, false, YuvFormat::YUV_NONE);
+    Allocation allocation = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
+                                                           (int)AllocationUsageType::SCRIPT,
+                                                           (Ptr)nullptr);
+    context->allocation1DWrite(allocation, 0, 0, (Size)_dataIn.size(), _dataIn);
+
+    ScriptFieldID fieldID = context->scriptFieldIDCreate(script, mExportVarIdx_var_allocation);
     EXPECT_NE(ScriptFieldID(0), fieldID);
+    ASSERT_NE(ScriptFieldID(0), fieldID);
 
-    ScriptKernelID kernelID = context->scriptKernelIDCreate(script, slot, sig);
-    EXPECT_NE(ScriptKernelID(0), kernelID);
-
-    Allocation returnValue = 0;
-    hidl_vec<ScriptFieldID> fieldIDS = {};
-    hidl_vec<int64_t> values = {};
-    hidl_vec<int32_t> sizes = {};
-    hidl_veC<Closure> depClosures = {};
-    hidl_vec<ScriptFieldID> depFieldIDS = {};
-    Closure closure1 = context->closureCreate(kernelID, returnValue, fieldIDS, values, sizes,
-                                             depClosures, depFieldIDS);
-    EXPECT_NE(Closure(0), closure1);
-
-    ScriptInvokeID invokeID = context->scriptInvokeIDCreate(script, slot);
+    // invoke
+    ScriptInvokeID invokeID = context->scriptInvokeIDCreate(script, mExportFuncIdx_setAllocation);
     EXPECT_NE(ScriptInvokeID(0), invokeID);
+    ASSERT_NE(ScriptInvokeID(0), invokeID);
 
-    hidl_vec<uint8_t> params = {};
-    hidl_vec<ScriptFieldID> fieldsIDS2 = {};
-    hidl_vec<int64_t> values2 = {};
-    hidl_vec<int32_t> sizes2 = {};
-    Closure closure2 = context->invokeClosureCreate(invokeID, params, fieldIDS2, values2, sizes2);
+    int dim = 128;
+    hidl_vec<uint8_t> params;
+    params.setToExternal((uint8_t*)&dim, sizeof(dim));
+    hidl_vec<ScriptFieldID> fieldIDS1 = {fieldID};
+    hidl_vec<int64_t> values1 = {int64_t(0)};
+    hidl_vec<int32_t> sizes1 = {int32_t(0)};
+    Closure closure1 = context->invokeClosureCreate(invokeID, params, fieldIDS1, values1, sizes1);
+    EXPECT_NE(Closure(0), closure1);
+    ASSERT_NE(Closure(0), closure1);
+
+    // kernel
+    ScriptKernelID kernelID = context->scriptKernelIDCreate(script, mExportForEachIdx_increment, 3);
+    EXPECT_NE(ScriptKernelID(0), kernelID);
+    ASSERT_NE(ScriptKernelID(0), kernelID);
+
+    hidl_vec<ScriptFieldID> fieldIDS2 = {ScriptFieldID(0)};
+    hidl_vec<int64_t> values2 = {(int64_t)(intptr_t)allocation};
+    hidl_vec<int32_t> sizes2 = {-1 /* allocation */};
+    hidl_vec<Closure> depClosures2 = {closure1};
+    hidl_vec<ScriptFieldID> depFieldIDS2 = {fieldID};
+    Closure closure2 = context->closureCreate(kernelID, allocation /* returnValue */, fieldIDS2,
+                                              values2, sizes2, depClosures2, depFieldIDS2);
     EXPECT_NE(Closure(0), closure2);
+    ASSERT_NE(Closure(0), closure2);
 
-    context->closureSetArg(closure, index, value, size);
-    context->closureSetGlobal(closure, fieldID, value, size);
+    // set argument
+    context->closureSetGlobal(closure1, fieldID, (int64_t)(intptr_t)allocation,
+                              -1 /* allocation */);
 
+    // execute
     hidl_string name = "script_group_2_test";
-    hidl_string cacheDir = "data/local/tmp/";
-    hidl_vec<Closures> closures;
+    hidl_string cacheDir = "/data/local/tmp";
+    hidl_vec<Closure> closures = {closure1, closure2};
     ScriptGroup2 scriptGroup2 = context->scriptGroup2Create(name, cacheDir, closures);
     EXPECT_NE(ScriptGroup2(0), scriptGroup2);
+    ASSERT_NE(ScriptGroup2(0), scriptGroup2);
 
     context->scriptGroupExecute(scriptGroup2);
-    // verify script group launched...
+    context->allocationRead(allocation, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(uint8_t));
+    EXPECT_EQ(expected, dataOut);
 }
-*/
+
+/*
+ * Similar to the ScriptGroup test, this test verifies a single kernel can be
+ * called by ScriptGroup with an unbound allocation specified before launch
+ *
+ * Calls: scriptFieldIDCreate, closureCreate, scriptInvokeIDCreate,
+ * invokeClosureCreate, closureSetArg, scriptGroup2Create, scriptGroupExecute
+ */
+TEST_F(RenderscriptHidlTest, ScriptGroup2KernelTest) {
+    hidl_vec<uint8_t> bitcode;
+    bitcode.setToExternal((uint8_t*)bitCode, bitCodeLength);
+    Script script = context->scriptCCreate("struct_test", "/data/local/tmp/", bitcode);
+    EXPECT_NE(Script(0), script);
+
+    std::vector<uint8_t> dataIn(128, 128), dataOut(128, 0), expected(128, 128 + 1);
+    hidl_vec<uint8_t> _dataIn, _dataOut;
+    _dataIn.setToExternal(dataIn.data(), dataIn.size());
+
+    // 256 x 256 YUV pixels
+    Element element = context->elementCreate(DataType::UNSIGNED_8, DataKind::USER, false, 1);
+    Type type = context->typeCreate(element, 128, 0, 0, false, false, YuvFormat::YUV_NONE);
+    Allocation allocation = context->allocationCreateTyped(type, AllocationMipmapControl::NONE,
+                                                           (int)AllocationUsageType::SCRIPT,
+                                                           (Ptr)nullptr);
+    context->allocation1DWrite(allocation, 0, 0, (Size)_dataIn.size(), _dataIn);
+
+    // kernel
+    ScriptKernelID kernelID = context->scriptKernelIDCreate(script, mExportForEachIdx_increment, 3);
+    EXPECT_NE(ScriptKernelID(0), kernelID);
+    ASSERT_NE(ScriptKernelID(0), kernelID);
+
+    hidl_vec<ScriptFieldID> fieldIDS = {ScriptFieldID(0)};
+    hidl_vec<int64_t> values = {int64_t(0)};
+    hidl_vec<int32_t> sizes = {int32_t(0)};
+    hidl_vec<Closure> depClosures = {Closure(0)};
+    hidl_vec<ScriptFieldID> depFieldIDS = {ScriptFieldID(0)};
+    Closure closure = context->closureCreate(kernelID, allocation /* returnValue */, fieldIDS,
+                                              values, sizes, depClosures, depFieldIDS);
+    EXPECT_NE(Closure(0), closure);
+    ASSERT_NE(Closure(0), closure);
+
+    // set argument
+    context->closureSetArg(closure, 0 /* first argument */, (Ptr)allocation, -1);
+
+    // execute
+    hidl_string name = "script_group_2_test";
+    hidl_string cacheDir = "/data/local/tmp";
+    hidl_vec<Closure> closures = {closure};
+    ScriptGroup2 scriptGroup2 = context->scriptGroup2Create(name, cacheDir, closures);
+    EXPECT_NE(ScriptGroup2(0), scriptGroup2);
+    ASSERT_NE(ScriptGroup2(0), scriptGroup2);
+
+    context->scriptGroupExecute(scriptGroup2);
+    context->allocationRead(allocation, (Ptr)dataOut.data(), (Size)dataOut.size()*sizeof(uint8_t));
+    EXPECT_EQ(expected, dataOut);
+}
diff --git a/renderscript/1.0/vts/functional/bitcode.cpp b/renderscript/1.0/vts/functional/bitcode.cpp
index 72143c9..8a7d542 100644
--- a/renderscript/1.0/vts/functional/bitcode.cpp
+++ b/renderscript/1.0/vts/functional/bitcode.cpp
@@ -15,169 +15,215 @@
  */
 
 /*
-#include "shared.rsh"
-
-// types
-typedef struct Point2 {
-    int x;
-    int y;
-} Point_2;
-
-// variables
-int var_int;
-long var_long;
-float var_float;
-double var_double;
-rs_allocation var_allocation;
-int var_array[4];
-Point_2 var_point2;
-Point_2 *var_point2_ptr;
-
-// invoke
-void function() {
-    var_int = 1;
-    var_long = 2;
-    var_float = 3.0f;
-    var_double = 4.0;
-
-    var_array[0] = 5;
-    var_array[1] = 6;
-    var_array[2] = 7;
-    var_array[3] = 8;
-
-    var_point2.x = 9;
-    var_point2.y = 10;
-}
-
-// invokeV
-void functionV(int arg) {
-    var_int = arg;
-}
-
-// forEach
-uchar RS_KERNEL increment(uchar in) {
-    return in+1;
-}
-
-// reduction
-#pragma rs reduce(summation) accumulator(sumAccumulator) combiner(sumCombiner)
-
-static void sumAccumulator(int* accum, int val) {
-    *accum += val;
-}
-
-static void sumCombiner(int* accum, const int *val) {
-    *accum += *val;
-}
-*/
+ * // This .rs code was used to generate the 32-bit and 64-bit versions of the
+ * // bitcode shown below. It is left in here for reference, as many of the
+ * // variables are used in the the script tests.
+ *
+ * #include "shared.rsh"
+ *
+ * // types
+ * typedef struct Point2 {
+ *     int x;
+ *     int y;
+ * } Point_2;
+ *
+ * // variables
+ * int var_int;
+ * long var_long;
+ * float var_float;
+ * double var_double;
+ * rs_allocation var_allocation;
+ * uint32_t var_uint32_t;
+ * Point_2 var_point2;
+ * int *var_int_ptr;
+ *
+ * // invoke
+ * void function() {
+ *     var_int = 1;
+ *     var_long = 2;
+ *     var_float = 3.0f;
+ *     var_double = 4.0;
+ *     var_uint32_t = 5;
+ *     var_point2.x = 6;
+ *     var_point2.y = 7;
+ * }
+ *
+ * // invokeV
+ * void functionV(int arg) {
+ *     var_int = arg;
+ * }
+ *
+ * // set bound buffer
+ * void setBuffer(int dim) {
+ *     int i;
+ *     for (i = 0; i < dim; ++i) {
+ *         var_int_ptr[i] = 5;
+ *     }
+ * }
+ *
+ * // set allocation
+ * void setAllocation(int dim) {
+ *     int x;
+ *     for (x = 0; x < dim; ++x) {
+ *         rsSetElementAt_uchar(var_allocation, 7, x);
+ *     }
+ * }
+ *
+ * // forEach
+ * uchar RS_KERNEL increment(uchar in) {
+ *     return in+1;
+ * }
+ *
+ * // reduction
+ * #pragma rs reduce(summation) accumulator(sumAccumulator) combiner(sumCombiner)
+ *
+ * static void sumAccumulator(int* accum, int val) {
+ *     *accum += val;
+ * }
+ *
+ * static void sumCombiner(int* accum, const int *val) {
+ *     *accum += *val;
+ * }
+ */
 
 #include "VtsHalRenderscriptV1_0TargetTest.h"
 
+// bitcode slots
+const int mExportVarIdx_var_int = 0;
+const int mExportVarIdx_var_long = 1;
+const int mExportVarIdx_var_float = 2;
+const int mExportVarIdx_var_double = 3;
+const int mExportVarIdx_var_allocation = 4;
+const int mExportVarIdx_var_uint32_t = 5;
+const int mExportVarIdx_var_point2 = 6;
+const int mExportVarIdx_var_int_ptr = 7;
+// bitcode invoke slots
+//const int mExportForEachIdx_root = 0;
+const int mExportForEachIdx_increment = 1;
+// bitcode reduce slots
+const int mExportReduceIdx_summation = 0;
+// bitcode invoke slots
+const int mExportFuncIdx_function = 0;
+const int mExportFuncIdx_functionV = 1;
+const int mExportFuncIdx_setBuffer = 2;
+const int mExportFuncIdx_setAllocation = 3;
+
+// bitcode
 #ifndef __LP64__
 
 const int8_t bitCode[] = {
-     -34,  -64,   23,   11,    0,    0,    0,    0,   44,    0,    0,    0,  -84,   10,    0,    0,
+     -34,  -64,   23,   11,    0,    0,    0,    0,   44,    0,    0,    0,   -8,   12,    0,    0,
        0,    0,    0,    0,   -1,   -1,   -1,   -1,    0,    0,    0,    0,    1,   64,    4,    0,
       96,    9,    0,    0,    2,   64,    4,    0,    3,    0,    0,    0,   66,   67,  -64,  -34,
-      33,   12,    0,    0,  -88,    2,    0,    0,    1,   16,    0,    0,   18,    0,    0,    0,
+      33,   12,    0,    0,   59,    3,    0,    0,    1,   16,    0,    0,   18,    0,    0,    0,
        7, -127,   35, -111,   65,  -56,    4,   73,    6,   16,   50,   57, -110,    1, -124,   12,
       37,    5,    8,   25,   30,    4, -117,   98, -128,   24,   69,    2,   66, -110,   11,   66,
      -60,   16,   50,   20,   56,    8,   24,   73,   10,   50,   68,   36,   72,   10, -112,   33,
       35,  -60,   82, -128,   12,   25,   33,  114,   36,    7,  -56, -120,   17,   98,  -88,  -96,
-     -88,   64,  -58,  -16,    1,    0,    0,    0,   73,   24,    0,    0,   25,    0,    0,    0,
-      11, -124,   -1,   -1,   -1,   -1,   31,  -64,   96, -127,    1,    4,   65,  -16,   -1,   -1,
-      -1,   -1,    3,   24,   45,   32,    2,   16,    4,   65,   16,   36,   -2,   -1,   -1,   -1,
-     127,    0, -125,    5,   70,    0, -126,   32,    8, -126, -124,    0, -126,   32,    8, -126,
-     -60,   -1,   -1,   -1,   -1,   15,   96,  -80,   64,   -8,   -1,   -1,   -1,   -1,    1,   12,
-      22,    8,   -1,   -1,   -1,   -1,   63,    0,   11, -120,    0,    4,   65,   16,    4, -119,
-      -1,   -1,   -1,   -1,   31,  -64,   80,   88,   64,    4,  -64,   -1,   -1,   -1,   -1,   15,
-      96,    0,    0,    0, -119,   32,    0,    0,   33,    0,    0,    0,   50,   34, -120,    9,
-      32,  100, -123,    4,   19,   35,  -92, -124,    4,   19,   35,  -29, -124,  -95, -112,   20,
-      18,   76, -116, -116,   11, -124,  -60,   76,   16, -112,  -63,   28,    1,   24,   16,   48,
-      71,    0,   10,   36,  -52,    0,   16,   49,    4,   64,   70,   18,    0, -124,   92,   35,
-      77,   17,   37,   76,  126,  -22,   32,  -51,  100,   35,    1,    0,   72,  -71,   75, -102,
-      34,   74, -104,   -4,   72,   -6, -127,  101,  113,    4,   96,   66, -100,  -58,  -65,  115,
-      20,    4,  -60,  -48,   50,   71, -128,  -48,   67,  -48,    8,   64,    9,   36, -102, -118,
-      32,    1,   84,   21,  -31,  121,  -24,   42, -125,   20,    0, -108, -107,   65,   10,    2,
-     -38, -118,   32,   53,  -44, -103,    0,  -96,  -81,    8,   18,   72,  -31,   64,    0,    0,
+     -88,   64,  -58,  -16,    1,    0,    0,    0,   73,   24,    0,    0,   34,    0,    0,    0,
+      11, -124,   -1,   -1,   -1,   -1,   31,  -64,   96, -127,  -16,   -1,   -1,   -1,   -1,    3,
+      24,   44,   32, -124,  -32,   -1,   -1,   -1,   -1,    7,   96, -127,    1,    4,   65,  -16,
+      -1,   -1,   -1,   -1,    3,   24,   45,   32,    2,   16,    4,   65,   16,   36,   -2,   -1,
+      -1,   -1,  127,    0, -125,    5,   70,    0, -126,   32,    8, -126, -124,    0, -126,   32,
+       8, -126,  -60,   -1,   -1,   -1,   -1,   15,   96,  -80,   64,   -8,   -1,   -1,   -1,   -1,
+       1,   88,   64,    4,   32,    8, -126,   32,   72,   -4,   -1,   -1,   -1,   -1,    0, -122,
+     -62,    2,   34,    0,   65,   16,    4,   65,  -30,   -1,   -1,   -1,   -1,    7,   48,   20,
+      22,   16,   66,  -16,   -1,   -1,   -1,   -1,    3,   24,   44,   32,    2,  -32,   -1,   -1,
+      -1,   -1,    7,   48,    0,    0,    0,    0, -119,   32,    0,    0,   36,    0,    0,    0,
+      50,   34, -120,    9,   32,  100, -123,    4,   19,   35,  -92, -124,    4,   19,   35,  -29,
+    -124,  -95, -112,   20,   18,   76, -116, -116,   11, -124,  -60,   76,   16, -100,  -63,   28,
+       1,   24,   16,   48,   71,    0,   10,   36,  -52,    0,   16,   49,    4,   64,  -58,   53,
+     -46,   20,   81,  -62,  -28,  -89,   14,  -46,   76,   54,   18,    0, -128,   16,   10,  -18,
+    -110,  -90, -120,   18,   38,   63, -110,  126,   96,   89,   28,    1, -104,   16,  -89,  -15,
+     -17,   28,    5,    1,   45,  115,    4,    8,   53,  -28, -116,    0, -108,    0,  -94,  -88,
+       8,   16,   64,   83,    6,    0, -123, -128,  -86,    6,   32,  -85,    8,   77,   67,   88,
+      25,  -96,    0,   32,  -83,   12,   80,   16,   16,   87,    4, -120,   33,  -49,    4,    0,
+    -127,   69, -128,   66,   18,    7,    2,  -26,    8, -126,   41,    0,    0,    0,    0,    0,
       19,  -80,  112, -112, -121,  118,  -80, -121,   59,  104,    3,  119,  120,    7,  119,   40,
     -121,   54,   96, -121,  116,  112, -121,  122,  -64, -121,   54,   56,    7,  119,  -88, -121,
      114,    8,    7,  113,   72, -121,   13,  100,   80,   14,  109,    0,   15,  122,   48,    7,
      114,  -96,    7,  115,   32,    7,  109, -112,   14,  118,   64,    7,  122,   96,    7,  116,
      -48,    6,  -10,   16,    7,  114, -128,    7,  122,   96,    7,  116,  -96,    7,  113,   32,
        7,  120,  -48,    6,  -18,   48,    7,  114,  -48,    6,  -77,   96,    7,  116,  -96,  -13,
-      64, -118,    4,   50,   66,  100,    4,  -40,  -95,    4,  -64, -124,   12,    0,    0,    4,
-     -64,   14,  101,    0,   44, -124,    0,    0,   32,    0,  118,   40,    5,  112,   33,    3,
-       0,    0,    1,  -80,   67,   57,    0,   12,   33,    0,    0,    8, -128,   29,   74,    2,
-     100,  -56,    0,    0,   64,    0,  -20,   80,   22,   64,   67,    6,    0,    0,    2, -128,
-      13, -121,  -37,  -95,   56,  -64, -122,   12,    0,    0,    4,  -64,   14,   37,    2,   58,
-      96,    0,    0,   32,    0,  118,   40,   17,  -32,    1,    3,    0,    0,    1,   48,   68,
-     -95,    0,    0,    8,    0,    0,    0, -126,   33, -118,    5,    0,   64,    0,    0,    0,
-      16,   12,   81,   48,    0,    0,    4,    0,    0, -128,   96, -120,  -94,    1,  -64,   48,
-       0,    0,    0,    0,   67,   20,   14,    0,    6,    2,    0,    0,    0,   24,  -94,   80,
-       0,    0,   20,    0,    0,    0,  -63,   16,  -59,    3,    2,  -64,    0,    0,    0,    8,
-    -122,   40,   98,    0,    0,  -64,    1,    0,    0,   16,  100, -127,    0,    0,    0,    0,
-      13,    0,    0,    0,   50,   30, -104,   20,   25,   17,   76, -112, -116,    9,   38,   71,
-     -58,    4,   67,    2,   70,    0,   74,  -96,   16,   72,   24,    1,   32,   98,    4, -128,
-    -116,   17,    0,   66,   70,    0,   72,   25,    1,  -96,  101,    4, -128, -104,   17,    0,
-    -126,  108,  -75,    6,   91,  -50,    1,    0,  121,   24,    0,    0,  -30,    0,    0,    0,
-      26,    3,   76, -112,   70,    2,   19,   52,   68,    0,   38,   42,  119,   99,  104,   97,
-     114,   95,  115,  105,  122,  101,   67,    4, -128,   26,   98,    0,  -45,   24,    4,    0,
-     -59,  -90,   45,  -51,  -19,  -85,  -52,  -83,  -82,  -19,  107,   46,   77,  -81,  108, -120,
-       1,   76,   99,   64,    0,   20,   -7,   32,  -56, -115,   76,  -18,   45, -115,   12,  100,
-    -116,   45,  -52,  -19,   12,  -60,  -82,   76,  110,   46,  -19,  -51,   13,  100,  -58,    5,
-     -57,   69,  -26,  -90, -122,    6,    7,    6,    4,    4,   69,   44,  108,  -82, -116,   12,
-     -28,  -51,   13, -124, -119,  -55,  -86,    9,  100,  -58,    5,  -57,   69,  -26,  -90, -122,
-       6,    7,   38,  101, -120,   48,    6,    6,   15,  -69,   50,  -71,  -71,  -76,   55,   55,
-       6,   49,   67, -120,   49,   64,  -58,   32,   97,  -92,   22,  102,   23,  -10,    5,   23,
-      54,  -74,   22,  118,   86,  -10,  -27,   22,  -42,   86,  -58,  105,  -20,  -83,  -51,   37,
-     -52, -115,   76,  -18,   45, -115,  -52,   69,  110,  -50, -123,  -82,  108, -114,  110,    8,
-      49,    6,  -53,   24,   48,   60,  -20,  -62,  -28,  -66,  -46,  -36,  -24,   24,  -44,   12,
-      33,  -58,  -64,   25, -125, -121, -120,   93, -104,  -36,   23,  -37, -101,  -37,   25,    3,
-    -101,   33,  -60,   24,   68,   99,   32,   49,  -79,   11, -109,   -5,   50,   99,  123,   11,
-     -93,   27,   66, -116,    1,   53,    6,    9,   21,  -69,   48,  -71,   47,  -78,  -73,   58,
-      49,  -74,   50,    6,   50,   67, -120,   49,  -80,  -58,  -32,  -94,   99,   23,   38,   -9,
-      21,  -58,  -58,  -10,   54,   22,   70, -105,  -10,  -26,   70,   65,    6,  102,    8,   49,
-       6,  -39,   24,  104,   76,  -20,  -62,  -28,  -66,  -62,  -28,  -28,  -62,  -14,   -8,  -16,
-      12,  -67,  -71,  -51,  -47, -123,  -71,  -47,    5,  -55,  -55, -123,  -27,   -7,   12,   33,
-     -58, -128,   27, -125, -114, -118,   93, -104,  -36,   23,  -36,   91, -102,   27,  -99,   12,
-      13,  -88,  -73,   52,   55,   58, -103,   33,  -60,   24,  124,   99,    0,    6,  116,  -20,
-     -62,  -28,  -66,  -32,  -34,  -46,  -36,  -24,  100,  -66,  -32,  -24,  -28,  120,  -88,   64,
-     -67,  -91,  -71,  -47,  -55,   12,   33,  -58,   64,   12,  -58,   96,   12,   24,  -48,   12,
-      17,  -58,  -96,   12, -120, -104,  -43,  -71, -115,  -47,  -91,  -67,  -71,   13,   17,  -58,
-     -32,   12,   24,  -71,  -96, -107,  -79,  -63, -107,  -55,  125, -103,  -43,  -71, -115,  -47,
-     -91,  -67,  -71,   89,   13,   17,  -58,   32,   13,   72,  -56,  -67,  -67,  -47,   13,   17,
-     -58,   96,   13, -104,  -92,  -71, -115,  -55, -107,  -75, -107,  -71,  -47,   13,   17,  -58,
-     -96,   13,   24,  -64,   12,   17,  -58,  -32,   13,   40,  -52,  -44,   12,   17,  -58,   32,
-      14, -104,  -52,  -43,  -75,  -75, -123,  -47,  -91,  -67,  -71,  -47, -103,  -85,  107,   11,
-      26,   27,  -85,  107,  -85,   99,   11,  -93,  123, -109,   27,   66, -116,    1,   29, -116,
-      65,  -62,  101,  -82,  -82,  109,  -24,  -83,   77,   44,  -51,  -83,   76,  110, -120,   50,
-       6,  115,   48,    6,  101,   48,    6,  117,   32,    1,   99,   96,    7,   67, -124,   49,
-       0,    3,    6,  120,   28,  -46,  -36,  -24, -122,   16,   99, -112,    7,   99,  -96,    7,
-      12,  -14, -122,   16,   99,  -64,    7,   99,  -96,    7,  124,  -34,  -38,  -36,  -46,  -32,
-     -34,  -24,  -54,  -36,  -24,   64,  -58,  -48,  -62,  -28,   24,   77,  -91,  -75,  -63,  -79,
-    -107, -127,   12,  -67,   12,  -83,  -84, -128,   80,    9,    5,    5,   13,   17,  -58,  -32,
-      15, -122,    8,   66,   53,  -60,   24,    3,   63,   24,    3,   80,   16,  -86,   33,  -58,
-      24,  -24,  -63,   24, -120, -126,   80,   13,   49,  -58,   96,   20,  -58,   96,   20, -124,
-    -118,    4,  -37, -101,  -37,  -39,   16,   99,   12,   74,   97,   12,   68,   65,  -88, -122,
-      24,   99,   96,   10,   99,   96,   10,   66,  -59,  -62, -116,  -19,   45, -116,  110, -120,
-      49,    6,  -88,   48,    6,  -94,   32,   84,   67, -116,   49,   72, -123,   49,   72,    5,
-     -95,  -94,   65,  -10,   86,   39,  -58,   86,   54,  -60,   24, -125,   85,   24,    3,   81,
-      16,  -86,   33,  -58,   24,  -80,  -62,   24,  -80, -126,   80,   53,   98,   99,  -77,  107,
-     115,  105,  123,   35,  -85,   99,   43,  115,   49,   99,   11,   59, -101, -101,   34,   12,
-      69,   21,   54,   54,  -69,   54, -105,   52,  -78,   50,   55,  -70,   41,  -63,  -47,   99,
-       4,   78,   46,  -20,  -84,   45,  108, -118,  -96,   52,  117,   70,  -28,  -26,  -66,  -54,
-     -16,  -32,  -34,  -28,  -24,  -66,  -20,  -62,  -28,  -90,   32,  -48,   84,   97, -101,   23,
-       6,  100,   80,  104,   68,  110,  -18,  -21,   77,   76,  -83,  108, -116,  -18,  107, -114,
-     -19, -115,  110,  110,   74,   96,    6,  125,   70,  -28,  -26,  -66,  -54,  -16,  -32,  -34,
-     -28,  -24,  -66,  -52,  -22,  -36,  -58,  -90,    8,  104,  -96,    6,  -67,   70,  -28,  -26,
-     -66,  -54,  -16,  -32,  -34,  -28,  -24,  -66,  -52,  -34,  -28,  -54,  -62,  -58,  -48,  -66,
-     -36,  -62,  -38,  -54,  -90,    8,  108,  -32,    6, -107,   70,  -28,  -26,  -66,  -54,  -16,
-     -32,  -34,  -28,  -24,  -66,  -52,  -34,  -28,  -54,  -62,  -58,  -48,  -90,    8,  112,   32,
-       7, -115,   70,  -28,  -26,  -66,  -54,  -16,  -32,  -34,  -28,  -24,  -66,  -28,  -54,  -56,
-     -22,  -58,  -54,  -90,    4,  119,  -48,  103,   68,  110,  -18,  -85,   12,   15,  -18,   77,
-    -114,  -18, -117,   46,   15,  -82,  108,   74, -128,    7,   61,   74,  -96,  -34,  -46,  -36,
-     -24,  100,  -90,    8,  123,  -48,    7,    0,  121,   24,    0,    0,   92,    0,    0,    0,
+      64, -120,    4,   50,   66,  100,    4,  -40,  -95,    4,    0, -122,   12,    0,    0,    4,
+     -64,   14,  101,    0,   54, -124,    0,    0,   32,    0,  118,   40,    5,  -48,   33,    3,
+       0,    0,    1,  -80,   67,   57,    0,   15,   33,    0,    0,    8, -128,   29,   74,    0,
+      96,  -56,    0,    0,   64,    0,  -20,   80,   18,  -32,   67,    6,    0,    0,    2,   96,
+    -121,  -94,    0,   28,   50,    0,    0,   16,    0,  100,   96, -128,  -37,  -95,   60,   64,
+      24,    0,    3,    0,    0,    1,  -80,   67,  121,    0,   49,    0,    6,    0,    0,    2,
+      96, -120,   34,    1,    0,   16,    0,    0,    0,    4,   67,   20,   10,    0, -128,    0,
+       0,    0,   32,   24,  -94,   80,    0,    0,    4,    0,    0,    0,  -63,   16, -123,    2,
+       0,   64,    0,    0,    0,    8, -122,   40,   23,   16,    0,    3,    0,    0,   64,   48,
+      68,  -55,    0,    0,   32,    0,    0,    0, -126,   33,  -54,    6,    0,   67,    1,    0,
+       0,    0,   12,   81,   58,    0,   24,   12,    0,    0,    0,   96, -120,   34,    1,    0,
+      32,    0,    0,    0,    4,   67, -108,   15,    8, -128,    3,    0,    0,   32,   24,  -94,
+    -116,    1,    0,    0,    8,    0,    0,   64,   48,   68,   25,    3,    0,    0,   16,    0,
+       0, -128,   96, -120,   50,    6,    0,    0,   36,    0,    0,    0,   65,   22,    8,    0,
+      12,    0,    0,    0,   50,   30, -104,   24,   25,   17,   76, -112, -116,    9,   38,   71,
+     -58,    4,   67,    2,   70,    0,   74,  -96,   16,   72,   24,    1,  -96,   96,    4, -128,
+    -120,   17,    0,   50,   70,    0,    8,   25,    1,  -96,  101,    4, -128,   28,  -37,   13,
+     -62,  -74, -117,    0,  121,   24,    0,    0,  -13,    0,    0,    0,   26,    3,   76, -112,
+      70,    2,   19,   52,   68,    0,   48,   42,  119,   99,  104,   97,  114,   95,  115,  105,
+     122,  101,   67,    4,   32,   27,   98,    0,   24,   25,    4,   64,  -58,  -90,   45,  -51,
+     -19,  -85,  -52,  -83,  -82,  -19,  107,   46,   77,  -81,  108, -120,    1,   96,  100,   64,
+       0,   25,   -7,   32,  -56, -115,   76,  -18,   45, -115,   12,  100, -116,   45,  -52,  -19,
+      12,  -60,  -82,   76,  110,   46,  -19,  -51,   13,  100,  -58,    5,  -57,   69,  -26,  -90,
+    -122,    6,    7,    6,    4,    4,   69,   44,  108,  -82, -116,   12,  -28,  -51,   13, -124,
+    -119,  -55,  -86,    9,  100,  -58,    5,  -57,   69,  -26,  -90, -122,    6,    7,   38,  101,
+    -120,   64,    6,    6,   15,  -69,   50,  -71,  -71,  -76,   55,   55,    6,   49,   67,    8,
+      50,   64,  -56,   32,   97,  -92,   22,  102,   23,  -10,    5,   23,   54,  -74,   22,  118,
+      86,  -10,  -27,   22,  -42,   86,  -58,  105,  -20,  -83,  -51,   37,  -52, -115,   76,  -18,
+      45, -115,  -52,   69,  110,  -50, -123,  -82,  108, -114,  110,    8,   65,    6,   11,   25,
+      48,   60,  -20,  -62,  -28,  -66,  -46,  -36,  -24,   24,  -44,   12,   33,  -56,  -64,   33,
+    -125, -121, -120,   93, -104,  -36,   23,  -37, -101,  -37,   25,    3, -101,   33,    4,   25,
+      68,  100,   32,   49,  -79,   11, -109,   -5,   50,   99,  123,   11,  -93,   27,   66, -112,
+       1,   69,    6,    9,   21,  -69,   48,  -71,   47,  -78,  -73,   58,   49,  -74,   50,    6,
+      50,   67,    8,   50,  -80,  -56,  -32,  -94,   99,   23,   38,   -9,   21,  -58,  -58,  -10,
+      54,   22,   70, -105,  -10,  -26,   70,   65,    6,  102,    8,   65,    6,   25,   25,  104,
+     100,  -20,  -62,  -28,  -66,  -22,  -46,  -36,  -24,  102,  100,  -66,  -24,   24,  -28,   12,
+      33,  -56, -128,   35, -125, -114, -118,   93, -104,  -36,   23,  -36,   91, -102,   27,  -99,
+      12,   13,  -88,  -73,   52,   55,   58, -103,   33,    4,   25,  124,  100,    0,    6,   92,
+     -20,  -62,  -28,  -66,  -46,  -36,  -24,  -66,  -32,  -24,  -28,   72,  -88,  -92,  -71,  -47,
+      13,   33,  -56,   64,   12,  -56,   96,   12,   24,  -48,   12,   17,  -56,  -96,   12, -120,
+    -104,  -43,  -71, -115,  -47,  -91,  -67,  -71,   13,   17,  -56,  -32,   12,   24,  -71,  -96,
+    -107,  -79,  -63, -107,  -55,  125, -103,  -43,  -71, -115,  -47,  -91,  -67,  -71,   89,   13,
+      17,  -56,   32,   13,   24,  -71,  -96, -107,  -79,  -63, -107,  -55,  125,  -51, -107,  -47,
+       9,  -43, -103, -103, -107,  -55,   13,   17,  -56,   96,   13,   88,  -71,  -96, -107,  -79,
+     -63, -107,  -55,  125,  -51, -107,  -47,    5,  -79,  -79,  -67, -115, -123,  -47,  -91,  -67,
+     -71,   13,   17,  -56,  -96,   13,   72,  -56,  -67,  -67,  -47,   13,   17,  -56,  -32,   13,
+    -104,  -92,  -71, -115,  -55, -107,  -75, -107,  -71,  -47,   13,   17,  -56,   32,   14,   24,
+     -64,   12,   17,  -56,   96,   14,   40,  -52,  -44,   12,   17,  -56,  -96,   14, -104,  -52,
+     -43,  -75,  -75, -123,  -47,  -91,  -67,  -71,  -47, -103,  -85,  107,   11,   26,   27,  -85,
+     107,  -85,   99,   11,  -93,  123, -109,   27,   66, -112,    1,   30, -112,   65,  -62,  101,
+     -82,  -82,  109,  -24,  -83,   77,   44,  -51,  -83,   76,  110, -120,   66,    6,  119,   64,
+       6,  101,   64,    6,  121,    0,    1,  100,  -96,    7,   67,    4,   50,    0,    3,    6,
+     120,   28,  -46,  -36,  -24, -122,   16,  100,  -48,    7,  100,  -32,    7,   12,  -14, -122,
+      16,  100,    0,   10,  100,  -32,    7,  124,  -34,  -38,  -36,  -46,  -32,  -34,  -24,  -54,
+     -36,  -24,   64,  -58,  -48,  -62,  -28,   24,   77,  -91,  -75,  -63,  -79, -107, -127,   12,
+     -67,   12,  -83,  -84, -128,   80,    9,    5,    5,   13,   17,  -56,   96,   20, -122,    8,
+    -126,   54,  -60,   32,    3,   81,   32,    3,   82,   16,  -76,   33,    6,   25,   -8,    1,
+      25, -104, -126,  -96,   13,   49,  -56,  -32,   20,  -56,  -32,   20,    4, -115,    4,  -37,
+    -101,  -37,  -39,   16, -125,   12,   82, -127,   12,   76,   65,  -48, -122,   24,  100,  -96,
+      10,  100,  -96,   10, -126,  -58,  -62, -116,  -19,   45, -116,  110, -120,   65,    6,  -84,
+      64,    6,  -90,   32,  104,   67,   12,   50,  104,    5,   50,  104,    5,   65,  -93,   65,
+     -10,   86,   39,  -58,   86,   54,  -60,   32, -125,   87,   32,    3,   83,   16,  -76,   33,
+       6,   25,  -64,    2,   25,  -64, -126,  -96,  113,    9,  115,  -53,    3, -127,  123,   75,
+     115,  -93,   43, -109,   27,   98, -112, -127,   44, -112, -127,   41,    8,  -38,   16, -125,
+      12,  102, -127,   12,  102,   65,  -48,   26,  -79,  -79,  -39,  -75,  -71,  -76,  -67, -111,
+     -43,  -79, -107,  -71, -104,  -79, -123,  -99,  -51,   77,   17, -122,  -94,   10,   27, -101,
+      93, -101,   75,   26,   89, -103,   27,  -35, -108,  -32,  -24,   49,    2,   39,   23,  118,
+     -42,   22,   54,   69,   80, -102,   58,   35,  114,  115,   95,  101,  120,  112,  111,  114,
+     116,   95,  118,   97,  114,   83,   16,  104,  -86,  -80,  -51,   11,    3,   50,   40,   52,
+      34,   55,   -9,  -11,   38,  -90,   86,   54,   70,   -9,   53,  -57,  -10,   70,   55,   55,
+      37,   48, -125,   62,   35,  114,  115,   95,  101,  120,  112,  111,  114,  116,   95,  102,
+     117,  110,   99,   83,    8,   52,   80,    3,   54,  112, -125,   94,   35,  114,  115,   95,
+     101,  120,  112,  111,  114,  116,   95,  102,  111,  114,  101,   97,   99,  104,   95,  110,
+      97,  109,  101,   83,    4,   56, -112, -125,   74,   35,  114,  115,   95,  101,  120,  112,
+     111,  114,  116,   95,  102,  111,  114,  101,   97,   99,  104,   83,    4,   58,  -80, -125,
+      70,   35,  114,  115,   95,  101,  120,  112,  111,  114,  116,   95,  114,  101,  100,  117,
+      99,  101,   83, -126,   61,  -24,   51,   34,   55,   -9,   85, -122,    7,   -9,   38,   71,
+      -9,   69, -105,    7,   87,   54,   37,  -32, -125,   30,   37,   80,  111,  105,  110,  116,
+      50,   83, -124,   63,    8,    5,    0,    0,  121,   24,    0,    0,   92,    0,    0,    0,
       51,    8, -128,   28,  -60,  -31,   28,  102,   20,    1,   61, -120,   67,   56, -124,  -61,
     -116,   66, -128,    7,  121,  120,    7,  115, -104,  113,   12,  -26,    0,   15,  -19,   16,
       14,  -12, -128,   14,   51,   12,   66,   30,  -62,  -63,   29,  -50,  -95,   28,  102,   48,
@@ -201,236 +247,309 @@
     -127,   30,  -36,  -32,   28,  -28,  -31,   29,  -22,    1,   30,  102,   24,   81,   56,  -80,
       67,   58, -100, -125,   59,  -52,   80,   36,  118,   96,    7,  123,  104,    7,   55,   96,
     -121,  119,  120,    7,  120, -104,   81,   76,  -12, -112,   15,  -16,   80,   14,    0,    0,
-     113,   32,    0,    0,   56,    0,    0,    0,    6,   17,    6,   -1,   92,  -33, -111,  -60,
-      45,    4,   16,  -95,   65,   66,    8,   83,   90,  -33, -111,  -12,    3,  -53,  -30,    8,
-     -64, -124,   56, -115,   13,   40,   21,   16,   -3, -125,   67,    5,   11,   97,    5,   74,
-       5,   68,   -1,  -29,   32,  -51,  100,   27,   67, -126,   52,   66,   68,   48,   68,   51,
-    -103,    2,   82,   80, -115,   48,   33,   78,   99,    4,   73,    5,   68,   63,   16,   69,
-       0,  102,   17, -111,  127,   16,  -53,   67,   68,  127,   65,   53,  -62, -124,   56,  -51,
-     107,   14, -117,   68,   49, -100,  -61,    4,   72,   67,   68,  102,  -32,   84,   64,  -12,
-       3,  -53,  -30,    8,  -64, -124,   56, -115,   33,  112,  126,   36,   -7,   17,   49,   80,
-       2,  -15,   23, -115,   47,   81, -116,   38,    8,   20,   67,   45,  -64,  -28,   68,    6,
-     112,   84,   64,  -12,   35,  -51,  100,   13, -114,   68,   49, -102,   32,   80,   12,  -75,
-       0, -109,   19,   89,    0,   82,    1,  -47,  -65,   56, -115,   97,    7,   78,    5,   68,
-      -1,  -29,   32,  -51,  100,   -1,  -49,   20,  -39,    3,  -30,   71, -110,   63,   76,   78,
-     100,   11,   73,   65,   53,  -62, -124,   56,  -51,  107,    2,   73,    5,   68,  127,  -79,
-      56,  -64,  100,    9, -103,   31,   73,  126,   68,   12, -108,   64,   -4,   69,  -29,   75,
-      20,  -61,   57,   76, -128,   52,   68,    4,   97,   32,    0,    0,   54,    0,    0,    0,
-      19,    4,   65,   44,   16,    0,    0,    0,   20,    0,    0,    0,    4, -108,   66,   49,
-    -108,   67,   17,   20,   68,   25, -108,   68,   81, -112,   80,    4,   20,   12,  101,   36,
-       4,   32,    1,  -45,   80,   70,   66,    0,   18,   16,    6,   67,   25,    9,    1,   72,
-     -64,   24,   12,  101,   44,    5,   32,    1,  -46,   80,  -58,   82,    0,   18,   48,   13,
-     101,   36,    4,   32,    1,   18,   17,   99,    4,   32,    8, -126,   36,   24, -112,   49,
-      70,    0, -126,   32,    8, -126,   32,    8, -126,   36,   72,    0, -125,   17,  -64,   52,
-       0, -125,   17, -127,   25,   16,  -64,   96, -124,  -48,    6,    3,   48,   24,   49,  -72,
-       1,    1,   12,   70,  -80, -127,   55,    0, -125,   17,  103,  -16,   13,  -64,   96,    4,
-      26, -128,  -63,    0,   12,   70,  -92, -127,   24,   12,  -64,   96, -124,   26, -112,  -63,
-       0,   12,   70,  -84,   65,   25,   12,    0,    6,  -60,    0,    0,   13,    0,    0,    0,
-      91,    6,   32,   32, -123,   45,   67,   16, -100,  -62, -106,   65,    8,   84,   97,  -53,
-      48,    4,  -83,  -80,  101,   32,    2,   82,  -40,   50,   20,    1,   41,  108,   25, -116,
-    -128,   20,  -74,   12,   71,   64,   10,   91,    6,   36,   32, -123,   45,   67,   18, -112,
-       2,    0,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,   11,    0,    0,    0,
-      19,    4,  -63,   96,    4,  -32,   13,    0, -122,    3,    1,    0,    2,    0,    0,    0,
-     -26,   49,    0, -111,    1,    0,    0,    0,    1,   49,    0,    0,    2,    0,    0,    0,
-      91,    6,   32,   32,    5,    0,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,
-      11,    0,    0,    0,   19,    4,  -63,  121,   64,  -40,   55,  -63,  -32,  -64,  -32, -127,
-      12, -125,  112,   32,    5,    0,    0,    0,  -10,   65,    8,   78,   83, -103, -121, -128,
-      52,   22,   82,    8,   78,   83,  -43,    6,   50,    0,  -61,    0,    0,    0,    0,    0,
-      97,   32,    0,    0,   16,    0,    0,    0,   19,    4,    1,  121,  -61,  -64,  -32,    3,
-     -63,   96, -124,   23,    6,    3, -128,  -31,   64,    0,    0,    0,    4,    0,    0,    0,
-     -10,   49,   84,  -64,   98,   30,    5,   32,    8,   20,   99,   33,    3,   48,   12,    0,
-       1,   49,    0,    0,    3,    0,    0,    0,   91,    6,   32,   32, -123,   45, -125,   16,
-    -112,    2,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,   17,    0,    0,    0,
-      19,    4,    1,  125, -125,  -68,   97,   97,    0,    6,   32,   24, -116,  -16,  -60,   96,
-       0,   48,   28,    8,    4,    0,    0,    0,  -10,   49,   84,  -64,   98,   30,    5,   32,
-       8,   20,   99,   34,    3,   48,   12,    0,    1,   49,    0,    0,    4,    0,    0,    0,
-      91,    6,   32,   32, -123,   45,   67,   16, -112,  -62, -106,   97,    8,   72,    1,    0,
-       0,    0,    0,    0,   97,   32,    0,    0,    3,    0,    0,    0,   19,    4,  -63, -120,
-       1, -127,    4, -112, -127,    0,    0,    0,   97,   32,    0,    0,    9,    0,    0,    0,
-      19,    4,  -63,  120, -125,   39,   73,  -12, -115,   17,    3,    2,    8,   22,   48,  -64,
-     112,   32,    0,    0,    2,    0,    0,    0,    7,   80,   16,  -51,   20,   97,    0,    0,
-       0,    0,    0,    0,    0,    0,    0,    0,
+     113,   32,    0,    0,   78,    0,    0,    0,   70,  -64,   84,   64,  -12,   83,   72,   51,
+     -35,  -10,   63,  -39, -128,   82,    1,  -47,   63,   56,   84,  -80,   16,  -90, -128,   20,
+      84,   35,   76, -120,  -45, -104,  -63,   82,    1,  -47, -113,   52,  -45,   -1,   76, -111,
+      53,   52,   18,   49,  105,  -53,  -30,    8,  -64, -124,   56, -115,    5,   32,   21,   16,
+      -3, -117,  -45,   24,  -74, -112,   20,   84,   35,   76, -120,  -45,  -68,  -26, -112,    6,
+      -1,  108,  -45, -111,  -60,   18, -109,  -73,   16,   12,  -47,   76,  -38,  -12,   83,  -62,
+       1,   68,  -11,   29,   73,   63,  -80,   44, -114,    0,   76, -120,  -45,   28, -119,   77,
+    -124,  -63,   63,  -41,  119,   36,  113,   11,    1,   68,  104, -112,   16,  -62, -108,  -42,
+     119,   36,   -3,  -64,  -78,   56,    2,   48,   33,   78,   99,   22, -107,  127,   16,  -53,
+      67,   68,  -65,   68,   76,  -38,  -78,   56,    2,   48,   33,   78,   99,    2,   73,    5,
+      68,  127,  -79,   56,  -64,  100,    5,   74,    5,   68,   -1,  -29,   32,  -51,  100,  -37,
+      67, -126,   52,   66,   68,   48,   68,   51,   25,   67,   34,   17,  -45,   70,   21,    5,
+      17,   89,  -60,   34,   81,   12,  -25,   48,    1,  -46,   16, -111,   37,  100,  126,   36,
+      -7,   17,   49,   80,    2,  -15,   23, -115,   47,   81,   12,  -25,   48,    1,  -46,   16,
+    -111,   81,   68,   -2,   65,   44,   15,   17,   -3,    5,  -43,    8,   19,  -30,   52,  -81,
+      29,   56,   21,   16,   -3,  -64,  -78,   56,    2,   48,   33,   78,   99,    8, -100,   31,
+      73,  126,   68,   12, -108,   64,   -4,   69,  -29,   75,   20,  -93,    9,    2,  -59,   80,
+      11,   48,   57, -111,    1,   28,   21,   16,   -3,   72,   51,   89,   69,  -28,   31,  -60,
+     -14,   16,  -47,   47,   17,  -45,   70,   21,    5,   17,   25, -124,   35,   81, -116,   38,
+       8,   20,   67,   45,  -64,  -28,   68,   38, -127,   -8, -111,  -28,   15, -109,   19,    1,
+      97,   32,    0,    0,   37,    0,    0,    0,   19,    4,   65,   44,   16,    0,    0,    0,
+      12,    0,    0,    0,    4, -108,   66,   49, -108,    3,    9,   69,   64,  -63,   80,   70,
+      82,    0,   23, -128,   13,  101,   36,    5,  112,    1,   23,   17,   99,    4,   32,    8,
+    -126,   36,   24, -112,   49,   70,    0, -126,   32,    8, -126,   32,    8, -126,   36,   72,
+       0,    0,    0,    0, -125,   17,    0,   54,    0, -125,   17,   65,   25,   16,  -64,   96,
+    -124, -128,    6,    3,   48,   24,   49,  -92,    1,    1,   12,   70,   16,   98,   48,    0,
+    -125,   17,  103,   48,    6,    3,   48,   24,   97,    6,  100,   48,    0,   24,   16,    3,
+       9,    0,    0,    0,   91,    6,   32,   64, -123,   45,   67,   16,  -84,  -62, -106,   65,
+       8,   92,   97,  -53,   48,    4,  -79,  -80,  101,   32,    2,   84,  -40,   50,   20,    1,
+      42,  108,   25, -116,    0,   21,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,
+      11,    0,    0,    0,   19,    4,  -63,   96,    4,   32,    6,    3, -128,  -31,   64,    0,
+       2,    0,    0,    0,   38,   50,    0, -111,    1,    0,    0,    0,    1,   49,    0,    0,
+       2,    0,    0,    0,   91,    6,   32,   64,    5,    0,    0,    0,    0,    0,    0,    0,
+      97,   32,    0,    0,   38,    0,    0,    0,   19,    4,   68,   44,   16,    0,    0,    0,
+       1,    0,    0,    0,    4, -108,    2,    0,  -61,   13,   98,  112, -103,  -63,   44,   67,
+      48, -112,    1,   25,   99, -106,   64,   24,  -88,    0,  -82,    0,   13, -124,  -15, -124,
+      50,   48, -125,  -63, -120,   51,   24, -125,    1,   48,   51,  -64,   96,   48,  -36, -128,
+       6,   98,    0,    6,  -77,   12, -125, -112,    6,   24,   14,    4,   14,    0,    0,    0,
+      23,   96,   -8,   75,  -28,   63,  -57,   13,   44,   -2,   47,   68,  -56,  -12,   19, -125,
+      65,  -40,    9,    2,   68,   17, -128,   33,  -61,  101,   36, -124,  -64,   60,  -72, -119,
+      12,    3,  -62,   24,  -54, -128,   52, -126, -103,   16, -120,   79,  -25, -106, -126,   16,
+      23,   50,    9,   78,   51,    0,    0,    0,    1,   49,    0,    0,    3,    0,    0,    0,
+      91,    6,   33,  -96, -123,   45, -125,   17,  -96,    2,    0,    0,    0,    0,    0,    0,
+      97,   32,    0,    0,   36,    0,    0,    0,   19,    4,   67,   44,   16,    0,    0,    0,
+       3,    0,    0,    0,  -44, -108,    3,    5,  -74,  -52,    1,   85,   51,    0,    0,    0,
+     -61,   13,   98,  112, -103,  -63,   44,   67,   32, -104,  -63,   64,    5,  -96,    6,  -63,
+       5,   16,   25, -116,  -39, -122,   50,   64,    3,   96,  -60,  -64,   80,    2,   39,   13,
+     -58,  -32,   12,  -20,   12,   48,   24,   12,   55,  -88, -127,   24, -128,  -63,   44, -125,
+      16,  -84,    1, -122,    3,    1,    0,    0,   14,    0,    0,    0, -122,  114,   -8,   84,
+     -13,    0, -126,  114,    1, -122,  -65,   68,   -2,  115, -100,  -64,  -30,   -1,   66, -124,
+      76,   63,   49,   24, -124, -103,   16,    2,  -13,  -32,   38,   50,   12,    8,   99,   42,
+       3,  -46,    8,  118,   66,   92,   62,  -99,  -37,   10,   66,   92,  -56,   36,   56,  -51,
+       0,    0,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,   12,    0,    0,    0,
+      19,    4,  -63, -119,    1,   16,   54,    6,   24,   12, -114,   12,   26,  -56,   50,    8,
+       7,    2,    0,    0,    5,    0,    0,    0,   54,   66,    8,   78,   83, -103, -120, -128,
+      52,   86,   82,    8,   78,   83,  -43,   70,   50,    0,  -61,    0,    0,    0,    0,    0,
+      97,   32,    0,    0,   16,    0,    0,    0,   19,    4,    1, -119,  -63,   48,   50,   24,
+       3,   16,   12,   70, -120,   65,   25,   12,    0, -122,    3,    1,    4,    0,    0,    0,
+      54,   50,   84,  -64,   98,   34,    5,   32,    8,   20,   99,   37,    3,   48,   12,    0,
+       1,   49,    0,    0,    3,    0,    0,    0,   91,    6,   32,   64, -123,   45, -125,   16,
+     -96,    2,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,   18,    0,    0,    0,
+      19,    4,    1, -115,  -63,   32,   49,   24,   86,    6,  100,    0, -126,  -63,    8,   49,
+      48, -125,    1,  -64,  112,   32,    0,    0,    4,    0,    0,    0,   54,   50,   84,  -64,
+      98,   34,    5,   32,    8,   20,   99,   38,    3,   48,   12,    0,    1,   49,    0,    0,
+       4,    0,    0,    0,   91,    6,   32,   64, -123,   45,   67,   16,  -96,  -62, -106,   97,
+       8,   80,    1,    0,    0,    0,    0,    0,   97,   32,    0,    0,    3,    0,    0,    0,
+      19,    4,  -63, -120,    1,  -79,    4,  -45, -127,    0,    0,    0,   97,   32,    0,    0,
+       9,    0,    0,    0,   19,    4,  -63,  120, -125,   24,   92,   23, -115,  -63,   24,   49,
+      32, -128,   96,   33,    3,   12,    7,    2,    2,    0,    0,    0,    7,   80,   16,  -51,
+      20,   97,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,    9,    0,    0,    0,
+      19,    4,  -63,  120, -125,   24,   92,   23, -115,  -63,   24,   49,   32, -128, -128,   33,
+       3,   12,    7,    2,    2,    0,    0,    0,    7,   80,   16,  -51,   20,   97,    0,    0,
+       0,    0,    0,    0,   97,   32,    0,    0,    9,    0,    0,    0,   19,    4,  -63,  120,
+    -125,   24,   92,   23, -115,  -63,   24,   49,   32, -128,  -96,   33,    3,   12,    7,    2,
+       2,    0,    0,    0,    7,   80,   16,  -51,   20,   97,    0,    0,    0,    0,    0,    0,
+       0,    0,    0,    0,
 };
 
-const int bitCodeLength = 2776;
+const int bitCodeLength = 3364;
 
 #else
 
 const int8_t bitCode[] = {
-     -34,  -64,   23,   11,    0,    0,    0,    0,   44,    0,    0,    0, -116,   10,    0,    0,
+     -34,  -64,   23,   11,    0,    0,    0,    0,   44,    0,    0,    0,  108,   13,    0,    0,
        0,    0,    0,    0,   -1,   -1,   -1,   -1,    0,    0,    0,    0,    1,   64,    4,    0,
       96,    9,    0,    0,    2,   64,    4,    0,    3,    0,    0,    0,   66,   67,  -64,  -34,
-      33,   12,    0,    0,  -96,    2,    0,    0,    1,   16,    0,    0,   18,    0,    0,    0,
+      33,   12,    0,    0,   88,    3,    0,    0,    1,   16,    0,    0,   18,    0,    0,    0,
        7, -127,   35, -111,   65,  -56,    4,   73,    6,   16,   50,   57, -110,    1, -124,   12,
       37,    5,    8,   25,   30,    4, -117,   98, -128,   24,   69,    2,   66, -110,   11,   66,
      -60,   16,   50,   20,   56,    8,   24,   73,   10,   50,   68,   36,   72,   10, -112,   33,
       35,  -60,   82, -128,   12,   25,   33,  114,   36,    7,  -56, -120,   17,   98,  -88,  -96,
-     -88,   64,  -58,  -16,    1,    0,    0,    0,   73,   24,    0,    0,   24,    0,    0,    0,
+     -88,   64,  -58,  -16,    1,    0,    0,    0,   73,   24,    0,    0,   33,    0,    0,    0,
       11, -124,   -1,   -1,   -1,   -1,   31,  -64,   96, -127,  -16,   -1,   -1,   -1,   -1,    3,
-      24,   45,   32,    2,   16,    4,   65,   16,   36,   -2,   -1,   -1,   -1,  127,    0, -125,
-       5,   70,    0, -126,   32,    8, -126, -124,    0, -126,   32,    8, -126,  -60,   -1,   -1,
-      -1,   -1,   15,   96,  -80,   64,   -8,   -1,   -1,   -1,   -1,    1,   12,   22,    8,   -1,
-      -1,   -1,   -1,   63,    0,   11, -120,    0,    4,   65,   16,    4, -119,   -1,   -1,   -1,
-      -1,   31,  -64,   80,   88,   64,    4,  -64,   -1,   -1,   -1,   -1,   15,   96,    0,    0,
-    -119,   32,    0,    0,   34,    0,    0,    0,   50,   34, -120,    9,   32,  100, -123,    4,
-      19,   35,  -92, -124,    4,   19,   35,  -29, -124,  -95, -112,   20,   18,   76, -116, -116,
-      11, -124,  -60,   76,   16, -112,  -63,   28,    1,   24,   16,   48,   71,    0,   10,   36,
-     -52,    0,   16,   49,    4,   64,   70,   18,    0, -124,   28,   36,   77,   17,   37,   76,
-     126,  -22,   32,  -51,  100,   -5,   61, -114,    4,    0,   32,  -27,   46,  105, -118,   40,
-      97,  -14,   35,  -23,    7, -106,  -59,   17, -128,    9,  113,   26,  -65,  -49,   17,   49,
-      12,  -61,   64,   12,   45,  115,    4,    8,   61,    4, -115,    0, -108,   64,  -94,  -87,
-       8,   18,   64,   85,   17,  -98, -121,  -82,   50,   72,    1,   64,   89,   25,  -92,   32,
-     -96,  -83,    8,   82,   67,  -99,    9,    0,   -6, -118,   32, -127,   20,   14,    4,    0,
-      19,  -76,  112,    8,    7,  121,   24,    7,  116,  -80,    3,   58,  104,    3,  119,  120,
-       7,  119,   40, -121,   54,   96, -121,  116,  112, -121,  122,  -64, -121,   54,   56,    7,
-     119,  -88, -121,  114,    8,    7,  113,   72, -121,   13,  115,   80,   14,  109,  -48,   14,
-     122,   80,   14,  109, -112,   14,  120,  -96,    7,  120,  -96,    7,  115,   32,    7,  109,
-    -112,   14,  113,   96,    7,  122,   16,    7,  118,  -96,    7,  115,   32,    7,  109, -112,
-      14,  118,   64,    7,  122,   96,    7,  116,  -48,    6,  -23,   16,    7,  114, -128,    7,
-     122,   16,    7,  114, -128,    7,  109,  -32,   14,  115,   32,    7,  122,   96,    7,  116,
-     -48,    6,  -77,   16,    7,  114, -128,    7,   58,   15,  -92,   72,   32,   35,   68,   70,
-    -128,   29,   74,    0,   76,  -56,    0,    0,   64,    0,  -20,   80,    6, -128,   66,    8,
-       0,    0,    2,   96, -121,   82,    0,   21,   50,    0,    0,   16,    0,   59, -108,    3,
-     -80,   16,    2,    0, -128,    0,  -40,  -95,   36,  -64, -123,   12,    0,    0,    4,  -64,
-      14,  101,    1,   48,  100,    0,    0,   32,    0,  -40,  104,  -56,   29, -118,    3,  100,
-       8,    1,    0,   64,    0,  -20,   80,   34,   96,    3,    8,    0,    0,    2,   96, -121,
-      18,    1,   28,   64,    0,    0,   16,    0,   67,   20,   10,    0, -128,    0,    0,    0,
-      32,   24,  -94,   88,    0,    0,    4,    0,    0,    0,  -63,   16,    5,    3,    0,   64,
-       0,    0,    0,    8, -122,   40,   26,    0,   12,    3,    0,    0,    0,   48,   68,  -31,
-       0,   96,   32,    0,    0,    0, -128,   33,   10,    5,    0,   64,    1,    0,    0,   16,
-      12,   81,   60,   32,    0,   12,    0,    0, -128,   96, -120,   34,    6,    0,    0,   28,
-       0,    0,    0,   65,   22,    8,    0,    0,   13,    0,    0,    0,   50,   30, -104,   20,
-      25,   17,   76, -112, -116,    9,   38,   71,  -58,    4,   67,    2,   70,    0,   72,   24,
-       1,   32,   98,    4, -128, -116,   17,    0,   66,   70,    0,   72,   25,    1,  -96,  101,
-       4, -128, -104,   17,    0, -126,  108,  -75,    6,   91,  -50,    1,    0,    0,    0,    0,
-     121,   24,    0,    0,  -48,    0,    0,    0,   26,    3,   76, -112,   70,    2,   19,   68,
+      24,   44,   16,   -2,   -1,   -1,   -1,  127,    0,   22,   24,    1,    8, -126,   32,    8,
+      18,    2,    8, -126,   32,    8,   18,   -1,   -1,   -1,   -1,   63, -128,  -63,    2,  -31,
+      -1,   -1,   -1,   -1,    7,   48,   90,   64,    4,   32,    8, -126,   32,   72,   -4,   -1,
+      -1,   -1,   -1,    0,    6,   11, -116,    0,    4,   65,   16,    4,    9,    1,    4,   65,
+      16,    4, -119,   -1,   -1,   -1,   -1,   31,  -64,   96,    1,   17, -128,   32,    8, -126,
+      32,  -15,   -1,   -1,   -1,   -1,    3,   24,   10,   11, -120,    0,    4,   65,   16,    4,
+    -119,   -1,   -1,   -1,   -1,   31,  -64,   80,   88,   64,    4,  -64,   -1,   -1,   -1,   -1,
+      15,   96,    0,    0, -119,   32,    0,    0,   38,    0,    0,    0,   50,   34, -120,    9,
+      32,  100, -123,    4,   19,   35,  -92, -124,    4,   19,   35,  -29, -124,  -95, -112,   20,
+      18,   76, -116, -116,   11, -124,  -60,   76,   16,  -96,  -63,   28,    1,   24,   16,   48,
+      71,    0,   10,   36,  -52,    0,   16,   49,    4,   64,  -58,   65,  -46,   20,   81,  -62,
+     -28,  -89,   14,  -46,   76,  -74,  -33,  -29,   72,    0,    0,   66,   40,  -72,   75, -102,
+      34,   74, -104,   -4,   72,   -6, -127,  101,  113,    4,   96,   66, -100,  -58,  -17,  115,
+      68,   12,  -61,   48,  -48,   50,   71, -128,   80,   67,  -50,    8,   64,    9,   32, -118,
+    -118,    0,    1,   52,   21,    2,   98,   26, -128,  -86,   57, -126,  -96,   24, -112,  -29,
+       8,  -64,   69,   88,   17, -102, -122,  -76,   50,   64,    1,   64,   92,   25,  -96,   32,
+      32,  -81,    8,   16,   67,  -96,    9,    0,   18, -117,    0, -115,   68,   14,    4,   76,
+       1,    0,    0,    0,   19,  -76,  112,    8,    7,  121,   24,    7,  116,  -80,    3,   58,
+     104,    3,  119,  120,    7,  119,   40, -121,   54,   96, -121,  116,  112, -121,  122,  -64,
+    -121,   54,   56,    7,  119,  -88, -121,  114,    8,    7,  113,   72, -121,   13,  115,   80,
+      14,  109,  -48,   14,  122,   80,   14,  109, -112,   14,  120,  -96,    7,  120,  -96,    7,
+     115,   32,    7,  109, -112,   14,  113,   96,    7,  122,   16,    7,  118,  -96,    7,  115,
+      32,    7,  109, -112,   14,  118,   64,    7,  122,   96,    7,  116,  -48,    6,  -23,   16,
+       7,  114, -128,    7,  122,   16,    7,  114, -128,    7,  109,  -32,   14,  115,   32,    7,
+     122,   96,    7,  116,  -48,    6,  -77,   16,    7,  114, -128,    7,   58,   15, -124,   72,
+      32,   35,   68,   70, -128,   29,   74,    0,  100,  -56,    0,    0,   64,    0,  -20,   80,
+       6,   96,   67,    8,    0,    0,    2,   96, -121,   82,    0,   31,   50,    0,    0,   16,
+       0,   59, -108,    3,    0,    3, -124,    0,    0,   32,    0,  118,   40,    1, -112,   33,
+       3,    0,    0,    1,  -80,   67,   73, -128,   48,   64,    6,    0,    0,    2,   96, -121,
+     -94,    0,   30,   66,    0,    0,   16,    0,  100,   98, -128,  -36,  -95,   60,  -64,   24,
+       0,    4,    0,    0,    1,  -80,   67,  121,    0,   50,    0,    8,    0,    0,    2,   96,
+    -120,   34,    1,    0,   16,    0,    0,    0,    4,   67,   20,   10,    0, -128,    0,    0,
+       0,   32,   24,  -94,   80,    0,    0,    4,    0,    0,    0,  -63,   16, -123,    2,    0,
+      64,    0,    0,    0,    8, -122,   40,   22,   16,    0,    3,    0,    0,   64,   48,   68,
+     -55, -128,    0,   32,    0,    0,    0, -128,   33,  -54,    6,    0,   64,    1,    0,    0,
+      16,   12,   81,   58,    0,   24,   12,    0,    0,    0,   96, -120,  -14,    1,  -64,  112,
+       0,    0,    0,    0,   67,   20,    9,    0,    0,    1,    0,    0,   32,   24,  -94, -124,
+       1,   16,    0,    3,    0,    0,   64,   48,   68,   41,    3,    0,    0,   16,    0,    0,
+    -128,   96, -120,   82,    6,    0,    0,   32,    0,    0,    0,  -63,   16,  -91,   12,    0,
+       0,   72,    0,    0,    0, -126,   44,   16,   13,    0,    0,    0,   50,   30, -104,   24,
+      25,   17,   76, -112, -116,    9,   38,   71,  -58,    4,   67,    2,   70,    0,   72,   40,
+    -104,   17, -128, -126,   40,   16,   10,   70,    0, -120,   24,    1,   32,   99,    4, -128,
+    -112,   17,    0,   90,   70,    0,  -56,  -79,  -19,   34,  108,   63,    9,    0,    0,    0,
+     121,   24,    0,    0,  -22,    0,    0,    0,   26,    3,   76, -112,   70,    2,   19,   68,
       62,    8,  114,   35, -109,  123,   75,   35,    3,   25,   99,   11,  115,   59,    3,  -79,
       43, -109, -101,   75,  123,  115,    3, -103,  113,  -63,  113, -111,  -71,  -87,  -95,  -63,
     -127,    1,    1,   65,   17,   11, -101,   43,   35,    3,  121,  115,    3,   97,   98,  -78,
-     106,    2, -103,  113,  -63,  113, -111,  -71,  -87,  -95,  -63, -127,   73,   25,   34, -116,
-       1,  -64,  -61,  -82,   76,  110,   46,  -19,  -51, -115,   65,  -52,   16,   98,   12, -124,
-      49,   24,   24,  -87, -123,  -39, -123,  125,  -63, -123, -115,  -83, -123,  -99, -107,  125,
+     106,    2, -103,  113,  -63,  113, -111,  -71,  -87,  -95,  -63, -127,   73,   25,   34, -104,
+       1,  -64,  -61,  -82,   76,  110,   46,  -19,  -51, -115,   65,  -52,   16,  -62,   12,    4,
+      51,   24,   24,  -87, -123,  -39, -123,  125,  -63, -123, -115,  -83, -123,  -99, -107,  125,
      -71, -123,  -75, -107,  113,   26,  123,  107,  115,    9,  115,   35, -109,  123,   75,   35,
-     115, -111, -101,  115,  -95,   43, -101,  -93,   27,   66, -116,   65,   49,    6,    6,   15,
-     -69,   48,  -71,  -81,   52,   55,   58,    6,   53,   67, -120,   49,   64,  -58,   32,   33,
-      98,   23,   38,   -9,  -59,  -10,  -26,  118,  -58,  -64,  102,    8,   49,    6,  -53,   24,
-      48,   76,  -20,  -62,  -28,  -66,  -52,  -40,  -34,  -62,  -24, -122,   16,   99,  -32, -116,
+     115, -111, -101,  115,  -95,   43, -101,  -93,   27,   66, -104,   65,   97,    6,    6,   15,
+     -69,   48,  -71,  -81,   52,   55,   58,    6,   53,   67,    8,   51,   64,  -52,   32,   33,
+      98,   23,   38,   -9,  -59,  -10,  -26,  118,  -58,  -64,  102,    8,   97,    6, -117,   25,
+      48,   76,  -20,  -62,  -28,  -66,  -52,  -40,  -34,  -62,  -24, -122,   16,  102,  -32, -104,
      -63,   64,  -59,   46,   76,  -18, -117,  -20,  -83,   78, -116,  -83, -116, -127,  -52,   16,
-      98,   12,  -96,   49, -120,  -24,  -40, -123,  -55,  125, -123,  -79,  -79,  -67, -115, -123,
-     -47,  -91,  -67,  -71,   81, -112, -127,   25,   66, -116,  -63,   52,    6,   20,   19,  -69,
-      48,  -71,  -81,   48,   57,  -71,  -80,   60,   62,   60,   67,  111,  110,  115,  116,   97,
-     110,  116,   65,  114,  114,   97,  121,   62,   67, -120,   49,  -80,  -58,  -32,  -94,   98,
-      23,   38,   -9,    5,   -9, -106,  -26,   70,   39,   67,    3,  -22,   45,  -51, -115,   78,
-     102,    8,   49,    6,  -39,   24,  104,  116,  -20,  -62,  -28,  -66,  -32,  -34,  -46,  -36,
-     -24,  100,  -66,  -32,  -24,  -28,  120,  -88,   64,  -67,  -91,  -71,  -47,  -55,   12,   33,
-     -58, -128,   27, -125, -114,    1,  -51,   16,   97,   12,   62,   34,  102,  117,  110,   99,
-     116,  105,  111,  110,   67, -124,   49,    8,    3,   70,   46,  104,  101,  108,  112,  101,
-     114,   95,  102,  117,  110,   99,  116,  105,  111,  110,   86,   67, -124,   49,   24,    3,
-      18,  114,  111,  111,  116,   67, -124,   49,   40,    3,   38,  105,  110,   99,  114,  101,
-     109,  101,  110,  116,   67, -124,   49,   56,    3,    6,   48,   67, -124,   49,   72,    3,
-      10,   51,   53,   67, -124,   49,   88,    3,   38,  115,  117,  109,  109,   97,  116,  105,
-     111,  110,  116,  -26,  -22,  -38, -126,  -58,  -58,  -22,  -38,  -22,  -40,  -62,  -24,  -34,
-     -28, -122,   16,   99,  -32,    6,   99,   48,  112, -103,  -85,  107,   27,  122,  107,   19,
-      75,  115,   43, -109,   27,  -94, -116,   65,   27, -116,  -63,   55,    6,  111,   32,    1,
-      99,    0,    7,   67, -124,   49,  -48,   24,  -32,  113,   72,  115,  -93,   27,   66, -116,
-     -63,   28, -116,    1,   29,   48,  -56,   27,   66, -116, -127,   29, -116,    1,   29,  -16,
-     121,  107,  115,   75, -125,  123,  -93,   43,  115,  -93,    3,   25,   67,   11, -109,   99,
-      52, -107,  -42,    6,  -57,   86,    6,   50,  -12,   50,  -76,  -78,    2,   66,   37,   20,
-      20,   52,   68,   24, -125,   60,   24,   34,    8,  -45,   16,   99,   12,  -16,   96,   12,
-     -12,   64, -104, -122,   24,   99,   64,    7,   99,  -64,    7,  -62,   52,  -60,   24, -125,
-      62,   24, -125,   62,   16,   38,   18,  108,  111,  110,  103,   67, -116,   49,   -8, -125,
-      49,  -32,    3,   97,   26,   98, -116,    1,   40, -116,    1,   40,    8,   19,   11,   51,
-     -74,  -73,   48,  -70,   33,  -58,   24, -120,  -62,   24,  -16, -127,   48,   13,   49,  -58,
-      96,   20,  -58,   96,   20, -124, -119,    6,  -39,   91,  -99,   24,   91,  -39,   16,   99,
-      12,   74,   97,   12,   -8,   64, -104, -122,   24,   99,   96,   10,   99,   96,   10,  -62,
-      84, -123, -115,  -51,  -82,  -51,   37, -115,  -84,  -52, -115,  110,   74,   16,  -12,   24,
-    -127, -109,   11,   59,  107,   11, -101,   34,   16,   71,  -99,   17,  -71,  -71,  -81,   50,
-      60,  -72,   55,   57,  -70,   47,  -69,   48,  -71,   41, -120,  -46,   60,   82, -123,  109,
-      94,  -95,   17,  -71,  -71,  -81,   55,   49,  -75,  -78,   49,  -70,  -81,   57,  -74,   55,
-     -70,  -71,   41,    1,   24,  -12,   25, -111, -101,   -5,   42,  -61, -125,  123, -109,  -93,
-      -5,   50,  -85,  115,   27, -101,   34, -120,    1,   25,  -12,   26, -111, -101,   -5,   42,
-     -61, -125,  123, -109,  -93,   -5,   50,  123, -109,   43,   11,   27,   67,   -5,  114,   11,
-     107,   43, -101,   34, -104,    1,   26,   84,   26, -111, -101,   -5,   42,  -61, -125,  123,
-    -109,  -93,   -5,   50,  123, -109,   43,   11,   27,   67, -101,   34,  -88,    1,   27,   52,
-      26, -111, -101,   -5,   42,  -61, -125,  123, -109,  -93,   -5, -110,   43,   35,  -85,   27,
-      43, -101,   18,  -60,   65,  -97,   17,  -71,  -71,  -81,   50,   60,  -72,   55,   57,  -70,
-      47,  -70,   60,  -72,  -78,   41, -127,   28,  -12,   40, -127,  122,   75,  115,  -93, -109,
-    -103,   34,  -44,  -63,   29,    0,    0,    0,  121,   24,    0,    0,   92,    0,    0,    0,
-      51,    8, -128,   28,  -60,  -31,   28,  102,   20,    1,   61, -120,   67,   56, -124,  -61,
-    -116,   66, -128,    7,  121,  120,    7,  115, -104,  113,   12,  -26,    0,   15,  -19,   16,
-      14,  -12, -128,   14,   51,   12,   66,   30,  -62,  -63,   29,  -50,  -95,   28,  102,   48,
-       5,   61, -120,   67,   56, -124, -125,   27,  -52,    3,   61,  -56,   67,   61, -116,    3,
-      61,  -52,  120, -116,  116,  112,    7,  123,    8,    7,  121,   72, -121,  112,  112,    7,
-     122,  112,    3,  118,  120, -121,  112,   32, -121,   25,  -52,   17,   14,  -20, -112,   14,
-     -31,   48,   15,  110,   48,   15,  -29,  -16,   14,  -16,   80,   14,   51,   16,  -60,   29,
-     -34,   33,   28,  -40,   33,   29,  -62,   97,   30,  102,   48, -119,   59,  -68, -125,   59,
-     -48,   67,   57,  -76,    3,   60,  -68, -125,   60, -124,    3,   59,  -52,  -16,   20,  118,
-      96,    7,  123,  104,    7,   55,  104, -121,  114,  104,    7,   55, -128, -121,  112, -112,
-    -121,  112,   96,    7,  118,   40,    7,  118,   -8,    5,  118,  120, -121,  119, -128, -121,
-      95,    8, -121,  113,   24, -121,  114, -104, -121,  121, -104, -127,   44,  -18,  -16,   14,
-     -18,  -32,   14,  -11,  -64,   14,  -20,   48,    3,   98,  -56,  -95,   28,  -28,  -95,   28,
-     -52,  -95,   28,  -28,  -95,   28,  -36,   97,   28,  -54,   33,   28,  -60, -127,   29,  -54,
-      97,    6,  -42, -112,   67,   57,  -56,   67,   57, -104,   67,   57,  -56,   67,   57,  -72,
-     -61,   56, -108,   67,   56, -120,    3,   59, -108,  -61,   47,  -68, -125,   60,   -4, -126,
-      59,  -44,    3,   59,  -80,  -61,   12,  -57,  105, -121,  112,   88, -121,  114,  112, -125,
-     116,  104,    7,  120,   96, -121,  116,   24, -121,  116,  -96, -121,   25,  -50,   83,   15,
-     -18,    0,   15,  -14,   80,   14,  -28, -112,   14,  -29,   64,   15,  -31,   32,   14,  -20,
-      80,   14,   51,   32,   40,   29,  -36,  -63,   30,  -62,   65,   30,  -46,   33,   28,  -36,
-    -127,   30,  -36,  -32,   28,  -28,  -31,   29,  -22,    1,   30,  102,   24,   81,   56,  -80,
-      67,   58, -100, -125,   59,  -52,   80,   36,  118,   96,    7,  123,  104,    7,   55,   96,
-    -121,  119,  120,    7,  120, -104,   81,   76,  -12, -112,   15,  -16,   80,   14,    0,    0,
-     113,   32,    0,    0,   56,    0,    0,    0,    6,   17,    6,   -1,   92,  -33, -111,  -60,
-      45,    4,   16,  -95,   65,   66,    8,   83,   90,  -33, -111,  -12,    3,  -53,  -30,    8,
-     -64, -124,   56, -115,   13,   40,   21,   16,   -3, -125,   67,    5,   11,   97,    5,   74,
-       5,   68,   -1,  -29,   32,  -51,  100,   27,   67, -126,   52,   66,   68,   48,   68,   51,
-    -103,    2,   82,   80, -115,   48,   33,   78,   99,    4,   73,    5,   68,   63,   16,   69,
-       0,  102,   17, -111,  127,   16,  -53,   67,   68,  127,   65,   53,  -62, -124,   56,  -51,
-     107,   14, -117,   68,   49, -100,  -61,    4,   72,   67,   68,  102,  -32,   84,   64,  -12,
-       3,  -53,  -30,    8,  -64, -124,   56, -115,   33,  112,  126,   36,   -7,   17,   49,   80,
-       2,  -15,   23, -115,   47,   81, -116,   38,    8,   20,   67,   45,  -64,  -28,   68,    6,
-     112,   84,   64,  -12,   35,  -51,  100,   13, -114,   68,   49, -102,   32,   80,   12,  -75,
-       0, -109,   19,   89,    0,   82,    1,  -47,  -65,   56, -115,   97,    7,   78,    5,   68,
-      -1,  -29,   32,  -51,  100,   -1,  -49,   20,  -39,    3,  -30,   71, -110,   63,   76,   78,
-     100,   11,   73,   65,   53,  -62, -124,   56,  -51,  107,    2,   73,    5,   68,  127,  -79,
-      56,  -64,  100,    9, -103,   31,   73,  126,   68,   12, -108,   64,   -4,   69,  -29,   75,
-      20,  -61,   57,   76, -128,   52,   68,    4,   97,   32,    0,    0,   55,    0,    0,    0,
-      19,    4,   65,   44,   16,    0,    0,    0,   21,    0,    0,    0,    4, -108,   64,   41,
-      20,   67,   57,   20,   68,   73,   20,    5,    9,  101,   80,    2,   69,   64,  -63,   80,
-      70,   66,    8, -109,   48,    6,   67,   25,   75,   33,   76, -128,   52, -108,  -79,   20,
-     -62,    4,  112,   67,   25,    9,   33,   76,   66,   25,   12,  101,   36, -124,   48,    9,
-     100,   48, -108, -111,   16,  -62,   36,   76,   68, -116,   17, -128,   32,    8, -110,   96,
-      64,  -58,   24,    1,    8, -126,   32,    8, -126,   32,    8, -110,   32,    1,    0,    0,
-    -125,   17,    0,   55,    0, -125,   17,   65,   25,   16,  -64,   96, -124,  -64,    6,    3,
-      48,   24,   49,  -76,    1,    1,   12,   70,  -84,   65,   55,    0, -125,   17,  106,  -32,
-      13,  -64,   96,   68,   26,  124,    3,   48,   24,   97,    6,   96,   48,    0, -125,   17,
-     103,   16,    6,    3,   48,   24, -127,    6,   98,   48,    0,   24,   16,    3,    0,    0,
-      13,    0,    0,    0,   91,    6,   32,  -16, -125,   45,   67,   16, -124,  -62, -106,   65,
-       8,   72,   97,  -53,   48,    4,  -89,  -80,  101,   32,    2,   63,  -40,   50,   20, -127,
-      31,  108,   25, -116,  -64,   15,  -74,   12,   71,  -32,    7,   91,    6,   36,  -16, -125,
-      45,   67,   18,   -8,    1,    0,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,
-      11,    0,    0,    0,   19,    4,  -63,   96,    4,  -64,   13,    0, -122,    3,    1,    0,
-       2,    0,    0,    0,  -58,   49,    0, -111,    1,    0,    0,    0,    1,   49,    0,    0,
-       2,    0,    0,    0,   91,    6,   32,  -16,    3,    0,    0,    0,    0,    0,    0,    0,
+     -62,   12,   32,   51, -120,  -24,  -40, -123,  -55,  125, -123,  -79,  -79,  -67, -115, -123,
+     -47,  -91,  -67,  -71,   81, -112, -127,   25,   66, -104,  -63,  100,    6,   20,   25,  -69,
+      48,  -71,  -81,  -70,   52,   55,  -70,   25, -103,   47,   58,    6,   57,   67,    8,   51,
+     -80,  -52,  -32,  -94,   98,   23,   38,   -9,    5,   -9, -106,  -26,   70,   39,   67,    3,
+     -22,   45,  -51, -115,   78,  102,    8,   97,    6, -103,   25,  104,   92,  -20,  -62,  -28,
+     -66,  -46,  -36,  -24,  -66,  -32,  -24,  -28,   72,  -88,  -92,  -71,  -47,   13,   33,  -52,
+    -128,   51, -125, -114,    1,  -51,   16,  -63,   12,   62,   34,  102,  117,  110,   99,  116,
+     105,  111,  110,   67,    4,   51,    8,    3,   70,   46,  104,  101,  108,  112,  101,  114,
+      95,  102,  117,  110,   99,  116,  105,  111,  110,   86,   67,    4,   51,   24,    3,   70,
+      46,  104,  101,  108,  112,  101,  114,   95,  115,  101,  116,   66,  117,  102,  102,  101,
+     114,   67,    4,   51,   40,    3,   86,   46,  104,  101,  108,  112,  101,  114,   95,  115,
+     101,  116,   65,  108,  108,  111,   99,   97,  116,  105,  111,  110,   67,    4,   51,   56,
+       3,   18,  114,  111,  111,  116,   67,    4,   51,   72,    3,   38,  105,  110,   99,  114,
+     101,  109,  101,  110,  116,   67,    4,   51,   88,    3,    6,   48,   67,    4,   51,  104,
+       3,   10,   51,   53,   67,    4,   51,  120,    3,   38,  115,  117,  109,  109,   97,  116,
+     105,  111,  110,  116,  -26,  -22,  -38, -126,  -58,  -58,  -22,  -38,  -22,  -40,  -62,  -24,
+     -34,  -28, -122,   16,  102,   32,    7,  102,   48,  112, -103,  -85,  107,   27,  122,  107,
+      19,   75,  115,   43, -109,   27,  -94, -104,   65,   28, -104,  -63,  103,    6,  115,    0,
+       1,  102,   64,    7,   67,    4,   51,  -48,   24,  -32,  113,   72,  115,  -93,   27,   66,
+    -104,  -63,   29, -104,    1,   30,   48,  -56,   27,   66, -104, -127,   30, -104,    1,   30,
+     -16,  121,  107,  115,   75, -125,  123,  -93,   43,  115,  -93,    3,   25,   67,   11, -109,
+      99,   52, -107,  -42,    6,  -57,   86,    6,   50,  -12,   50,  -76,  -78,    2,   66,   37,
+      20,   20,   52,   68,   48, -125,   62,   24,   34,    8,  -38,   16,  -61,   12,   -8,  -64,
+      12,   -4,   64,  -48, -122,   24,  102, -128,    7,  102,    0,   10, -126,   54,  -60,   48,
+    -125,   80,   48, -125,   80,   16,   52,   18,  108,  111,  110,  103,   67,   12,   51,   24,
+       5,   51,    0,    5,   65,   27,   98, -104,    1,   41, -104,    1,   41,    8,   26,   11,
+      51,  -74,  -73,   48,  -70,   33, -122,   25, -104, -126,   25, -128, -126,  -96,   13,   49,
+     -52,  -32,   20,  -52,  -32,   20,    4, -115,    6,  -39,   91,  -99,   24,   91,  -39,   16,
+     -61,   12,   82,  -63,   12,   64,   65,  -48, -122,   24,  102,  -96,   10,  102,  -96,   10,
+    -126,  -58,   37,  -52,   45,   15,    4,  -18,   45,  -51, -115,  -82,   76,  110, -120,   97,
+       6,  -84,   96,    6,  -96,   32,  104,   67,   12,   51,  104,    5,   51,  104,    5,   65,
+      27,   34,    8,  -37,   16,   65,  -32, -122,    8,   66,   54,    4,   19,   52,   97,   51,
+       3,   87,   16,   54,   97,   51,    3,   87,   16,   56,   97,   51,    3,   87,   16,   50,
+      97,   51,    3,   87,  -88,  -62,  -58,  102,  -41,  -26, -110,   70,   86,  -26,   70,   55,
+      37,    8,  122, -116,  -64,  -55, -123,  -99,  -75, -123,   77,   17, -120,  -93,  -50, -120,
+     -36,  -36,   87,   25,   30,  -36, -101,   28,  -35, -105,   93, -104,  -36,   20,   68,  105,
+      30,  -87,  -62,   54,  -81,  -48, -120,  -36,  -36,  -41, -101, -104,   90,  -39,   24,  -35,
+     -41,   28,  -37,   27,  -35,  -36, -108,    0,   12,   -6, -116,  -56,  -51,  125, -107,  -31,
+     -63,  -67,  -55,  -47,  125, -103,  -43,  -71, -115,   77,   33,  -60, -128,   12,  -52,    0,
+      13,  122, -115,  -56,  -51,  125, -107,  -31,  -63,  -67,  -55,  -47,  125, -103,  -67,  -55,
+    -107, -123, -115,  -95,  125,  -71, -123,  -75, -107,   77,   17,  -44, -128,   13,   42, -115,
+     -56,  -51,  125, -107,  -31,  -63,  -67,  -55,  -47,  125, -103,  -67,  -55, -107, -123, -115,
+     -95,   77,   17,  -36,    0,   14,   26, -115,  -56,  -51,  125, -107,  -31,  -63,  -67,  -55,
+     -47,  125,  -55, -107, -111,  -43, -115, -107,   77,    9,  -22,  -96,  -49, -120,  -36,  -36,
+      87,   25,   30,  -36, -101,   28,  -35,   23,   93,   30,   92,  -39, -108,  -64,   14,  122,
+    -108,   64,  -67,  -91,  -71,  -47,  -55,   76,   17,  -14,   96,   15,    0,    0,    0,    0,
+     121,   24,    0,    0,   92,    0,    0,    0,   51,    8, -128,   28,  -60,  -31,   28,  102,
+      20,    1,   61, -120,   67,   56, -124,  -61, -116,   66, -128,    7,  121,  120,    7,  115,
+    -104,  113,   12,  -26,    0,   15,  -19,   16,   14,  -12, -128,   14,   51,   12,   66,   30,
+     -62,  -63,   29,  -50,  -95,   28,  102,   48,    5,   61, -120,   67,   56, -124, -125,   27,
+     -52,    3,   61,  -56,   67,   61, -116,    3,   61,  -52,  120, -116,  116,  112,    7,  123,
+       8,    7,  121,   72, -121,  112,  112,    7,  122,  112,    3,  118,  120, -121,  112,   32,
+    -121,   25,  -52,   17,   14,  -20, -112,   14,  -31,   48,   15,  110,   48,   15,  -29,  -16,
+      14,  -16,   80,   14,   51,   16,  -60,   29,  -34,   33,   28,  -40,   33,   29,  -62,   97,
+      30,  102,   48, -119,   59,  -68, -125,   59,  -48,   67,   57,  -76,    3,   60,  -68, -125,
+      60, -124,    3,   59,  -52,  -16,   20,  118,   96,    7,  123,  104,    7,   55,  104, -121,
+     114,  104,    7,   55, -128, -121,  112, -112, -121,  112,   96,    7,  118,   40,    7,  118,
+      -8,    5,  118,  120, -121,  119, -128, -121,   95,    8, -121,  113,   24, -121,  114, -104,
+    -121,  121, -104, -127,   44,  -18,  -16,   14,  -18,  -32,   14,  -11,  -64,   14,  -20,   48,
+       3,   98,  -56,  -95,   28,  -28,  -95,   28,  -52,  -95,   28,  -28,  -95,   28,  -36,   97,
+      28,  -54,   33,   28,  -60, -127,   29,  -54,   97,    6,  -42, -112,   67,   57,  -56,   67,
+      57, -104,   67,   57,  -56,   67,   57,  -72,  -61,   56, -108,   67,   56, -120,    3,   59,
+    -108,  -61,   47,  -68, -125,   60,   -4, -126,   59,  -44,    3,   59,  -80,  -61,   12,  -57,
+     105, -121,  112,   88, -121,  114,  112, -125,  116,  104,    7,  120,   96, -121,  116,   24,
+    -121,  116,  -96, -121,   25,  -50,   83,   15,  -18,    0,   15,  -14,   80,   14,  -28, -112,
+      14,  -29,   64,   15,  -31,   32,   14,  -20,   80,   14,   51,   32,   40,   29,  -36,  -63,
+      30,  -62,   65,   30,  -46,   33,   28,  -36, -127,   30,  -36,  -32,   28,  -28,  -31,   29,
+     -22,    1,   30,  102,   24,   81,   56,  -80,   67,   58, -100, -125,   59,  -52,   80,   36,
+     118,   96,    7,  123,  104,    7,   55,   96, -121,  119,  120,    7,  120, -104,   81,   76,
+     -12, -112,   15,  -16,   80,   14,    0,    0,  113,   32,    0,    0,   84,    0,    0,    0,
+      70,  -64,   84,   64,  -12,   83,   72,   51,  -35,  -10,   63,  -39, -128,   82,    1,  -47,
+      63,   56,   84,  -80,   16,  -90, -128,   20,   84,   35,   76, -120,  -45, -104,  -63,   82,
+       1,  -47, -113,   52,  -45,   -1,   76, -111,   53,   52,   18,   49,  105,  -53,  -30,    8,
+     -64, -124,   56, -115,   61,  100,  -53,   82,   49,   62,   67,   48,  -62, -125,   -7,   15,
+    -115,  -16,   -2,   67,   35,  -68, -113,  -24,  -72,    5,   32,   21,   16,   -3, -117,  -45,
+      24,  -74, -112,   20,   84,   35,   76, -120,  -45,  -68,  -26, -112,    6,   -1,  108,  -45,
+    -111,  -60,   18, -109,  -73,   16,   12,  -47,   76,  -38,  -12,   83,  -62,    1,   68,  -11,
+      29,   73,   63,  -80,   44, -114,    0,   76, -120,  -45,   28, -119,   81, -124,  -63,   63,
+     -41,  119,   36,  113,   11,    1,   68,  104, -112,   16,  -62, -108,  -42,  119,   36,   -3,
+     -64,  -78,   56,    2,   48,   33,   78,   99,    2,   73,    5,   68,  127,  -79,   56,  -64,
+     100,    9, -103,   31,   73,  126,   68,   12, -108,   64,   -4,   69,  -29,   75,   20,  -61,
+      57,   76, -128,   52,   68,  100,   23, -107,  127,   16,  -53,   67,   68,  -65,   68,   76,
+     -38,  -78,   56,    2,   48,   33,   78,   99,    5,   74,    5,   68,   -1,  -29,   32,  -51,
+     100,   27,   68, -126,   52,   66,   68,   48,   68,   51,   25,   67,   34,   17,  -45,   70,
+      21,    5,   17, -103,  -60,   34,   81,   12,  -25,   48,    1,  -46,   16, -111,   85,   68,
+      -2,   65,   44,   15,   17,   -3,    5,  -43,    8,   19,  -30,   52,  -81,   29,   56,   21,
+      16,   -3,  -64,  -78,   56,    2,   48,   33,   78,   99,    8, -100,   31,   73,  126,   68,
+      12, -108,   64,   -4,   69,  -29,   75,   20,  -93,    9,    2,  -59,   80,   11,   48,   57,
+    -111,    1,   28,   21,   16,   -3,   72,   51, -103,   69,  -28,   31,  -60,  -14,   16,  -47,
+      47,   17,  -45,   70,   21,    5,   17,   89, -124,   35,   81, -116,   38,    8,   20,   67,
+      45,  -64,  -28,   68,   54, -127,   -8, -111,  -28,   15, -109,   19,    1,    0,    0,    0,
+      97,   32,    0,    0,   38,    0,    0,    0,   19,    4,   65,   44,   16,    0,    0,    0,
+      12,    0,    0,    0,    4, -108,   64,   41,   20,   67,   57, -112,   80,    4,   20,   12,
+     101,   36, -123,  -96,    1,  100,   48, -108, -111,   20, -126,    6,   96,   68, -116,   17,
+    -128,   32,    8, -110,   96,   64,  -58,   24,    1,    8, -126,   32,    8, -126,   32,    8,
+    -110,   32,    1,    0, -125,   17,    0,   25,   12,  -64,   96,   68, -128,    6,    4,   48,
+      24,   33,  -84,  -63,    0,   12,   70,   12,  108,   64,    0, -125,   17,   68,   25,   12,
+     -64,   96, -124,   26, -104,  -63,    0,   12,   70,  -92,  -63,   25,   12,    0,    6,  -60,
+       0,    0,    0,    0,    9,    0,    0,    0,   91,    6,   32,   16, -123,   45,   67,   16,
+    -108,  -62, -106,   65,    8,   80,   97,  -53,   48,    4,  -85,  -80,  101,   32,    2,   81,
+     -40,   50,   20, -127,   40,  108,   25, -116,   64,   20,    0,    0,    0,    0,    0,    0,
+      97,   32,    0,    0,   11,    0,    0,    0,   19,    4,  -63,   96,    4,   64,    6,    3,
+    -128,  -31,   64,    0,    2,    0,    0,    0,   70,   50,    0, -111,    1,    0,    0,    0,
+       1,   49,    0,    0,    2,    0,    0,    0,   91,    6,   32,   16,    5,    0,    0,    0,
+       0,    0,    0,    0,   97,   32,    0,    0,   46,    0,    0,    0,   19,    4,   68,   44,
+      16,    0,    0,    0,    2,    0,    0,    0,    4, -108,    2,    9,   37,    0,    0,    0,
+     -61,   13,  100, -128, -103,  -63,   44,   67,   48, -100,    1,   25,  100, -106,   64,   24,
+     -88,   16,  -76,   96,   13, -124,  -15,    4,   52,   72, -125,  -63,    8,   53,   40, -125,
+       1,  -80,   52,   48,    3,   24,  -36,   26,    0,   48,  -36,  -64,    6,  100,    0,    6,
+     -77,   12, -125,  -48,    6,   24,   14,    4,   20,    0,    0,    0,  -90, -126,    0,   81,
+       4,   96,  -56,  112,   89, -118, -126,   52,   67,    5,   68, -110, -113,   84,  -58,  -78,
+      44,  -59,   20,   -7,   22,   50,   16,   72,  101,   43,   15,  -46,   12,   21,   16,   73,
+      62,   82,   -7,   13,  113,   77,   23,   96,   -8,   75,  -28,   63,  -57,   13,   44,   -2,
+      47,   68,  -56,  -12,   19, -125,   65,  -40,    9,   33,   48,   15,  110,   36,  -61, -128,
+      48,  -42, -126,   16,   23,   50,    9,   78,   51,    0,    0,    0,    1,   49,    0,    0,
+       3,    0,    0,    0,   91,    6,   33,  112, -123,   45, -125,   17, -120,    2,    0,    0,
+       0,    0,    0,    0,   97,   32,    0,    0,   45,    0,    0,    0,   19,    4,   68,   44,
+      16,    0,    0,    0,    5,    0,    0,    0,    4, -108,   64,   65, -112,   80,   64,  -44,
+    -108,    3,   93,   35,    0,  -28,  -40,   50,    7,    0,    0,    0,   51,   17,   12,   80,
+       6,  -60,  112,    3,   25,   96,  102,   48,  -53,   16,   12,  108,  112,  107,  -32,  -20,
+      44, -127,   48,   80,    1,   96,  -63,   27,    8,   35,    6,    8,    0,   60,  109,  -96,
+       6,  103,   96,    6,  105,   48,   98,   96,   40, -128,  -77,    6,  104,  -32,    6,  -26,
+       6,  101,    0, -125,  -31, -122,   55,   32,    3,   48, -104,  101,   24,    4,   56,  -64,
+     112,   32,    0,    0,   13,    0,    0,    0,  -74,   50,   76,  -52,  115,    1, -122,  -65,
+      68,   -2,  115,  -36,  -64,  -30,   -1,   66, -124,   76,   63,   49,   24, -124,  -79,   16,
+       2,  -13,  -32,   70,   50,   12,    8,   99,   47,    3,  -46,    8,  -26,   66,   92,   62,
+     -99,   27,   12,   66,   92,  -56,   36,   56,  -51,    0,    0,    0,    1,   49,    0,    0,
+       2,    0,    0,    0,   91,    6,  -93, -112,    5,    0,    0,    0,    0,    0,    0,    0,
       97,   32,    0,    0,   15,    0,    0,    0,   19,    4,   65,   44,   16,    0,    0,    0,
-       1,    0,    0,    0,    4, -108,    0,    0,  -57,    1,   97,   94,    7, -125,   -5,   30,
-      72,   48,    8,    7,    2,    0,    0,    0,    5,    0,    0,    0,  -26,   65,    8,   78,
-      83,   25, -121, -128,   52,    6,   82,    8,   78,   83,  -43,  -10,   49,    0,  -61,    0,
-       0,    0,    0,    0,   97,   32,    0,    0,   15,    0,    0,    0,   19,    4,    1,  113,
-     -61,  -68,   14,    4, -125,   17,  -36,   55,    0,   24,   14,    4,    4,    0,    0,    0,
-     -42,   49,   84,  -64,   98,   28,    5,   32,    8,   20,   99,   31,    3,   48,   12,    0,
-       1,   49,    0,    0,    3,    0,    0,    0,   91,    6,   32,  -16, -125,   45, -125,   16,
-      -8,    1,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,   17,    0,    0,    0,
-      19,    4,    1,  117, -125,  -72,   97,  -97,    7, -126,  -63,    8,   14,   12,    6,    0,
-     -61, -127,    0,    0,    4,    0,    0,    0,  -42,   49,   84,  -64,   98,   28,    5,   32,
-       8,   20,   99,   32,    3,   48,   12,    0,    1,   49,    0,    0,    4,    0,    0,    0,
-      91,    6,   32,  -16, -125,   45,   67,   16,   -8,  -63, -106,   97,    8,   -4,    0,    0,
-       0,    0,    0,    0,   97,   32,    0,    0,    3,    0,    0,    0,   19,    4,  -63, -120,
-       1, -127,    4, -112, -127,    0,    0,    0,   97,   32,    0,    0,    9,    0,    0,    0,
-      19,    4,  -63,  120,    3,   55,   73,  -44, -115,   17,    3,    2,    8,   22,   15,  -61,
-    -127,    0,    0,    0,    2,    0,    0,    0,    7,   80,   16,  -51,   20,   97,    0,    0,
+       1,    0,    0,    0,    4, -108,    0,    0,   71,    6,   64, -104,   25, -108,    1,   12,
+     -18,   12,   26,   72,   52,    8,    7,    2,    5,    0,    0,    0,  102,   66,    8,   78,
+      83,   25, -119, -128,   52, -122,   82,    8,   78,   83,  -43,  118,   50,    0,  -61,    0,
+       0,    0,    0,    0,   97,   32,    0,    0,   16,    0,    0,    0,   19,    4,    1, -111,
+     -63,   48,   51,   40,    3,   16,   12,   70, -112,  -63,   25,   12,    0, -122,    3,    1,
+       4,    0,    0,    0,   86,   50,   84,  -64,   98,   36,    5,   32,    8,   20,   99,   39,
+       3,   48,   12,    0,    1,   49,    0,    0,    3,    0,    0,    0,   91,    6,   32,   16,
+    -123,   45, -125,   16, -120,    2,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,
+      18,    0,    0,    0,   19,    4,    1, -107,  -63,   32,   50,   24,  118,    6,  102,    0,
+    -126,  -63,    8,   50,   64, -125,    1,  -64,  112,   32,    0,    0,    4,    0,    0,    0,
+      86,   50,   84,  -64,   98,   36,    5,   32,    8,   20,   99,   40,    3,   48,   12,    0,
+       1,   49,    0,    0,    4,    0,    0,    0,   91,    6,   32,   16, -123,   45,   67,   16,
+    -120,  -62, -106,   97,    8,   68,    1,    0,    0,    0,    0,    0,   97,   32,    0,    0,
+       3,    0,    0,    0,   19,    4,  -63, -120,    1,  -95,    4,  -44, -127,    0,    0,    0,
+      97,   32,    0,    0,    9,    0,    0,    0,   19,    4,  -63,  120,    3,   25,  104,   24,
+    -107,  -63,   24,   49,   32, -128,   96,   49,    3,   12,    7,    2,    2,    0,    0,    0,
+       7,   80,   16,  -51,   20,   97,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,
+       9,    0,    0,    0,   19,    4,  -63,  120,    3,   25,  104,   24, -107,  -63,   24,   49,
+      32, -128, -128,   49,    3,   12,    7,    2,    2,    0,    0,    0,    7,   80,   16,  -51,
+      20,   97,    0,    0,    0,    0,    0,    0,   97,   32,    0,    0,    9,    0,    0,    0,
+      19,    4,  -63,  120,    3,   25,  104,   24, -107,  -63,   24,   49,   32, -128,  -96,   49,
+       3,   12,    7,    2,    2,    0,    0,    0,    7,   80,   16,  -51,   20,   97,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,
 };
 
-const int bitCodeLength = 2744;
+const int bitCodeLength = 3480;
 
 #endif
diff --git a/tests/bar/1.0/Android.bp b/tests/bar/1.0/Android.bp
index 694804c..2edde20 100644
--- a/tests/bar/1.0/Android.bp
+++ b/tests/bar/1.0/Android.bp
@@ -38,6 +38,7 @@
     ],
     out: [
         "android/hardware/tests/bar/1.0/types.h",
+        "android/hardware/tests/bar/1.0/hwtypes.h",
         "android/hardware/tests/bar/1.0/IBar.h",
         "android/hardware/tests/bar/1.0/IHwBar.h",
         "android/hardware/tests/bar/1.0/BnHwBar.h",
diff --git a/tests/baz/1.0/Android.bp b/tests/baz/1.0/Android.bp
index 7939444..8f327e3 100644
--- a/tests/baz/1.0/Android.bp
+++ b/tests/baz/1.0/Android.bp
@@ -34,6 +34,7 @@
     ],
     out: [
         "android/hardware/tests/baz/1.0/types.h",
+        "android/hardware/tests/baz/1.0/hwtypes.h",
         "android/hardware/tests/baz/1.0/IBase.h",
         "android/hardware/tests/baz/1.0/IHwBase.h",
         "android/hardware/tests/baz/1.0/BnHwBase.h",
diff --git a/tests/baz/1.0/IBase.hal b/tests/baz/1.0/IBase.hal
index d5e3565..97b2db4 100644
--- a/tests/baz/1.0/IBase.hal
+++ b/tests/baz/1.0/IBase.hal
@@ -38,7 +38,7 @@
     };
 
     struct MoreThanOneArrayField {
-        /*
+        /**
          * Generated (Java) code used to redeclare the same variable name
          * multiple times in the same scope, this test ensures that that's no
          * longer the case.
diff --git a/tests/baz/1.0/default/Baz.cpp b/tests/baz/1.0/default/Baz.cpp
index 6252fbe..875fe65 100644
--- a/tests/baz/1.0/default/Baz.cpp
+++ b/tests/baz/1.0/default/Baz.cpp
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
+
 #include "Baz.h"
 #include <android-base/logging.h>
 
@@ -26,150 +42,6 @@
     return Void();
 }
 
-// TODO(b/35703683) : replace usage of below methods with toString()
-
-static std::string to_string(const IBaz::Foo::Bar &bar);
-static std::string to_string(const IBaz::Foo &foo);
-static std::string to_string(const hidl_string &s);
-static std::string to_string(bool x);
-static std::string to_string(const IBaz::StringMatrix5x3 &M);
-
-template<typename T, size_t SIZE>
-static std::string to_string(const hidl_array<T, SIZE> &array);
-
-template<size_t SIZE>
-static std::string to_string(const hidl_array<uint8_t, SIZE> &array);
-
-template<typename T>
-static std::string to_string(const hidl_vec<T> &vec) {
-    std::string out;
-    out = "[";
-    for (size_t i = 0; i < vec.size(); ++i) {
-        if (i > 0) {
-            out += ", ";
-        }
-        out += to_string(vec[i]);
-    }
-    out += "]";
-
-    return out;
-}
-
-template<typename T, size_t SIZE>
-static std::string to_string(const hidl_array<T, SIZE> &array) {
-    std::string out;
-    out = "[";
-    for (size_t i = 0; i < SIZE; ++i) {
-        if (i > 0) {
-            out += ", ";
-        }
-        out += to_string(array[i]);
-    }
-    out += "]";
-
-    return out;
-}
-
-template<size_t SIZE>
-static std::string to_string(const hidl_array<uint8_t, SIZE> &array) {
-    std::string out;
-    for (size_t i = 0; i < SIZE; ++i) {
-        if (i > 0) {
-            out += ":";
-        }
-
-        char tmp[3];
-        sprintf(tmp, "%02x", array[i]);
-
-        out += tmp;
-    }
-
-    return out;
-}
-
-template<typename T, size_t SIZE1, size_t SIZE2>
-static std::string to_string(const hidl_array<T, SIZE1, SIZE2> &array) {
-    std::string out;
-    out = "[";
-    for (size_t i = 0; i < SIZE1; ++i) {
-        if (i > 0) {
-            out += ", ";
-        }
-
-        out += "[";
-        for (size_t j = 0; j < SIZE2; ++j) {
-            if (j > 0) {
-                out += ", ";
-            }
-
-            out += to_string(array[i][j]);
-        }
-        out += "]";
-    }
-    out += "]";
-
-    return out;
-}
-
-static std::string to_string(bool x) {
-    return x ? "true" : "false";
-}
-
-static std::string to_string(const hidl_string &s) {
-    return std::string("'") + s.c_str() + "'";
-}
-
-static std::string to_string(const IBaz::Foo::Bar &bar) {
-    std::string out;
-    out = "Bar(";
-    out += "z = " + to_string(bar.z) + ", ";
-    out += "s = '" + std::string(bar.s.c_str()) + "'";
-    out += ")";
-
-    return out;
-}
-
-static std::string to_string(const IBaz::Foo &foo) {
-    std::string out;
-    out = "Foo(";
-    out += "x = " + to_string(foo.x) + ", ";
-    out += "y = " + to_string(foo.y) + ", ";
-    out += "aaa = " + to_string(foo.aaa);
-    out += ")";
-
-    return out;
-}
-
-static std::string to_string(const IBaz::StringMatrix5x3 &M) {
-    return to_string(M.s);
-}
-
-static std::string VectorOfArray_to_string(const IBaz::VectorOfArray &in) {
-    std::string out;
-    out += "VectorOfArray(";
-
-    for (size_t i = 0; i < in.addresses.size(); ++i) {
-        if (i > 0) {
-            out += ", ";
-        }
-
-        for (size_t j = 0; j < 6; ++j) {
-            if (j > 0) {
-                out += ":";
-            }
-
-            char tmp[3];
-            sprintf(tmp, "%02x", in.addresses[i][j]);
-
-            out += tmp;
-        }
-    }
-
-    out += ")";
-
-    return out;
-}
-
 // Methods from ::android::hardware::tests::baz::V1_0::IBase follow.
 Return<void> Baz::someBaseMethod() {
     LOG(INFO) << "Baz::someBaseMethod";
@@ -178,20 +50,14 @@
 }
 
 Return<bool> Baz::someBoolMethod(bool x) {
-    LOG(INFO) << "Baz::someBoolMethod(" << to_string(x) << ")";
+    LOG(INFO) << "Baz::someBoolMethod(" << std::to_string(x) << ")";
 
     return !x;
 }
 
 Return<void> Baz::someBoolArrayMethod(const hidl_array<bool, 3>& x,
                                       someBoolArrayMethod_cb _hidl_cb) {
-    LOG(INFO) << "Baz::someBoolArrayMethod("
-        << to_string(x[0])
-        << ", "
-        << to_string(x[1])
-        << ", "
-        << to_string(x[2])
-        << ")";
+    LOG(INFO) << "Baz::someBoolArrayMethod(" << toString(x) << ")";
 
     hidl_array<bool, 4> out;
     out[0] = !x[0];
@@ -205,7 +71,7 @@
 }
 
 Return<void> Baz::someBoolVectorMethod(const hidl_vec<bool>& x, someBoolVectorMethod_cb _hidl_cb) {
-    LOG(INFO) << "Baz::someBoolVectorMethod(" << to_string(x) << ")";
+    LOG(INFO) << "Baz::someBoolVectorMethod(" << toString(x) << ")";
 
     hidl_vec<bool> out;
     out.resize(x.size());
@@ -220,7 +86,7 @@
 
 Return<void> Baz::someOtherBaseMethod(const IBase::Foo& foo, someOtherBaseMethod_cb _hidl_cb) {
     LOG(INFO) << "Baz::someOtherBaseMethod "
-              << to_string(foo);
+              << toString(foo);
 
     _hidl_cb(foo);
 
@@ -230,7 +96,7 @@
 Return<void> Baz::someMethodWithFooArrays(const hidl_array<IBase::Foo, 2>& fooInput,
                                           someMethodWithFooArrays_cb _hidl_cb) {
     LOG(INFO) << "Baz::someMethodWithFooArrays "
-              << to_string(fooInput);
+              << toString(fooInput);
 
     hidl_array<IBaz::Foo, 2> fooOutput;
     fooOutput[0] = fooInput[1];
@@ -244,7 +110,7 @@
 Return<void> Baz::someMethodWithFooVectors(const hidl_vec<IBase::Foo>& fooInput,
                                            someMethodWithFooVectors_cb _hidl_cb) {
     LOG(INFO) << "Baz::someMethodWithFooVectors "
-              << to_string(fooInput);
+              << toString(fooInput);
 
     hidl_vec<IBaz::Foo> fooOutput;
     fooOutput.resize(2);
@@ -259,7 +125,7 @@
 Return<void> Baz::someMethodWithVectorOfArray(const IBase::VectorOfArray& in,
                                               someMethodWithVectorOfArray_cb _hidl_cb) {
     LOG(INFO) << "Baz::someMethodWithVectorOfArray "
-              << VectorOfArray_to_string(in);
+              << toString(in);
 
     IBase::VectorOfArray out;
 
@@ -278,7 +144,7 @@
 Return<void> Baz::someMethodTakingAVectorOfArray(const hidl_vec<hidl_array<uint8_t, 6>>& in,
                                                  someMethodTakingAVectorOfArray_cb _hidl_cb) {
     LOG(INFO) << "Baz::someMethodTakingAVectorOfArray "
-              << to_string(in);
+              << toString(in);
 
     const size_t n = in.size();
 
@@ -295,7 +161,7 @@
 }
 
 Return<void> Baz::transpose(const IBase::StringMatrix5x3& in, transpose_cb _hidl_cb) {
-    LOG(INFO) << "Baz::transpose " << to_string(in);
+    LOG(INFO) << "Baz::transpose " << toString(in);
 
     IBase::StringMatrix3x5 out;
     for (size_t i = 0; i < 3; ++i) {
@@ -310,7 +176,7 @@
 }
 
 Return<void> Baz::transpose2(const hidl_array<hidl_string, 5, 3>& in, transpose2_cb _hidl_cb) {
-    LOG(INFO) << "Baz::transpose2 " << to_string(in);
+    LOG(INFO) << "Baz::transpose2 " << toString(in);
 
     hidl_array<hidl_string, 3, 5> out;
     for (size_t i = 0; i < 3; ++i) {
@@ -443,7 +309,7 @@
 Return<void> Baz::haveSomeStrings(const hidl_array<hidl_string, 3>& array,
                                   haveSomeStrings_cb _hidl_cb) {
     LOG(INFO) << "haveSomeStrings("
-              << to_string(array)
+              << toString(array)
               << ")";
 
     hidl_array<hidl_string, 2> result;
@@ -457,7 +323,7 @@
 
 Return<void> Baz::haveAStringVec(const hidl_vec<hidl_string>& vector,
                                  haveAStringVec_cb _hidl_cb) {
-    LOG(INFO) << "haveAStringVec(" << to_string(vector) << ")";
+    LOG(INFO) << "haveAStringVec(" << toString(vector) << ")";
 
     hidl_vec<hidl_string> result;
     result.resize(2);
diff --git a/tests/baz/1.0/types.hal b/tests/baz/1.0/types.hal
index 030dbe5..694b459 100644
--- a/tests/baz/1.0/types.hal
+++ b/tests/baz/1.0/types.hal
@@ -16,7 +16,7 @@
 
 package android.hardware.tests.baz@1.0;
 
-/*
+/**
  * Verify that introducing a typedef in types.hal does not mistakenly emit
  * a makefile section to create a dedicated ulong.java class as it used to.
  */
diff --git a/tests/foo/1.0/Android.bp b/tests/foo/1.0/Android.bp
index 9572855..b221201 100644
--- a/tests/foo/1.0/Android.bp
+++ b/tests/foo/1.0/Android.bp
@@ -38,6 +38,7 @@
     ],
     out: [
         "android/hardware/tests/foo/1.0/types.h",
+        "android/hardware/tests/foo/1.0/hwtypes.h",
         "android/hardware/tests/foo/1.0/IFoo.h",
         "android/hardware/tests/foo/1.0/IHwFoo.h",
         "android/hardware/tests/foo/1.0/BnHwFoo.h",
diff --git a/tests/msgq/1.0/IBenchmarkMsgQ.hal b/tests/msgq/1.0/IBenchmarkMsgQ.hal
index 81754a4..6ee3485 100644
--- a/tests/msgq/1.0/IBenchmarkMsgQ.hal
+++ b/tests/msgq/1.0/IBenchmarkMsgQ.hal
@@ -17,7 +17,7 @@
 package android.hardware.tests.msgq@1.0;
 
 interface IBenchmarkMsgQ {
-    /*
+    /**
      * This method requests the service to set up Synchronous read/write
      * wait-free FMQ with the client as reader.
      * @return ret Will be true if the setup was successful, false otherwise.
@@ -27,7 +27,7 @@
     configureClientInboxSyncReadWrite()
         generates(bool ret, fmq_sync<uint8_t> mqDescIn);
 
-    /*
+    /**
      * This method requests the service to set up Synchronous read/write
      * wait-free FMQ with the client as writer.
      * @return ret Will be true if the setup was successful, false otherwise.
@@ -37,7 +37,7 @@
     configureClientOutboxSyncReadWrite()
         generates(bool ret, fmq_sync<uint8_t> mqDescOut);
 
-    /*
+    /**
      * This method request the service to write into the FMQ.
      * @param count Number to messages to write.
      * @return ret Will be true if the write operation was successful,
@@ -45,14 +45,14 @@
      */
     requestWrite(int32_t count) generates (bool ret);
 
-    /*
+    /**
      * This method request the service to read from the FMQ.
      * @param count Number to messages to read.
      * @ret Will be true if the read operation was successful, false otherwise.
      */
     requestRead(int32_t count) generates (bool ret);
 
-    /*
+    /**
      * This method kicks off a benchmarking experiment where
      * the client writes a message into its outbox FMQ,
      * the service reads it and writes it into the client's
@@ -62,14 +62,14 @@
      */
     benchmarkPingPong(uint32_t numIter);
 
-    /*
+    /**
      * This method kicks off a benchmarking experiment where
      * the service writes into an FMQ and the client reads the same.
      * @param numIter The number of iterations to run the experiment.
      */
     benchmarkServiceWriteClientRead(uint32_t numIter);
 
-    /*
+    /**
      * This method sends a vector of time duration(in ns).
      * @param timeData vector of time instants measured by client.
      * Each entry is the number of ns between the epoch and a
diff --git a/tests/msgq/1.0/ITestMsgQ.hal b/tests/msgq/1.0/ITestMsgQ.hal
index dfb9be4..350e26d 100644
--- a/tests/msgq/1.0/ITestMsgQ.hal
+++ b/tests/msgq/1.0/ITestMsgQ.hal
@@ -22,7 +22,7 @@
         FMQ_NOT_FULL  = 1 << 1,
     };
 
-    /*
+    /**
      * This method requests the service to set up a synchronous read/write
      * wait-free FMQ with the client as reader.
      *
@@ -33,7 +33,7 @@
     configureFmqSyncReadWrite()
         generates(bool ret, fmq_sync<uint16_t> mqDesc);
 
-    /*
+    /**
      * This method requests the service to return an MQDescriptor to
      * an unsynchronized FMQ set up by the server. If 'configureFmq' is
      * true, then the server sets up a new unsynchronized FMQ. This
@@ -48,7 +48,7 @@
      */
     getFmqUnsyncWrite(bool configureFmq) generates(bool ret, fmq_unsync<uint16_t> mqDesc);
 
-    /*
+    /**
      * This method request the service to write into the synchronized read/write
      * flavor of the FMQ.
      *
@@ -58,7 +58,7 @@
      */
     requestWriteFmqSync(int32_t count) generates(bool ret);
 
-    /*
+    /**
      * This method request the service to read from the synchronized read/write
      * FMQ.
      *
@@ -68,7 +68,7 @@
      */
     requestReadFmqSync(int32_t count) generates(bool ret);
 
-    /*
+    /**
      * This method request the service to write into the unsynchronized flavor
      * of FMQ.
      *
@@ -78,7 +78,7 @@
      */
     requestWriteFmqUnsync(int32_t count) generates(bool ret);
 
-    /*
+    /**
      * This method request the service to read from the unsynchronized flavor of
      * FMQ.
      *
@@ -88,7 +88,7 @@
      */
     requestReadFmqUnsync(int32_t count) generates(bool ret);
 
-    /*
+    /**
      * This method requests the service to trigger a blocking read.
      *
      * @param count Number of messages to read.
@@ -96,7 +96,7 @@
      */
     oneway requestBlockingRead(int32_t count);
 
-    /*
+    /**
      * This method requests the service to trigger a blocking read using
      * default Event Flag notification bits defined by the MessageQueue class.
      *
@@ -105,7 +105,7 @@
      */
     oneway requestBlockingReadDefaultEventFlagBits(int32_t count);
 
-    /*
+    /**
      * This method requests the service to repeatedly trigger blocking reads.
      *
      * @param count Number of messages to read in a single blocking read.
diff --git a/wifi/1.0/Android.bp b/wifi/1.0/Android.bp
index 2319999..df5c9d2 100644
--- a/wifi/1.0/Android.bp
+++ b/wifi/1.0/Android.bp
@@ -54,6 +54,7 @@
     ],
     out: [
         "android/hardware/wifi/1.0/types.h",
+        "android/hardware/wifi/1.0/hwtypes.h",
         "android/hardware/wifi/1.0/IWifi.h",
         "android/hardware/wifi/1.0/IHwWifi.h",
         "android/hardware/wifi/1.0/BnHwWifi.h",
diff --git a/wifi/1.0/Android.mk b/wifi/1.0/Android.mk
index eabc63d..82409de 100644
--- a/wifi/1.0/Android.mk
+++ b/wifi/1.0/Android.mk
@@ -226,6 +226,44 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (NanDataPathSecurityConfig)
+#
+GEN := $(intermediates)/android/hardware/wifi/V1_0/NanDataPathSecurityConfig.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.wifi@1.0::types.NanDataPathSecurityConfig
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (NanDataPathSecurityType)
+#
+GEN := $(intermediates)/android/hardware/wifi/V1_0/NanDataPathSecurityType.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.wifi@1.0::types.NanDataPathSecurityType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (NanDebugConfig)
 #
 GEN := $(intermediates)/android/hardware/wifi/V1_0/NanDebugConfig.java
@@ -359,6 +397,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (NanParamSizeLimits)
+#
+GEN := $(intermediates)/android/hardware/wifi/V1_0/NanParamSizeLimits.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.wifi@1.0::types.NanParamSizeLimits
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (NanPublishRequest)
 #
 GEN := $(intermediates)/android/hardware/wifi/V1_0/NanPublishRequest.java
@@ -2048,6 +2105,44 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (NanDataPathSecurityConfig)
+#
+GEN := $(intermediates)/android/hardware/wifi/V1_0/NanDataPathSecurityConfig.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.wifi@1.0::types.NanDataPathSecurityConfig
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (NanDataPathSecurityType)
+#
+GEN := $(intermediates)/android/hardware/wifi/V1_0/NanDataPathSecurityType.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.wifi@1.0::types.NanDataPathSecurityType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (NanDebugConfig)
 #
 GEN := $(intermediates)/android/hardware/wifi/V1_0/NanDebugConfig.java
@@ -2181,6 +2276,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (NanParamSizeLimits)
+#
+GEN := $(intermediates)/android/hardware/wifi/V1_0/NanParamSizeLimits.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.wifi@1.0::types.NanParamSizeLimits
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (NanPublishRequest)
 #
 GEN := $(intermediates)/android/hardware/wifi/V1_0/NanPublishRequest.java
diff --git a/wifi/1.0/default/Android.mk b/wifi/1.0/default/Android.mk
index cc5e1c6..13f6cc1 100644
--- a/wifi/1.0/default/Android.mk
+++ b/wifi/1.0/default/Android.mk
@@ -48,6 +48,5 @@
     libwifi-hal \
     libwifi-system \
     libcld80211
-LOCAL_WHOLE_STATIC_LIBRARIES := $(LIB_WIFI_HAL)
 LOCAL_INIT_RC := android.hardware.wifi@1.0-service.rc
 include $(BUILD_EXECUTABLE)
diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp
index fb93c5a..c005213 100644
--- a/wifi/1.0/default/hidl_struct_util.cpp
+++ b/wifi/1.0/default/hidl_struct_util.cpp
@@ -973,17 +973,41 @@
         hidl_request.baseConfigs.disableMatchExpirationIndication ? 0x2 : 0x0;
   legacy_request->recv_indication_cfg |=
         hidl_request.baseConfigs.disableFollowupReceivedIndication ? 0x4 : 0x0;
-  legacy_request->cipher_type = (unsigned int) hidl_request.baseConfigs.cipherType;
-  legacy_request->pmk_len = hidl_request.baseConfigs.pmk.size();
-  if (legacy_request->pmk_len > NAN_PMK_INFO_LEN) {
-    LOG(ERROR) << "convertHidlNanPublishRequestToLegacy: pmk_len too large";
-    return false;
+  legacy_request->cipher_type = (unsigned int) hidl_request.baseConfigs.securityConfig.cipherType;
+  if (hidl_request.baseConfigs.securityConfig.securityType == NanDataPathSecurityType::PMK) {
+    legacy_request->key_info.key_type = legacy_hal::NAN_SECURITY_KEY_INPUT_PMK;
+    legacy_request->key_info.body.pmk_info.pmk_len =
+        hidl_request.baseConfigs.securityConfig.pmk.size();
+    if (legacy_request->key_info.body.pmk_info.pmk_len > NAN_PMK_INFO_LEN) {
+      LOG(ERROR) << "convertHidlNanPublishRequestToLegacy: pmk_len too large";
+      return false;
+    }
+    memcpy(legacy_request->key_info.body.pmk_info.pmk,
+          hidl_request.baseConfigs.securityConfig.pmk.data(),
+          legacy_request->key_info.body.pmk_info.pmk_len);
   }
-  memcpy(legacy_request->pmk,
-        hidl_request.baseConfigs.pmk.data(),
-        legacy_request->pmk_len);
-  legacy_request->sdea_params.security_cfg = hidl_request.baseConfigs.securityEnabledInNdp ?
-        legacy_hal::NAN_DP_CONFIG_SECURITY : legacy_hal::NAN_DP_CONFIG_NO_SECURITY;
+  if (hidl_request.baseConfigs.securityConfig.securityType
+        == NanDataPathSecurityType::PASSPHRASE) {
+    legacy_request->key_info.key_type = legacy_hal::NAN_SECURITY_KEY_INPUT_PASSPHRASE;
+    legacy_request->key_info.body.passphrase_info.passphrase_len =
+        hidl_request.baseConfigs.securityConfig.passphrase.size();
+    if (legacy_request->key_info.body.passphrase_info.passphrase_len
+            < NAN_SECURITY_MIN_PASSPHRASE_LEN) {
+      LOG(ERROR) << "convertHidlNanPublishRequestToLegacy: passphrase_len too small";
+      return false;
+    }
+    if (legacy_request->key_info.body.passphrase_info.passphrase_len
+            > NAN_SECURITY_MIN_PASSPHRASE_LEN) {
+      LOG(ERROR) << "convertHidlNanPublishRequestToLegacy: passphrase_len too large";
+      return false;
+    }
+    memcpy(legacy_request->key_info.body.passphrase_info.passphrase,
+          hidl_request.baseConfigs.securityConfig.passphrase.data(),
+          legacy_request->key_info.body.passphrase_info.passphrase_len);
+  }
+  legacy_request->sdea_params.security_cfg = (hidl_request.baseConfigs.securityConfig.securityType
+        != NanDataPathSecurityType::OPEN) ? legacy_hal::NAN_DP_CONFIG_SECURITY
+            : legacy_hal::NAN_DP_CONFIG_NO_SECURITY;
   legacy_request->sdea_params.ranging_state = hidl_request.baseConfigs.rangingRequired ?
         legacy_hal::NAN_RANGING_ENABLE : legacy_hal::NAN_RANGING_DISABLE;
   legacy_request->ranging_cfg.ranging_interval_msec = hidl_request.baseConfigs.rangingIntervalMsec;
@@ -1066,17 +1090,40 @@
         hidl_request.baseConfigs.disableMatchExpirationIndication ? 0x2 : 0x0;
   legacy_request->recv_indication_cfg |=
         hidl_request.baseConfigs.disableFollowupReceivedIndication ? 0x4 : 0x0;
-  legacy_request->cipher_type = (unsigned int) hidl_request.baseConfigs.cipherType;
-  legacy_request->pmk_len = hidl_request.baseConfigs.pmk.size();
-  if (legacy_request->pmk_len > NAN_PMK_INFO_LEN) {
-    LOG(ERROR) << "convertHidlNanSubscribeRequestToLegacy: pmk_len too large";
-    return false;
+  legacy_request->cipher_type = (unsigned int) hidl_request.baseConfigs.securityConfig.cipherType;
+  if (hidl_request.baseConfigs.securityConfig.securityType == NanDataPathSecurityType::PMK) {
+    legacy_request->key_info.key_type = legacy_hal::NAN_SECURITY_KEY_INPUT_PMK;
+    legacy_request->key_info.body.pmk_info.pmk_len =
+        hidl_request.baseConfigs.securityConfig.pmk.size();
+    if (legacy_request->key_info.body.pmk_info.pmk_len > NAN_PMK_INFO_LEN) {
+      LOG(ERROR) << "convertHidlNanSubscribeRequestToLegacy: pmk_len too large";
+      return false;
+    }
+    memcpy(legacy_request->key_info.body.pmk_info.pmk,
+          hidl_request.baseConfigs.securityConfig.pmk.data(),
+          legacy_request->key_info.body.pmk_info.pmk_len);
   }
-  memcpy(legacy_request->pmk,
-        hidl_request.baseConfigs.pmk.data(),
-        legacy_request->pmk_len);
-  legacy_request->sdea_params.security_cfg = hidl_request.baseConfigs.securityEnabledInNdp ?
-        legacy_hal::NAN_DP_CONFIG_SECURITY : legacy_hal::NAN_DP_CONFIG_NO_SECURITY;
+  if (hidl_request.baseConfigs.securityConfig.securityType == NanDataPathSecurityType::PASSPHRASE) {
+    legacy_request->key_info.key_type = legacy_hal::NAN_SECURITY_KEY_INPUT_PASSPHRASE;
+    legacy_request->key_info.body.passphrase_info.passphrase_len =
+        hidl_request.baseConfigs.securityConfig.passphrase.size();
+    if (legacy_request->key_info.body.passphrase_info.passphrase_len
+            < NAN_SECURITY_MIN_PASSPHRASE_LEN) {
+      LOG(ERROR) << "convertHidlNanSubscribeRequestToLegacy: passphrase_len too small";
+      return false;
+    }
+    if (legacy_request->key_info.body.passphrase_info.passphrase_len
+            > NAN_SECURITY_MIN_PASSPHRASE_LEN) {
+      LOG(ERROR) << "convertHidlNanSubscribeRequestToLegacy: passphrase_len too large";
+      return false;
+    }
+    memcpy(legacy_request->key_info.body.passphrase_info.passphrase,
+          hidl_request.baseConfigs.securityConfig.passphrase.data(),
+          legacy_request->key_info.body.passphrase_info.passphrase_len);
+  }
+  legacy_request->sdea_params.security_cfg = (hidl_request.baseConfigs.securityConfig.securityType
+          != NanDataPathSecurityType::OPEN) ? legacy_hal::NAN_DP_CONFIG_SECURITY
+              : legacy_hal::NAN_DP_CONFIG_NO_SECURITY;
   legacy_request->sdea_params.ranging_state = hidl_request.baseConfigs.rangingRequired ?
         legacy_hal::NAN_RANGING_ENABLE : legacy_hal::NAN_RANGING_DISABLE;
   legacy_request->ranging_cfg.ranging_interval_msec = hidl_request.baseConfigs.rangingIntervalMsec;
@@ -1251,8 +1298,9 @@
         (legacy_hal::NanDataPathChannelCfg) hidl_request.channelRequestType;
   legacy_request->channel = hidl_request.channel;
   strcpy(legacy_request->ndp_iface, hidl_request.ifaceName.c_str());
-  legacy_request->ndp_cfg.security_cfg = hidl_request.securityRequired ?
-        legacy_hal::NAN_DP_CONFIG_SECURITY : legacy_hal::NAN_DP_CONFIG_NO_SECURITY;
+  legacy_request->ndp_cfg.security_cfg = (hidl_request.securityConfig.securityType
+        != NanDataPathSecurityType::OPEN) ? legacy_hal::NAN_DP_CONFIG_SECURITY
+            : legacy_hal::NAN_DP_CONFIG_NO_SECURITY;
   legacy_request->app_info.ndp_app_info_len = hidl_request.appInfo.size();
   if (legacy_request->app_info.ndp_app_info_len > NAN_DP_MAX_APP_INFO_LEN) {
     LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: ndp_app_info_len too large";
@@ -1260,13 +1308,43 @@
   }
   memcpy(legacy_request->app_info.ndp_app_info, hidl_request.appInfo.data(),
         legacy_request->app_info.ndp_app_info_len);
-  legacy_request->cipher_type = (unsigned int) hidl_request.cipherType;
-  legacy_request->pmk_len = hidl_request.pmk.size();
-  if (legacy_request->pmk_len > NAN_PMK_INFO_LEN) {
-    LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: pmk_len too large";
+  legacy_request->cipher_type = (unsigned int) hidl_request.securityConfig.cipherType;
+  if (hidl_request.securityConfig.securityType == NanDataPathSecurityType::PMK) {
+    legacy_request->key_info.key_type = legacy_hal::NAN_SECURITY_KEY_INPUT_PMK;
+    legacy_request->key_info.body.pmk_info.pmk_len = hidl_request.securityConfig.pmk.size();
+    if (legacy_request->key_info.body.pmk_info.pmk_len > NAN_PMK_INFO_LEN) {
+      LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: pmk_len too large";
+      return false;
+    }
+    memcpy(legacy_request->key_info.body.pmk_info.pmk,
+          hidl_request.securityConfig.pmk.data(),
+          legacy_request->key_info.body.pmk_info.pmk_len);
+  }
+  if (hidl_request.securityConfig.securityType == NanDataPathSecurityType::PASSPHRASE) {
+    legacy_request->key_info.key_type = legacy_hal::NAN_SECURITY_KEY_INPUT_PASSPHRASE;
+    legacy_request->key_info.body.passphrase_info.passphrase_len =
+        hidl_request.securityConfig.passphrase.size();
+    if (legacy_request->key_info.body.passphrase_info.passphrase_len
+            < NAN_SECURITY_MIN_PASSPHRASE_LEN) {
+      LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: passphrase_len too small";
+      return false;
+    }
+    if (legacy_request->key_info.body.passphrase_info.passphrase_len
+            > NAN_SECURITY_MIN_PASSPHRASE_LEN) {
+      LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: passphrase_len too large";
+      return false;
+    }
+    memcpy(legacy_request->key_info.body.passphrase_info.passphrase,
+          hidl_request.securityConfig.passphrase.data(),
+          legacy_request->key_info.body.passphrase_info.passphrase_len);
+  }
+  legacy_request->service_name_len = hidl_request.serviceNameOutOfBand.size();
+  if (legacy_request->service_name_len > NAN_MAX_SERVICE_NAME_LEN) {
+    LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: service_name_len too large";
     return false;
   }
-  memcpy(legacy_request->pmk, hidl_request.pmk.data(), legacy_request->pmk_len);
+  memcpy(legacy_request->service_name, hidl_request.serviceNameOutOfBand.data(),
+        legacy_request->service_name_len);
 
   return true;
 }
@@ -1284,8 +1362,9 @@
         legacy_hal::NAN_DP_REQUEST_ACCEPT : legacy_hal::NAN_DP_REQUEST_REJECT;
   legacy_request->ndp_instance_id = hidl_request.ndpInstanceId;
   strcpy(legacy_request->ndp_iface, hidl_request.ifaceName.c_str());
-  legacy_request->ndp_cfg.security_cfg = hidl_request.securityRequired ?
-        legacy_hal::NAN_DP_CONFIG_SECURITY : legacy_hal::NAN_DP_CONFIG_NO_SECURITY;
+  legacy_request->ndp_cfg.security_cfg = (hidl_request.securityConfig.securityType
+        != NanDataPathSecurityType::OPEN) ? legacy_hal::NAN_DP_CONFIG_SECURITY
+            : legacy_hal::NAN_DP_CONFIG_NO_SECURITY;
   legacy_request->app_info.ndp_app_info_len = hidl_request.appInfo.size();
   if (legacy_request->app_info.ndp_app_info_len > NAN_DP_MAX_APP_INFO_LEN) {
     LOG(ERROR) << "convertHidlNanDataPathIndicationResponseToLegacy: ndp_app_info_len too large";
@@ -1293,13 +1372,43 @@
   }
   memcpy(legacy_request->app_info.ndp_app_info, hidl_request.appInfo.data(),
         legacy_request->app_info.ndp_app_info_len);
-  legacy_request->cipher_type = (unsigned int) hidl_request.cipherType;
-  legacy_request->pmk_len = hidl_request.pmk.size();
-  if (legacy_request->pmk_len > NAN_PMK_INFO_LEN) {
-    LOG(ERROR) << "convertHidlNanDataPathIndicationResponseToLegacy: pmk_len too large";
+  legacy_request->cipher_type = (unsigned int) hidl_request.securityConfig.cipherType;
+  if (hidl_request.securityConfig.securityType == NanDataPathSecurityType::PMK) {
+    legacy_request->key_info.key_type = legacy_hal::NAN_SECURITY_KEY_INPUT_PMK;
+    legacy_request->key_info.body.pmk_info.pmk_len = hidl_request.securityConfig.pmk.size();
+    if (legacy_request->key_info.body.pmk_info.pmk_len > NAN_PMK_INFO_LEN) {
+      LOG(ERROR) << "convertHidlNanDataPathIndicationResponseToLegacy: pmk_len too large";
+      return false;
+    }
+    memcpy(legacy_request->key_info.body.pmk_info.pmk,
+          hidl_request.securityConfig.pmk.data(),
+          legacy_request->key_info.body.pmk_info.pmk_len);
+  }
+  if (hidl_request.securityConfig.securityType == NanDataPathSecurityType::PASSPHRASE) {
+    legacy_request->key_info.key_type = legacy_hal::NAN_SECURITY_KEY_INPUT_PASSPHRASE;
+    legacy_request->key_info.body.passphrase_info.passphrase_len =
+        hidl_request.securityConfig.passphrase.size();
+    if (legacy_request->key_info.body.passphrase_info.passphrase_len
+            < NAN_SECURITY_MIN_PASSPHRASE_LEN) {
+      LOG(ERROR) << "convertHidlNanDataPathIndicationResponseToLegacy: passphrase_len too small";
+      return false;
+    }
+    if (legacy_request->key_info.body.passphrase_info.passphrase_len
+            > NAN_SECURITY_MIN_PASSPHRASE_LEN) {
+      LOG(ERROR) << "convertHidlNanDataPathIndicationResponseToLegacy: passphrase_len too large";
+      return false;
+    }
+    memcpy(legacy_request->key_info.body.passphrase_info.passphrase,
+          hidl_request.securityConfig.passphrase.data(),
+          legacy_request->key_info.body.passphrase_info.passphrase_len);
+  }
+  legacy_request->service_name_len = hidl_request.serviceNameOutOfBand.size();
+  if (legacy_request->service_name_len > NAN_MAX_SERVICE_NAME_LEN) {
+    LOG(ERROR) << "convertHidlNanDataPathIndicationResponseToLegacy: service_name_len too large";
     return false;
   }
-  memcpy(legacy_request->pmk, hidl_request.pmk.data(), legacy_request->pmk_len);
+  memcpy(legacy_request->service_name, hidl_request.serviceNameOutOfBand.data(),
+        legacy_request->service_name_len);
 
   return true;
 }
diff --git a/wifi/1.0/default/wifi_legacy_hal.cpp b/wifi/1.0/default/wifi_legacy_hal.cpp
index 5fc0228..ba57ba7 100644
--- a/wifi/1.0/default/wifi_legacy_hal.cpp
+++ b/wifi/1.0/default/wifi_legacy_hal.cpp
@@ -328,9 +328,8 @@
   wifi_error status = init_wifi_vendor_hal_func_table(&global_func_table_);
   if (status != WIFI_SUCCESS) {
     LOG(ERROR) << "Failed to initialize legacy hal function table";
-    return WIFI_ERROR_UNKNOWN;
   }
-  return WIFI_SUCCESS;
+  return status;
 }
 
 wifi_error WifiLegacyHal::start() {
diff --git a/wifi/1.0/types.hal b/wifi/1.0/types.hal
index d3845c9..1662312 100644
--- a/wifi/1.0/types.hal
+++ b/wifi/1.0/types.hal
@@ -586,6 +586,17 @@
  */
 
 /**
+ * Size limits for parameters used in the NAN interface.
+ */
+enum NanParamSizeLimits : uint32_t {
+  /** Minimum length of Passphrase argument for data-path configuration */
+  MIN_PASSPHRASE_LENGTH = 8,
+
+  /** Maximum length of Passphrase argument for data-path configuration */
+  MAX_PASSPHRASE_LENGTH = 63,
+};
+
+/**
  * A unique short handle provided by the client to identify individual invocations of
  * certain API's like |IWifiNanIface.*|.
  */
@@ -596,29 +607,29 @@
  */
 enum NanStatusType : uint32_t {
   SUCCESS = 0,
-  /* NAN Discovery Engine/Host driver failures */
+  /** NAN Discovery Engine/Host driver failures */
   INTERNAL_FAILURE = 1,
-  /* NAN OTA failures */
+  /** NAN OTA failures */
   PROTOCOL_FAILURE = 2,
-  /* The publish/subscribe discovery session id is invalid */
+  /** The publish/subscribe discovery session id is invalid */
   INVALID_SESSION_ID = 3,
-  /* Out of resources to fufill request */
+  /** Out of resources to fufill request */
   NO_RESOURCES_AVAILABLE = 4,
-  /* Invalid arguments passed */
+  /** Invalid arguments passed */
   INVALID_ARGS = 5,
-  /* Invalid peer id */
+  /** Invalid peer id */
   INVALID_PEER_ID = 6,
-  /* Invalid NAN data-path (ndp) id */
+  /** Invalid NAN data-path (ndp) id */
   INVALID_NDP_ID = 7,
-  /* Attempting to enable NAN when not available, e.g. wifi is disabled */
+  /** Attempting to enable NAN when not available, e.g. wifi is disabled */
   NAN_NOT_ALLOWED = 8,
-  /* Over the air ACK not received */
+  /** Over the air ACK not received */
   NO_OTA_ACK = 9,
-  /* Attempting to enable NAN when already enabled */
+  /** Attempting to enable NAN when already enabled */
   ALREADY_ENABLED = 10,
-  /* Can't queue tx followup message foor transmission */
+  /** Can't queue tx followup message foor transmission */
   FOLLOWUP_TX_QUEUE_FULL = 11,
-  /* Unsupported concurrency of NAN and another feature - NAN disabled */
+  /** Unsupported concurrency of NAN and another feature - NAN disabled */
   UNSUPPORTED_CONCURRENCY_NAN_DISABLED = 12
 };
 
@@ -701,6 +712,15 @@
 };
 
 /**
+ * NAN DP (data-path) security configuration options.
+ */
+enum NanDataPathSecurityType : uint32_t {
+  OPEN,       // no security
+  PMK,        // security: PMK
+  PASSPHRASE, // security: passphrase
+};
+
+/**
  * NAN band-specific configuration.
  */
 struct NanBandSpecificConfig {
@@ -910,6 +930,38 @@
 };
 
 /**
+ * Configuration of NAN data-path security.
+ */
+struct NanDataPathSecurityConfig {
+  /**
+   * Security configuration of the data-path (NDP). Security is required if not equal to
+   * |NanDataPathSecurityType.OPEN|.
+   * NAN Spec: Service Discovery Extension Attribute (SDEA) / Control / Security Required
+   */
+  NanDataPathSecurityType securityType;
+  /**
+   * Cipher type for data-paths. If |securityType| is |NanDataPathSecurityType.OPEN| then must
+   * be set to |NanCipherSuiteType.NONE|, otherwise a non-|NanCipherSuiteType.NONE| cipher suite
+   * must be specified.
+   */
+  NanCipherSuiteType cipherType;
+  /**
+   * Optional Pairwise Master Key (PMK). Must be specified (and is only used) if |securityType| is
+   * set to |NanDataPathSecurityType.PMK|.
+   * Ref: IEEE 802.11i
+   */
+  uint8_t[32] pmk;
+  /**
+   * Optional Passphrase. Must be specified (and is only used) if |securityType| is set to
+   * |NanDataPathSecurityType.PASSPHRASE|.
+   * Min length: |MIN_PASSPHRASE_LENGTH|
+   * Max length: |MAX_PASSPHRASE_LENGTH|
+   * NAN Spec: Appendix: Mapping pass-phrase to PMK for NCS-SK Cipher Suites
+   */
+  vec<uint8_t> passphrase;
+};
+
+/**
  * Configurations of NAN discovery sessions: common to publish and subscribe discovery.
  */
 struct NanDiscoveryCommonConfig {
@@ -1009,25 +1061,11 @@
    */
   bool disableFollowupReceivedIndication;
   /**
-   * Cipher type for data-paths constructed in the context of this discovery session. Must be
-   * specified as |NanCipherSuiteType.NONE| if no |pmk| is provided.
+   * Security configuration of data-paths created in the context of this discovery session. Security
+   * parameters can be overridden during the actual construction of the data-path - allowing
+   * individual data-paths to have unique PMKs or Passphrases.
    */
-  NanCipherSuiteType cipherType;
-  /**
-   * Optional Pairwise Master Key (PMK) for data-paths constructed in the context of this discovery
-   * session. A PMK can also be provided during the actual construction of the data-path (which
-   * allows for unique PMKs for each data-path). The |cipherType| must be specified if a PMK is
-   * provided.
-   * Max length: 32
-   * Ref: IEEE 802.11i
-   */
-  vec<uint8_t> pmk;
-  /**
-   * Specifies whether or not security is enabled in any data-path (NDP) constructed in the context
-   * of this discovery session.
-   * NAN Spec: Service Discovery Extension Attribute (SDEA) / Control / Security Required
-   */
-  bool securityEnabledInNdp;
+  NanDataPathSecurityConfig securityConfig;
   /**
    * Specifies whether or not there is a ranging requirement in this discovery session.
    * Ranging is only performed if all other match criteria with the peer are met. Ranging must
@@ -1213,10 +1251,9 @@
    */
   string ifaceName;
   /**
-   * Specifies whether or not security is required for the data-path being created.
-   * NAN Spec: Data Path Attributes / NDP Attribute / NDP Control / Security Present
+   * Security configuration of the requested data-path.
    */
-  bool securityRequired;
+  NanDataPathSecurityConfig securityConfig;
   /**
    * Arbitrary information communicated to the peer as part of the data-path setup process - there
    * is no semantic meaning to these bytes. They are passed-through from sender to receiver as-is
@@ -1226,17 +1263,13 @@
    */
   vec<uint8_t> appInfo;
   /**
-   * Cipher type for the data-path being requested. Must be specified as |NanCipherSuiteType.NONE|
-   * if no |pmk| is provided.
+   * A service name to be used with |passphrase| to construct a Pairwise Master Key (PMK) for the
+   * data-path. Only relevant when a data-path is requested which is not associated with a NAN
+   * discovery session - e.g. using out-of-band discovery.
+   * Constraints: same as |NanDiscoveryCommonConfig.serviceName|
+   * NAN Spec: Appendix: Mapping pass-phrase to PMK for NCS-SK Cipher Suites
    */
-  NanCipherSuiteType cipherType;
-  /**
-   * Pairwise Master Key (PMK) for the data-path being requested (if |securityRequired| is true).
-   * The |cipherType| must be specified if a PMK is provided.
-   * Max length: 32
-   * Ref: IEEE 802.11i
-   */
-  vec<uint8_t> pmk;
+  vec<uint8_t> serviceNameOutOfBand;
 };
 
 /**
@@ -1259,10 +1292,9 @@
    */
   string ifaceName;
   /**
-   * Specifies whether or not security is required for the data-path being created.
-   * NAN Spec: Data Path Attributes / NDP Attribute / NDP Control / Security Present
+   * Security configuration of the requested data-path.
    */
-  bool securityRequired;
+  NanDataPathSecurityConfig securityConfig;
   /**
    * Arbitrary information communicated to the peer as part of the data-path setup process - there
    * is no semantic meaning to these bytes. They are passed-through from sender to receiver as-is
@@ -1272,16 +1304,13 @@
    */
   vec<uint8_t> appInfo;
   /**
-   * Cipher type for the data-path being negotiated. Must be specified as |NanCipherSuiteType.NONE|
-   * if no |pmk| is provided.
+   * A service name to be used with |passphrase| to construct a Pairwise Master Key (PMK) for the
+   * data-path. Only relevant when a data-path is requested which is not associated with a NAN
+   * discovery session - e.g. using out-of-band discovery.
+   * Constraints: same as |NanDiscoveryCommonConfig.serviceName|
+   * NAN Spec: Appendix: Mapping pass-phrase to PMK for NCS-SK Cipher Suites
    */
-  NanCipherSuiteType cipherType;
-  /**
-   * Pairwise Master Key (PMK) for the data-path being negotiated (if |securityRequired| is true).
-   * The |cipherType| must be specified if a PMK is provided.
-   * Max length: 32
-   */
-  vec<uint8_t> pmk;
+  vec<uint8_t> serviceNameOutOfBand;
 };
 
 /**
diff --git a/wifi/1.0/vts/functional/Android.bp b/wifi/1.0/vts/functional/Android.bp
index 9403e98..b454a06 100644
--- a/wifi/1.0/vts/functional/Android.bp
+++ b/wifi/1.0/vts/functional/Android.bp
@@ -17,7 +17,7 @@
 cc_library_static {
     name: "VtsHalWifiV1_0TargetTestUtil",
     srcs: [
-        "VtsHalWifiV1_0TargetTest.cpp",
+
         "wifi_hidl_call_util_selftest.cpp",
         "wifi_hidl_test.cpp",
         "wifi_hidl_test_utils.cpp"],
@@ -38,6 +38,7 @@
     name: "VtsHalWifiV1_0TargetTest",
     defaults: ["hidl_defaults"],
     srcs: [
+        "VtsHalWifiV1_0TargetTest.cpp",
         "wifi_ap_iface_hidl_test.cpp",
         "wifi_chip_hidl_test.cpp",
         "wifi_p2p_iface_hidl_test.cpp",
@@ -63,7 +64,9 @@
 cc_test {
     name: "VtsHalWifiNanV1_0TargetTest",
     defaults: ["hidl_defaults"],
-    srcs: ["wifi_nan_iface_hidl_test.cpp"],
+    srcs: [
+        "VtsHalWifiV1_0TargetTest.cpp",
+        "wifi_nan_iface_hidl_test.cpp"],
     shared_libs: [
         "libbase",
         "liblog",
diff --git a/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp b/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp
index b56ed2b..160fcd2 100644
--- a/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp
+++ b/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp
@@ -20,14 +20,6 @@
 
 #include "wifi_hidl_test_utils.h"
 
-class WifiHidlEnvironment : public ::testing::Environment {
-   public:
-    virtual void SetUp() override { stopFramework(); }
-    virtual void TearDown() override { startFramework(); }
-
-   private:
-};
-
 int main(int argc, char** argv) {
     ::testing::AddGlobalTestEnvironment(new WifiHidlEnvironment);
     ::testing::InitGoogleTest(&argc, argv);
diff --git a/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp b/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
index 2d0b081..fefbd79 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
+++ b/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
@@ -82,14 +82,6 @@
 }
 }  // namespace
 
-void stopFramework() {
-    ASSERT_EQ(std::system("stop"), 0);
-    stopWifi();
-    sleep(5);
-}
-
-void startFramework() { ASSERT_EQ(std::system("start"), 0); }
-
 sp<IWifi> getWifi() {
     sp<IWifi> wifi = ::testing::VtsHalHidlTargetTestBase::getService<IWifi>();
     return wifi;
diff --git a/wifi/1.0/vts/functional/wifi_hidl_test_utils.h b/wifi/1.0/vts/functional/wifi_hidl_test_utils.h
index a723b2a..39a0eba 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_test_utils.h
+++ b/wifi/1.0/vts/functional/wifi_hidl_test_utils.h
@@ -24,11 +24,6 @@
 #include <android/hardware/wifi/1.0/IWifiRttController.h>
 #include <android/hardware/wifi/1.0/IWifiStaIface.h>
 
-// Used to stop the android framework (wifi service) before every
-// test.
-void stopFramework();
-void startFramework();
-
 // Helper functions to obtain references to the various HIDL interface objects.
 // Note: We only have a single instance of each of these objects currently.
 // These helper functions should be modified to return vectors if we support
@@ -49,3 +44,12 @@
     android::hardware::wifi::V1_0::ChipModeId* configured_mode_id);
 // Used to trigger IWifi.stop() at the end of every test.
 void stopWifi();
+
+class WifiHidlEnvironment : public ::testing::Environment {
+ public:
+  virtual void SetUp() override {
+      stopWifi();
+      sleep(5);
+  }
+  virtual void TearDown() override {}
+};
\ No newline at end of file
diff --git a/wifi/supplicant/1.0/Android.bp b/wifi/supplicant/1.0/Android.bp
index a6c2758..a0adb8d 100644
--- a/wifi/supplicant/1.0/Android.bp
+++ b/wifi/supplicant/1.0/Android.bp
@@ -52,6 +52,7 @@
     ],
     out: [
         "android/hardware/wifi/supplicant/1.0/types.h",
+        "android/hardware/wifi/supplicant/1.0/hwtypes.h",
         "android/hardware/wifi/supplicant/1.0/ISupplicant.h",
         "android/hardware/wifi/supplicant/1.0/IHwSupplicant.h",
         "android/hardware/wifi/supplicant/1.0/BnHwSupplicant.h",
diff --git a/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal b/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
index 166ad96..173cce9 100644
--- a/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
@@ -346,6 +346,24 @@
   };
 
   /**
+   * BSSID change Reasons.
+   */
+  enum BssidChangeReason : uint8_t {
+    /**
+     * Started association with new bssid.
+     */
+    ASSOC_START = 0,
+    /**
+     * Completed association with new bssid.
+     */
+    ASSOC_COMPLETE = 1,
+    /**
+     * Dis-association with current bssid.
+     */
+    DISASSOC = 2
+  };
+
+  /**
    * Used to indicate that a new network has been added.
    *
    * @param id Network ID allocated to the corresponding network.
@@ -466,6 +484,16 @@
   oneway onEapFailure();
 
   /**
+   * Used to indicate the change of active bssid.
+   * This is useful to figure out when the driver/firmware roams to a bssid
+   * on its own.
+   *
+   * @param reason Reason why the bssid changed.
+   * @param bssid BSSID of the corresponding AP.
+   */
+  oneway onBssidChanged(BssidChangeReason reason, Bssid bssid);
+
+  /**
    * Used to indicate the success of a WPS connection attempt.
    */
   oneway onWpsEventSuccess();