Merge "move foocallback to hidl_test"
diff --git a/radio/1.0/types.hal b/radio/1.0/types.hal
index 6475b4f..49ba30e 100644
--- a/radio/1.0/types.hal
+++ b/radio/1.0/types.hal
@@ -1089,8 +1089,7 @@
     int32_t gsmUmtsSubscriptionAppIndex;  // value < RadioConst:CARD_MAX_APPS, -1 if none
     int32_t cdmaSubscriptionAppIndex;     // value < RadioConst:CARD_MAX_APPS, -1 if none
     int32_t imsSubscriptionAppIndex;      // value < RadioConst:CARD_MAX_APPS, -1 if none
-    int32_t numApplications;              // value <= RadioConst:CARD_MAX_APPS
-    AppStatus[RadioConst:CARD_MAX_APPS] applications;
+    vec<AppStatus> applications;          // size <= RadioConst:CARD_MAX_APPS
 };
 
 /*
diff --git a/tests/bar/1.0/default/Bar.cpp b/tests/bar/1.0/default/Bar.cpp
index 4152bb9..16c0235 100644
--- a/tests/bar/1.0/default/Bar.cpp
+++ b/tests/bar/1.0/default/Bar.cpp
@@ -165,10 +165,8 @@
     return Void();
 }
 
-Return<void> Bar::haveAInterface(const sp<ISimple> &in,
-            haveAInterface_cb _hidl_cb) {
-    _hidl_cb(in);
-    return Void();
+Return<sp<ISimple>> Bar::haveAInterface(const sp<ISimple> &in) {
+    return in;
 }
 
 
diff --git a/tests/bar/1.0/default/Bar.h b/tests/bar/1.0/default/Bar.h
index 70bffe7..b276823 100644
--- a/tests/bar/1.0/default/Bar.h
+++ b/tests/bar/1.0/default/Bar.h
@@ -71,8 +71,7 @@
 
     Return<void> takeAMask(BitField bf, uint8_t first, const MyMask& second, uint8_t third,
             takeAMask_cb _hidl_cb) override;
-    Return<void> haveAInterface(const sp<ISimple> &in,
-            haveAInterface_cb _hidl_cb) override;
+    Return<sp<ISimple>> haveAInterface(const sp<ISimple> &in);
 
 private:
     sp<IFoo> mFoo;
diff --git a/tests/inheritance/1.0/default/Fetcher.cpp b/tests/inheritance/1.0/default/Fetcher.cpp
index f3b576b..7094f07 100644
--- a/tests/inheritance/1.0/default/Fetcher.cpp
+++ b/tests/inheritance/1.0/default/Fetcher.cpp
@@ -17,8 +17,7 @@
     CHECK(!mPrecious->isRemote());
 }
 
-template <typename CB>
-Return<void> selectService(bool sendRemote, CB &_hidl_cb, sp<IChild> &local) {
+sp<IChild> selectService(bool sendRemote, sp<IChild> &local) {
     sp<IChild> toSend;
     if (sendRemote) {
         toSend = IChild::getService("child");
@@ -29,21 +28,20 @@
         toSend = local;
     }
     LOG(INFO) << "SERVER(Fetcher) selectService returning " << toSend.get();
-    _hidl_cb(toSend);
-    return Void();
+    return toSend;
 }
 
 // Methods from ::android::hardware::tests::inheritance::V1_0::IFetcher follow.
-Return<void> Fetcher::getGrandparent(bool sendRemote, getGrandparent_cb _hidl_cb)  {
-    return selectService(sendRemote, _hidl_cb, mPrecious);
+Return<sp<IGrandparent>> Fetcher::getGrandparent(bool sendRemote)  {
+    return selectService(sendRemote, mPrecious);
 }
 
-Return<void> Fetcher::getParent(bool sendRemote, getParent_cb _hidl_cb)  {
-    return selectService(sendRemote, _hidl_cb, mPrecious);
+Return<sp<IParent>> Fetcher::getParent(bool sendRemote)  {
+    return selectService(sendRemote, mPrecious);
 }
 
-Return<void> Fetcher::getChild(bool sendRemote, getChild_cb _hidl_cb)  {
-    return selectService(sendRemote, _hidl_cb, mPrecious);
+Return<sp<IChild>> Fetcher::getChild(bool sendRemote)  {
+    return selectService(sendRemote, mPrecious);
 }
 
 IFetcher* HIDL_FETCH_IFetcher(const char* /* name */) {
diff --git a/tests/inheritance/1.0/default/Fetcher.h b/tests/inheritance/1.0/default/Fetcher.h
index da9b153..979b47f 100644
--- a/tests/inheritance/1.0/default/Fetcher.h
+++ b/tests/inheritance/1.0/default/Fetcher.h
@@ -25,9 +25,9 @@
     Fetcher();
 
     // Methods from ::android::hardware::tests::inheritance::V1_0::IFetcher follow.
-    Return<void> getGrandparent(bool sendRemote, getGrandparent_cb _hidl_cb)  override;
-    Return<void> getParent(bool sendRemote, getParent_cb _hidl_cb)  override;
-    Return<void> getChild(bool sendRemote, getChild_cb _hidl_cb)  override;
+    Return<sp<IGrandparent>> getGrandparent(bool sendRemote)  override;
+    Return<sp<IParent>> getParent(bool sendRemote)  override;
+    Return<sp<IChild>> getChild(bool sendRemote)  override;
 
 private:
     sp<IChild> mPrecious;
diff --git a/tests/msgq/1.0/ITestMsgQ.hal b/tests/msgq/1.0/ITestMsgQ.hal
index 933e39b..e000f55 100644
--- a/tests/msgq/1.0/ITestMsgQ.hal
+++ b/tests/msgq/1.0/ITestMsgQ.hal
@@ -91,4 +91,14 @@
      *
      */
     oneway requestBlockingRead(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.
+     * @param numIter Number of blocking reads to trigger.
+     *
+     */
+    oneway requestBlockingReadRepeat(int32_t count, int32_t numIter);
+
 };
diff --git a/wifi/1.0/default/wifi.cpp b/wifi/1.0/default/wifi.cpp
index 332363d..c06abe8 100644
--- a/wifi/1.0/default/wifi.cpp
+++ b/wifi/1.0/default/wifi.cpp
@@ -103,18 +103,18 @@
     chip_ = new WifiChip(kChipId, legacy_hal_, mode_controller_);
     run_state_ = RunState::STARTED;
     for (const auto& callback : event_callbacks_) {
-      if (!callback->onStart().getStatus().isOk()) {
+      if (!callback->onStart().isOk()) {
         LOG(ERROR) << "Failed to invoke onStart callback";
       };
     }
     for (const auto& callback : event_callbacks_) {
-      if (!callback->onFailure(wifi_status).getStatus().isOk()) {
+      if (!callback->onFailure(wifi_status).isOk()) {
         LOG(ERROR) << "Failed to invoke onFailure callback";
       }
     }
   } else {
     for (const auto& callback : event_callbacks_) {
-      if (!callback->onFailure(wifi_status).getStatus().isOk()) {
+      if (!callback->onFailure(wifi_status).isOk()) {
         LOG(ERROR) << "Failed to invoke onFailure callback";
       }
     }
@@ -132,13 +132,13 @@
   WifiStatus wifi_status = stopLegacyHalAndDeinitializeModeController();
   if (wifi_status.code == WifiStatusCode::SUCCESS) {
     for (const auto& callback : event_callbacks_) {
-      if (!callback->onStop().getStatus().isOk()) {
+      if (!callback->onStop().isOk()) {
         LOG(ERROR) << "Failed to invoke onStop callback";
       };
     }
   } else {
     for (const auto& callback : event_callbacks_) {
-      if (!callback->onFailure(wifi_status).getStatus().isOk()) {
+      if (!callback->onFailure(wifi_status).isOk()) {
         LOG(ERROR) << "Failed to invoke onFailure callback";
       }
     }
diff --git a/wifi/1.0/default/wifi_nan_iface.cpp b/wifi/1.0/default/wifi_nan_iface.cpp
index a897520..8d5cbc9 100644
--- a/wifi/1.0/default/wifi_nan_iface.cpp
+++ b/wifi/1.0/default/wifi_nan_iface.cpp
@@ -59,7 +59,7 @@
     hidl_msg.header = hidl_header;
     hidl_msg.body = hidl_body;
     for (const auto& callback : event_callbacks_) {
-      if (!callback->notifyPublishResponse(id, hidl_msg).getStatus().isOk()) {
+      if (!callback->notifyPublishResponse(id, hidl_msg).isOk()) {
         LOG(ERROR) << "Failed to invoke the callback";
       }
     }