Merge changes from topic 'fix-hidl-generate' into oc-dev
am: 4be51a8512  -s ours

Change-Id: I91054a4a0ffcf6ff117bd4b6c3dcc3a94e7231c2
diff --git a/.clang-format b/.clang-format
index 787d47a..9b3f9d9 100644
--- a/.clang-format
+++ b/.clang-format
@@ -14,15 +14,11 @@
 # limitations under the License.
 #
 
-#
-# Below are some minor deviations from the default Google style to
-# accommodate for handling of the large legacy code base.
-#
-
 BasedOnStyle: Google
 CommentPragmas: NOLINT:.*
 DerivePointerAlignment: false
 AllowShortFunctionsOnASingleLine: Inline
+ColumnLimit: 100
 TabWidth: 4
 UseTab: Never
 IndentWidth: 4
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 212c8b1..c557635 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -52,3 +52,5 @@
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/android.hardware.bluetooth*)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/android.hardware.bluetooth*)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/android.hardware.bluetooth*)
+$(call add-clean-step, rm -rf $(OUT)/soong/.intermediates/)
+$(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/hardware/interfaces/)
diff --git a/audio/2.0/Android.bp b/audio/2.0/Android.bp
index 393c1f7..feee518 100644
--- a/audio/2.0/Android.bp
+++ b/audio/2.0/Android.bp
@@ -95,7 +95,6 @@
         "libutils",
         "libcutils",
         "android.hardware.audio.common@2.0",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -103,6 +102,5 @@
         "libhwbinder",
         "libutils",
         "android.hardware.audio.common@2.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/audio/effect/2.0/Android.bp b/audio/effect/2.0/Android.bp
index 6cf6ad6..2ca7e7e 100644
--- a/audio/effect/2.0/Android.bp
+++ b/audio/effect/2.0/Android.bp
@@ -144,7 +144,6 @@
         "libutils",
         "libcutils",
         "android.hardware.audio.common@2.0",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -152,6 +151,5 @@
         "libhwbinder",
         "libutils",
         "android.hardware.audio.common@2.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/automotive/evs/1.0/Android.bp b/automotive/evs/1.0/Android.bp
index e3752b0..2348c97 100644
--- a/automotive/evs/1.0/Android.bp
+++ b/automotive/evs/1.0/Android.bp
@@ -73,13 +73,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/automotive/vehicle/2.0/Android.bp b/automotive/vehicle/2.0/Android.bp
index ce069d8..5e56ab8 100644
--- a/automotive/vehicle/2.0/Android.bp
+++ b/automotive/vehicle/2.0/Android.bp
@@ -59,13 +59,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/automotive/vehicle/2.0/default/Android.mk b/automotive/vehicle/2.0/default/Android.mk
index 3c56159..d5f5678 100644
--- a/automotive/vehicle/2.0/default/Android.mk
+++ b/automotive/vehicle/2.0/default/Android.mk
@@ -122,6 +122,9 @@
     tests/VehicleObjectPool_test.cpp \
     tests/VehiclePropConfigIndex_test.cpp \
 
+LOCAL_HEADER_LIBRARIES := \
+    libbase_headers
+
 LOCAL_SHARED_LIBRARIES := \
     libhidlbase \
     libhidltransport \
diff --git a/automotive/vehicle/2.0/default/VehicleService.cpp b/automotive/vehicle/2.0/default/VehicleService.cpp
index ff112c6..d1fd555 100644
--- a/automotive/vehicle/2.0/default/VehicleService.cpp
+++ b/automotive/vehicle/2.0/default/VehicleService.cpp
@@ -36,8 +36,15 @@
     configureRpcThreadpool(4, true /* callerWillJoin */);
 
     ALOGI("Registering as service...");
-    service->registerAsService();
+    status_t status = service->registerAsService();
+
+    if (status != OK) {
+        ALOGE("Unable to register vehicle service (%d)", status);
+        return 1;
+    }
 
     ALOGI("Ready");
     joinRpcThreadpool();
+
+    return 1;
 }
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp
index ea40cc5..fe34a3f 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp
@@ -13,9 +13,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 #define LOG_TAG "DefaultVehicleHal_v2_0"
+
 #include <android/log.h>
+#include <android-base/macros.h>
 
 #include "EmulatedVehicleHal.h"
 
diff --git a/automotive/vehicle/2.0/default/tests/VehicleHalManager_test.cpp b/automotive/vehicle/2.0/default/tests/VehicleHalManager_test.cpp
index 04335b5..4864d5d 100644
--- a/automotive/vehicle/2.0/default/tests/VehicleHalManager_test.cpp
+++ b/automotive/vehicle/2.0/default/tests/VehicleHalManager_test.cpp
@@ -17,6 +17,7 @@
 #include <unordered_map>
 #include <iostream>
 
+#include <android-base/macros.h>
 #include <utils/SystemClock.h>
 
 #include <gtest/gtest.h>
diff --git a/automotive/vehicle/2.1/Android.bp b/automotive/vehicle/2.1/Android.bp
index 184df9b..5e4e36b 100644
--- a/automotive/vehicle/2.1/Android.bp
+++ b/automotive/vehicle/2.1/Android.bp
@@ -53,7 +53,6 @@
         "libutils",
         "libcutils",
         "android.hardware.automotive.vehicle@2.0",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -61,6 +60,5 @@
         "libhwbinder",
         "libutils",
         "android.hardware.automotive.vehicle@2.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/automotive/vehicle/2.1/default/service.cpp b/automotive/vehicle/2.1/default/service.cpp
index 4873279..bae64fd 100644
--- a/automotive/vehicle/2.1/default/service.cpp
+++ b/automotive/vehicle/2.1/default/service.cpp
@@ -88,11 +88,17 @@
 
     Vehicle_V2_1 vehicle21(vehicleManager.get());
 
-    ALOGI("Registering as service...");
-    vehicle21.registerAsService();
-
     configureRpcThreadpool(1, true /* callerWillJoin */);
 
+    ALOGI("Registering as service...");
+    status_t status = vehicle21.registerAsService();
+
+    if (status != OK) {
+        ALOGE("Unable to register vehicle service (%d).", status);
+        return 1;
+    }
+
     ALOGI("Ready");
     joinRpcThreadpool();
+    return 1;
 }
diff --git a/biometrics/fingerprint/2.1/Android.bp b/biometrics/fingerprint/2.1/Android.bp
index 2f3547c..3f0a4d3 100644
--- a/biometrics/fingerprint/2.1/Android.bp
+++ b/biometrics/fingerprint/2.1/Android.bp
@@ -59,13 +59,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/bluetooth/1.0/Android.bp b/bluetooth/1.0/Android.bp
index 041b8af..4cc3b50 100644
--- a/bluetooth/1.0/Android.bp
+++ b/bluetooth/1.0/Android.bp
@@ -59,13 +59,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/bluetooth/1.0/default/test/async_fd_watcher_unittest.cc b/bluetooth/1.0/default/test/async_fd_watcher_unittest.cc
index dfc50a3..ee7d8d1 100644
--- a/bluetooth/1.0/default/test/async_fd_watcher_unittest.cc
+++ b/bluetooth/1.0/default/test/async_fd_watcher_unittest.cc
@@ -105,7 +105,7 @@
       int connection_fd = AcceptConnection(fd);
       ALOGD("%s: Conn_watcher fd = %d", __func__, fd);
 
-      conn_watcher_.ConfigureTimeout(std::chrono::seconds(0), [this]() {
+      conn_watcher_.ConfigureTimeout(std::chrono::seconds(0), []() {
         bool connection_timeout_cleared = false;
         ASSERT_TRUE(connection_timeout_cleared);
       });
@@ -117,7 +117,7 @@
       // Time out if it takes longer than a second.
       SetTimeout(std::chrono::seconds(1));
     });
-    conn_watcher_.ConfigureTimeout(std::chrono::seconds(1), [this]() {
+    conn_watcher_.ConfigureTimeout(std::chrono::seconds(1), []() {
       bool connection_timeout = true;
       ASSERT_FALSE(connection_timeout);
     });
@@ -207,7 +207,7 @@
   });
 
   // Fail if the client doesn't connect within 1 second.
-  conn_watcher.ConfigureTimeout(std::chrono::seconds(1), [this]() {
+  conn_watcher.ConfigureTimeout(std::chrono::seconds(1), []() {
     bool connection_timeout = true;
     ASSERT_FALSE(connection_timeout);
   });
@@ -231,7 +231,7 @@
 
   // Set the timeout flag after 100ms.
   conn_watcher.ConfigureTimeout(std::chrono::milliseconds(100),
-                                [this, timeout_ptr]() { *timeout_ptr = true; });
+                                [timeout_ptr]() { *timeout_ptr = true; });
   EXPECT_FALSE(timed_out);
   sleep(1);
   EXPECT_TRUE(timed_out);
@@ -254,7 +254,7 @@
   // Set a timeout flag in each callback.
   conn_watcher.ConfigureTimeout(
       std::chrono::milliseconds(500),
-      [this, &conn_watcher, &timed_out, &timed_out2]() {
+      [&conn_watcher, &timed_out, &timed_out2]() {
         timed_out = true;
         conn_watcher.ConfigureTimeout(std::chrono::seconds(1),
                                       [&timed_out2]() { timed_out2 = true; });
@@ -298,7 +298,7 @@
   });
 
   // Fail if the test doesn't pass within 3 seconds
-  watcher.ConfigureTimeout(std::chrono::seconds(3), [this]() {
+  watcher.ConfigureTimeout(std::chrono::seconds(3), []() {
     bool connection_timeout = true;
     ASSERT_FALSE(connection_timeout);
   });
diff --git a/bluetooth/1.0/default/vendor_interface.cc b/bluetooth/1.0/default/vendor_interface.cc
index 68cac5f..bb66460 100644
--- a/bluetooth/1.0/default/vendor_interface.cc
+++ b/bluetooth/1.0/default/vendor_interface.cc
@@ -16,8 +16,6 @@
 
 #include "vendor_interface.h"
 
-#include <assert.h>
-
 #define LOG_TAG "android.hardware.bluetooth@1.0-impl"
 #include <android-base/logging.h>
 #include <cutils/properties.h>
@@ -165,7 +163,7 @@
     InitializeCompleteCallback initialize_complete_cb,
     PacketReadCallback event_cb, PacketReadCallback acl_cb,
     PacketReadCallback sco_cb) {
-  assert(!g_vendor_interface);
+  CHECK(!g_vendor_interface);
   g_vendor_interface = new VendorInterface();
   return g_vendor_interface->Open(initialize_complete_cb, event_cb, acl_cb,
                                   sco_cb);
diff --git a/boot/1.0/Android.bp b/boot/1.0/Android.bp
index d641c2b..d75d6ac 100644
--- a/boot/1.0/Android.bp
+++ b/boot/1.0/Android.bp
@@ -52,13 +52,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/broadcastradio/1.0/Android.bp b/broadcastradio/1.0/Android.bp
index 3ec489a..4929167 100644
--- a/broadcastradio/1.0/Android.bp
+++ b/broadcastradio/1.0/Android.bp
@@ -73,13 +73,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/broadcastradio/1.1/Android.bp b/broadcastradio/1.1/Android.bp
index e270d68..c01c605 100644
--- a/broadcastradio/1.1/Android.bp
+++ b/broadcastradio/1.1/Android.bp
@@ -74,7 +74,6 @@
         "libutils",
         "libcutils",
         "android.hardware.broadcastradio@1.0",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -82,6 +81,5 @@
         "libhwbinder",
         "libutils",
         "android.hardware.broadcastradio@1.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/camera/device/1.0/Android.bp b/camera/device/1.0/Android.bp
index c9c942d..0a888e6 100644
--- a/camera/device/1.0/Android.bp
+++ b/camera/device/1.0/Android.bp
@@ -68,7 +68,6 @@
         "libcutils",
         "android.hardware.camera.common@1.0",
         "android.hardware.graphics.common@1.0",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -77,6 +76,5 @@
         "libutils",
         "android.hardware.camera.common@1.0",
         "android.hardware.graphics.common@1.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/camera/device/1.0/default/Android.bp b/camera/device/1.0/default/Android.bp
index 686521b..1a349d6 100644
--- a/camera/device/1.0/default/Android.bp
+++ b/camera/device/1.0/default/Android.bp
@@ -17,7 +17,6 @@
         "android.hardware.graphics.mapper@2.0",
         "android.hardware.graphics.common@1.0",
         "android.hidl.allocator@1.0",
-        "android.hidl.base@1.0",
         "android.hidl.memory@1.0",
         "libcutils",
         "liblog",
diff --git a/camera/device/3.2/Android.bp b/camera/device/3.2/Android.bp
index 9a7491b..1162e6c 100644
--- a/camera/device/3.2/Android.bp
+++ b/camera/device/3.2/Android.bp
@@ -68,7 +68,6 @@
         "libcutils",
         "android.hardware.camera.common@1.0",
         "android.hardware.graphics.common@1.0",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -77,6 +76,5 @@
         "libutils",
         "android.hardware.camera.common@1.0",
         "android.hardware.graphics.common@1.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/camera/provider/2.4/Android.bp b/camera/provider/2.4/Android.bp
index 5d25eda..c34ab32 100644
--- a/camera/provider/2.4/Android.bp
+++ b/camera/provider/2.4/Android.bp
@@ -59,7 +59,6 @@
         "android.hardware.camera.device@1.0",
         "android.hardware.camera.device@3.2",
         "android.hardware.graphics.common@1.0",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -70,6 +69,5 @@
         "android.hardware.camera.device@1.0",
         "android.hardware.camera.device@3.2",
         "android.hardware.graphics.common@1.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/configstore/1.0/Android.bp b/configstore/1.0/Android.bp
index 5b36e2a..db7ec97 100644
--- a/configstore/1.0/Android.bp
+++ b/configstore/1.0/Android.bp
@@ -52,13 +52,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/configstore/utils/Android.bp b/configstore/utils/Android.bp
index 2c8aad6..a4cad66 100644
--- a/configstore/utils/Android.bp
+++ b/configstore/utils/Android.bp
@@ -16,6 +16,7 @@
 
 cc_library_shared {
     name: "android.hardware.configstore-utils",
+    vendor_available: true,
     defaults: ["hidl_defaults"],
 
     srcs: [ "ConfigStoreUtils.cpp" ],
diff --git a/contexthub/1.0/Android.bp b/contexthub/1.0/Android.bp
index f66a747..736ec7e 100644
--- a/contexthub/1.0/Android.bp
+++ b/contexthub/1.0/Android.bp
@@ -59,13 +59,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/contexthub/1.0/default/Contexthub.h b/contexthub/1.0/default/Contexthub.h
index 236e079..e587930 100644
--- a/contexthub/1.0/default/Contexthub.h
+++ b/contexthub/1.0/default/Contexthub.h
@@ -19,6 +19,7 @@
 
 #include <unordered_map>
 
+#include <android-base/macros.h>
 #include <android/hardware/contexthub/1.0/IContexthub.h>
 #include <hardware/context_hub.h>
 
diff --git a/drm/1.0/Android.bp b/drm/1.0/Android.bp
index 587829a..8e7da0c 100644
--- a/drm/1.0/Android.bp
+++ b/drm/1.0/Android.bp
@@ -80,13 +80,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/dumpstate/1.0/Android.bp b/dumpstate/1.0/Android.bp
index 2583050..3139bf5 100644
--- a/dumpstate/1.0/Android.bp
+++ b/dumpstate/1.0/Android.bp
@@ -48,13 +48,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/gatekeeper/1.0/Android.bp b/gatekeeper/1.0/Android.bp
index 1c44110..6c84f3d 100644
--- a/gatekeeper/1.0/Android.bp
+++ b/gatekeeper/1.0/Android.bp
@@ -52,13 +52,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/gnss/1.0/Android.bp b/gnss/1.0/Android.bp
index a1b167d..9aa401a 100644
--- a/gnss/1.0/Android.bp
+++ b/gnss/1.0/Android.bp
@@ -185,13 +185,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/graphics/allocator/2.0/Android.bp b/graphics/allocator/2.0/Android.bp
index 278f69d..debcfb7 100644
--- a/graphics/allocator/2.0/Android.bp
+++ b/graphics/allocator/2.0/Android.bp
@@ -50,7 +50,6 @@
         "libcutils",
         "android.hardware.graphics.common@1.0",
         "android.hardware.graphics.mapper@2.0",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -59,6 +58,5 @@
         "libutils",
         "android.hardware.graphics.common@1.0",
         "android.hardware.graphics.mapper@2.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/graphics/bufferqueue/1.0/Android.bp b/graphics/bufferqueue/1.0/Android.bp
index 8747b2d..4ae0e34 100644
--- a/graphics/bufferqueue/1.0/Android.bp
+++ b/graphics/bufferqueue/1.0/Android.bp
@@ -57,7 +57,6 @@
         "libcutils",
         "android.hardware.graphics.common@1.0",
         "android.hardware.media@1.0",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -66,6 +65,5 @@
         "libutils",
         "android.hardware.graphics.common@1.0",
         "android.hardware.media@1.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/graphics/composer/2.1/Android.bp b/graphics/composer/2.1/Android.bp
index ed5c193..b21f535 100644
--- a/graphics/composer/2.1/Android.bp
+++ b/graphics/composer/2.1/Android.bp
@@ -67,7 +67,6 @@
         "libutils",
         "libcutils",
         "android.hardware.graphics.common@1.0",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -75,6 +74,5 @@
         "libhwbinder",
         "libutils",
         "android.hardware.graphics.common@1.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/graphics/mapper/2.0/Android.bp b/graphics/mapper/2.0/Android.bp
index bb53937..41b106e 100644
--- a/graphics/mapper/2.0/Android.bp
+++ b/graphics/mapper/2.0/Android.bp
@@ -53,7 +53,6 @@
         "libutils",
         "libcutils",
         "android.hardware.graphics.common@1.0",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -61,6 +60,5 @@
         "libhwbinder",
         "libutils",
         "android.hardware.graphics.common@1.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/health/1.0/Android.bp b/health/1.0/Android.bp
index 6b664cb..6d71315 100644
--- a/health/1.0/Android.bp
+++ b/health/1.0/Android.bp
@@ -52,13 +52,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/ir/1.0/Android.bp b/ir/1.0/Android.bp
index ae3171a..2c53047 100644
--- a/ir/1.0/Android.bp
+++ b/ir/1.0/Android.bp
@@ -52,13 +52,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/keymaster/3.0/Android.bp b/keymaster/3.0/Android.bp
index fa5dd3a..922259c 100644
--- a/keymaster/3.0/Android.bp
+++ b/keymaster/3.0/Android.bp
@@ -52,13 +52,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/light/2.0/Android.bp b/light/2.0/Android.bp
index e0a889c..d9e999a 100644
--- a/light/2.0/Android.bp
+++ b/light/2.0/Android.bp
@@ -52,13 +52,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/media/omx/1.0/Android.bp b/media/omx/1.0/Android.bp
index 775b434..18a99a2 100644
--- a/media/omx/1.0/Android.bp
+++ b/media/omx/1.0/Android.bp
@@ -90,7 +90,6 @@
         "android.hardware.graphics.bufferqueue@1.0",
         "android.hardware.graphics.common@1.0",
         "android.hardware.media@1.0",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -100,6 +99,5 @@
         "android.hardware.graphics.bufferqueue@1.0",
         "android.hardware.graphics.common@1.0",
         "android.hardware.media@1.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/memtrack/1.0/Android.bp b/memtrack/1.0/Android.bp
index de985f0..25d4153 100644
--- a/memtrack/1.0/Android.bp
+++ b/memtrack/1.0/Android.bp
@@ -52,13 +52,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/nfc/1.0/Android.bp b/nfc/1.0/Android.bp
index 76ea255..8faf2a1 100644
--- a/nfc/1.0/Android.bp
+++ b/nfc/1.0/Android.bp
@@ -59,13 +59,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/nfc/1.0/default/Android.bp b/nfc/1.0/default/Android.bp
index a157f86..d7f7203 100644
--- a/nfc/1.0/default/Android.bp
+++ b/nfc/1.0/default/Android.bp
@@ -16,3 +16,24 @@
         "android.hardware.nfc@1.0",
     ],
 }
+
+cc_binary {
+    name: "android.hardware.nfc@1.0-service",
+    relative_install_path: "hw",
+    proprietary: true,
+    init_rc: ["android.hardware.nfc@1.0-service.rc"],
+    srcs: ["service.cpp"],
+
+    shared_libs: [
+        "liblog",
+        "libcutils",
+        "libdl",
+        "libbase",
+        "libutils",
+        "libhardware",
+        "libhidlbase",
+        "libhidltransport",
+        "android.hardware.nfc@1.0",
+    ],
+
+}
diff --git a/nfc/1.0/default/Android.mk b/nfc/1.0/default/Android.mk
deleted file mode 100644
index 4afad74..0000000
--- a/nfc/1.0/default/Android.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_PROPRIETARY_MODULE := true
-LOCAL_MODULE := android.hardware.nfc@1.0-service
-LOCAL_INIT_RC := android.hardware.nfc@1.0-service.rc
-LOCAL_SRC_FILES := \
-	service.cpp \
-
-LOCAL_SHARED_LIBRARIES := \
-	liblog \
-	libcutils \
-	libdl \
-	libbase \
-	libutils \
-	libhardware \
-
-LOCAL_SHARED_LIBRARIES += \
-	libhidlbase \
-	libhidltransport \
-	android.hardware.nfc@1.0 \
-
-
-include $(BUILD_EXECUTABLE)
diff --git a/power/1.0/Android.bp b/power/1.0/Android.bp
index e0758eb..9412a88 100644
--- a/power/1.0/Android.bp
+++ b/power/1.0/Android.bp
@@ -52,13 +52,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/radio/1.0/Android.bp b/radio/1.0/Android.bp
index c95c67f..b58d85a 100644
--- a/radio/1.0/Android.bp
+++ b/radio/1.0/Android.bp
@@ -80,13 +80,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp b/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
index 906cef8..1547c33 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
@@ -247,14 +247,12 @@
 TEST_F(RadioHidlTest, iccOpenLogicalChannel) {
   int serial = 1;
   int p2 = 0x04;
-  // Specified in ISO 7816-4 clause 7.1.1 0x04 means that FCP template is
-  // requested.
+  // Specified in ISO 7816-4 clause 7.1.1 0x04 means that FCP template is requested.
   for (int i = 0; i < (int)cardStatus.applications.size(); i++) {
-      radio->iccOpenLogicalChannel(++serial, cardStatus.applications[i].aidPtr,
-                                   p2);
-      EXPECT_EQ(std::cv_status::no_timeout, wait());
-      EXPECT_EQ(serial, radioRsp->rspInfo.serial);
-      EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    radio->iccOpenLogicalChannel(++serial, cardStatus.applications[i].aidPtr, p2);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
   }
 }
 
diff --git a/radio/1.1/Android.bp b/radio/1.1/Android.bp
new file mode 100644
index 0000000..f5ba178
--- /dev/null
+++ b/radio/1.1/Android.bp
@@ -0,0 +1,74 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+    name: "android.hardware.radio@1.1_hal",
+    srcs: [
+        "IRadio.hal",
+        "IRadioIndication.hal",
+        "IRadioResponse.hal",
+    ],
+}
+
+genrule {
+    name: "android.hardware.radio@1.1_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.1",
+    srcs: [
+        ":android.hardware.radio@1.1_hal",
+    ],
+    out: [
+        "android/hardware/radio/1.1/RadioAll.cpp",
+        "android/hardware/radio/1.1/RadioIndicationAll.cpp",
+        "android/hardware/radio/1.1/RadioResponseAll.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.radio@1.1_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio@1.1",
+    srcs: [
+        ":android.hardware.radio@1.1_hal",
+    ],
+    out: [
+        "android/hardware/radio/1.1/IRadio.h",
+        "android/hardware/radio/1.1/IHwRadio.h",
+        "android/hardware/radio/1.1/BnHwRadio.h",
+        "android/hardware/radio/1.1/BpHwRadio.h",
+        "android/hardware/radio/1.1/BsRadio.h",
+        "android/hardware/radio/1.1/IRadioIndication.h",
+        "android/hardware/radio/1.1/IHwRadioIndication.h",
+        "android/hardware/radio/1.1/BnHwRadioIndication.h",
+        "android/hardware/radio/1.1/BpHwRadioIndication.h",
+        "android/hardware/radio/1.1/BsRadioIndication.h",
+        "android/hardware/radio/1.1/IRadioResponse.h",
+        "android/hardware/radio/1.1/IHwRadioResponse.h",
+        "android/hardware/radio/1.1/BnHwRadioResponse.h",
+        "android/hardware/radio/1.1/BpHwRadioResponse.h",
+        "android/hardware/radio/1.1/BsRadioResponse.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.radio@1.1",
+    generated_sources: ["android.hardware.radio@1.1_genc++"],
+    generated_headers: ["android.hardware.radio@1.1_genc++_headers"],
+    export_generated_headers: ["android.hardware.radio@1.1_genc++_headers"],
+    vendor_available: true,
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "android.hardware.radio@1.0",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "android.hardware.radio@1.0",
+    ],
+}
diff --git a/radio/1.1/Android.mk b/radio/1.1/Android.mk
new file mode 100644
index 0000000..0421daa
--- /dev/null
+++ b/radio/1.1/Android.mk
@@ -0,0 +1,154 @@
+# This file is autogenerated by hidl-gen. Do not edit manually.
+
+LOCAL_PATH := $(call my-dir)
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.radio-V1.1-java
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_JAVA_LIBRARIES := \
+    android.hardware.radio-V1.0-java \
+    android.hidl.base-V1.0-java \
+
+
+#
+# Build IRadio.hal
+#
+GEN := $(intermediates)/android/hardware/radio/V1_1/IRadio.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IRadio.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.radio@1.1::IRadio
+
+$(GEN): $(LOCAL_PATH)/IRadio.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IRadioIndication.hal
+#
+GEN := $(intermediates)/android/hardware/radio/V1_1/IRadioIndication.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IRadioIndication.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.radio@1.1::IRadioIndication
+
+$(GEN): $(LOCAL_PATH)/IRadioIndication.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IRadioResponse.hal
+#
+GEN := $(intermediates)/android/hardware/radio/V1_1/IRadioResponse.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IRadioResponse.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.radio@1.1::IRadioResponse
+
+$(GEN): $(LOCAL_PATH)/IRadioResponse.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_JAVA_LIBRARY)
+
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.radio-V1.1-java-static
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+    android.hardware.radio-V1.0-java-static \
+    android.hidl.base-V1.0-java-static \
+
+
+#
+# Build IRadio.hal
+#
+GEN := $(intermediates)/android/hardware/radio/V1_1/IRadio.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IRadio.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.radio@1.1::IRadio
+
+$(GEN): $(LOCAL_PATH)/IRadio.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IRadioIndication.hal
+#
+GEN := $(intermediates)/android/hardware/radio/V1_1/IRadioIndication.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IRadioIndication.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.radio@1.1::IRadioIndication
+
+$(GEN): $(LOCAL_PATH)/IRadioIndication.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IRadioResponse.hal
+#
+GEN := $(intermediates)/android/hardware/radio/V1_1/IRadioResponse.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IRadioResponse.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.radio@1.1::IRadioResponse
+
+$(GEN): $(LOCAL_PATH)/IRadioResponse.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/radio/1.1/IRadio.hal b/radio/1.1/IRadio.hal
new file mode 100644
index 0000000..c2bfa53
--- /dev/null
+++ b/radio/1.1/IRadio.hal
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.radio@1.1;
+
+import IRadioResponse;
+import @1.0::IRadio;
+
+/**
+ * This interface is used by telephony and 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
+ * duration of a method call. If clients provide colliding serials (including passing the same
+ * serial to different methods), multiple responses (one for each method call) must still be served.
+ * setResponseFunctions must work with @1.1::IRadioResponse and @1.1::IRadioIndication.
+ */
+interface IRadio extends @1.0::IRadio {
+    /**
+     * Provide Carrier specific information to the modem that must be used to
+     * encrypt the IMSI and IMPI. Sent by the framework during boot, carrier
+     * switch and everytime the framework receives a new certificate.
+     *
+     * @param serial Serial number of request.
+     * @param carrierKey Carrier specific key to be used for encryption. It must
+     *        be opaque to the framework. This is the byte-stream representation
+     *        of the key. This is an external encoded form for the key used when
+     *        a standard representation of the key is needed outside the Java
+     *        Virtual Machine, as when transmitting the key to some other party.
+     *        The key is encoded according to a standard format
+     *        (such as X.509 SubjectPublicKeyInfo or PKCS#8), and is returned using
+     *        the getEncoded method.
+     * @param keyIdentifier This is an opaque value we're given by the carrier
+     *        and is returned to the carrier. This is used by the server to
+     *        help it locate the private key to decrypt the permanent identity.
+     *
+     * Response callback is
+     * IRadioResponse.setCarrierInfoForImsiEncryptionResponse()
+     */
+     oneway setCarrierInfoForImsiEncryption(int32_t serial, vec<uint8_t> carrierKey,
+             string keyIdentifier);
+};
diff --git a/radio/1.1/IRadioIndication.hal b/radio/1.1/IRadioIndication.hal
new file mode 100644
index 0000000..8cba71b
--- /dev/null
+++ b/radio/1.1/IRadioIndication.hal
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.radio@1.1;
+
+import @1.0::IRadioIndication;
+import @1.0::types;
+
+/**
+ * Interface declaring unsolicited radio indications.
+ */
+interface IRadioIndication extends @1.0::IRadioIndication{
+   /*
+    * Indicates that the modem requires the Carrier info for IMSI/IMPI encryption.
+    * This might happen when the modem restarts or for some reason it's cache
+    * has been invalidated.
+    *
+    * @param type Type of radio indication
+    */
+   oneway carrierInfoForImsiEncryption(RadioIndicationType info);
+};
diff --git a/radio/1.1/IRadioResponse.hal b/radio/1.1/IRadioResponse.hal
new file mode 100644
index 0000000..b0aece9
--- /dev/null
+++ b/radio/1.1/IRadioResponse.hal
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.radio@1.1;
+
+import @1.0::IRadioResponse;
+
+/**
+ * Interface declaring response functions to solicited radio requests.
+ */
+interface IRadioResponse extends @1.0::IRadioResponse {
+    /**
+     * @param info Response info struct containing response type, serial no. and error
+     *
+     * Valid errors returned:
+     *   RadioError:RIL_E_SUCCESS
+     *   RadioError:RIL_E_RADIO_NOT_AVAILABLE
+     *   RadioError:SIM_ABSENT
+     *   RadioError:RIL_E_REQUEST_NOT_SUPPORTED
+     *   RadioError:INVALID_ARGUMENTS
+     *   RadioError:MODEM_INTERNAL_FAILURE
+     */
+    oneway setCarrierInfoForImsiEncryptionResponse(RadioResponseInfo info);
+};
diff --git a/radio/Android.bp b/radio/Android.bp
index 8bda000..dbeca0c 100644
--- a/radio/Android.bp
+++ b/radio/Android.bp
@@ -2,5 +2,6 @@
 subdirs = [
     "1.0",
     "1.0/vts/functional",
+    "1.1",
     "deprecated/1.0",
 ]
diff --git a/radio/deprecated/1.0/Android.bp b/radio/deprecated/1.0/Android.bp
index 60e52a6..a812a74 100644
--- a/radio/deprecated/1.0/Android.bp
+++ b/radio/deprecated/1.0/Android.bp
@@ -63,7 +63,6 @@
         "libutils",
         "libcutils",
         "android.hardware.radio@1.0",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -71,6 +70,5 @@
         "libhwbinder",
         "libutils",
         "android.hardware.radio@1.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/renderscript/1.0/Android.bp b/renderscript/1.0/Android.bp
index 11090c3..a033b41 100644
--- a/renderscript/1.0/Android.bp
+++ b/renderscript/1.0/Android.bp
@@ -59,13 +59,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/renderscript/1.0/default/Android.bp b/renderscript/1.0/default/Android.bp
index 29b781e..c4bd1b3 100644
--- a/renderscript/1.0/default/Android.bp
+++ b/renderscript/1.0/default/Android.bp
@@ -17,6 +17,5 @@
         "libhidltransport",
         "libutils",
         "android.hardware.renderscript@1.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/sensors/1.0/Android.bp b/sensors/1.0/Android.bp
index 964c8ef..256ed9b 100644
--- a/sensors/1.0/Android.bp
+++ b/sensors/1.0/Android.bp
@@ -52,13 +52,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/sensors/1.0/default/Sensors.h b/sensors/1.0/default/Sensors.h
index 7d715e0..be00a96 100644
--- a/sensors/1.0/default/Sensors.h
+++ b/sensors/1.0/default/Sensors.h
@@ -18,6 +18,7 @@
 
 #define HARDWARE_INTERFACES_SENSORS_V1_0_DEFAULT_SENSORS_H_
 
+#include <android-base/macros.h>
 #include <android/hardware/sensors/1.0/ISensors.h>
 #include <hardware/sensors.h>
 #include <mutex>
diff --git a/soundtrigger/2.0/Android.bp b/soundtrigger/2.0/Android.bp
index 51b3fe5..2ef3fcc 100644
--- a/soundtrigger/2.0/Android.bp
+++ b/soundtrigger/2.0/Android.bp
@@ -60,7 +60,6 @@
         "libutils",
         "libcutils",
         "android.hardware.audio.common@2.0",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -68,6 +67,5 @@
         "libhwbinder",
         "libutils",
         "android.hardware.audio.common@2.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/bar/1.0/Android.bp b/tests/bar/1.0/Android.bp
index 2b5c111..e0dbe98 100644
--- a/tests/bar/1.0/Android.bp
+++ b/tests/bar/1.0/Android.bp
@@ -81,7 +81,6 @@
         "libutils",
         "libcutils",
         "android.hardware.tests.foo@1.0",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -89,6 +88,5 @@
         "libhwbinder",
         "libutils",
         "android.hardware.tests.foo@1.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/baz/1.0/Android.bp b/tests/baz/1.0/Android.bp
index f0cddf8..cc9e2a4 100644
--- a/tests/baz/1.0/Android.bp
+++ b/tests/baz/1.0/Android.bp
@@ -73,13 +73,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/baz/1.0/default/Android.bp b/tests/baz/1.0/default/Android.bp
index 794cdf5..ef1c28e 100644
--- a/tests/baz/1.0/default/Android.bp
+++ b/tests/baz/1.0/default/Android.bp
@@ -12,6 +12,5 @@
         "libhidltransport",
         "libutils",
         "android.hardware.tests.baz@1.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/expression/1.0/Android.bp b/tests/expression/1.0/Android.bp
index f3c6d5d..8bdad0e 100644
--- a/tests/expression/1.0/Android.bp
+++ b/tests/expression/1.0/Android.bp
@@ -55,13 +55,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/extension/light/2.0/Android.bp b/tests/extension/light/2.0/Android.bp
index 9420568..deb9fb7 100644
--- a/tests/extension/light/2.0/Android.bp
+++ b/tests/extension/light/2.0/Android.bp
@@ -53,7 +53,6 @@
         "libutils",
         "libcutils",
         "android.hardware.light@2.0",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -61,6 +60,5 @@
         "libhwbinder",
         "libutils",
         "android.hardware.light@2.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/foo/1.0/Android.bp b/tests/foo/1.0/Android.bp
index d66ba2d..54260e9 100644
--- a/tests/foo/1.0/Android.bp
+++ b/tests/foo/1.0/Android.bp
@@ -80,13 +80,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/hash/1.0/Android.bp b/tests/hash/1.0/Android.bp
index e88bf5f..c2aa804 100644
--- a/tests/hash/1.0/Android.bp
+++ b/tests/hash/1.0/Android.bp
@@ -48,13 +48,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/hash/1.0/default/Android.bp b/tests/hash/1.0/default/Android.bp
index e798a66..d6e9630 100644
--- a/tests/hash/1.0/default/Android.bp
+++ b/tests/hash/1.0/default/Android.bp
@@ -10,6 +10,5 @@
         "libhidltransport",
         "libutils",
         "android.hardware.tests.hash@1.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/inheritance/1.0/Android.bp b/tests/inheritance/1.0/Android.bp
index db70fa2..6b99a55 100644
--- a/tests/inheritance/1.0/Android.bp
+++ b/tests/inheritance/1.0/Android.bp
@@ -69,13 +69,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/libhwbinder/1.0/Android.bp b/tests/libhwbinder/1.0/Android.bp
index ed36570..cfebfbb 100644
--- a/tests/libhwbinder/1.0/Android.bp
+++ b/tests/libhwbinder/1.0/Android.bp
@@ -55,13 +55,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/libhwbinder/1.0/default/Android.bp b/tests/libhwbinder/1.0/default/Android.bp
index fa1b2b3..af4caec 100644
--- a/tests/libhwbinder/1.0/default/Android.bp
+++ b/tests/libhwbinder/1.0/default/Android.bp
@@ -11,6 +11,5 @@
         "libhidltransport",
         "libutils",
         "android.hardware.tests.libhwbinder@1.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/memory/1.0/Android.bp b/tests/memory/1.0/Android.bp
index 523f530..ed64f5d 100644
--- a/tests/memory/1.0/Android.bp
+++ b/tests/memory/1.0/Android.bp
@@ -48,13 +48,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/msgq/1.0/Android.bp b/tests/msgq/1.0/Android.bp
index 6be8cc5..04a64f6 100644
--- a/tests/msgq/1.0/Android.bp
+++ b/tests/msgq/1.0/Android.bp
@@ -55,13 +55,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/msgq/1.0/default/Android.bp b/tests/msgq/1.0/default/Android.bp
index 16018ac..e3c49e7 100644
--- a/tests/msgq/1.0/default/Android.bp
+++ b/tests/msgq/1.0/default/Android.bp
@@ -31,7 +31,6 @@
         "liblog",
         "libutils",
         "android.hardware.tests.msgq@1.0",
-        "android.hidl.base@1.0",
     ],
 }
 
diff --git a/tests/pointer/1.0/Android.bp b/tests/pointer/1.0/Android.bp
index 0adcb4f..ae0d0c8 100644
--- a/tests/pointer/1.0/Android.bp
+++ b/tests/pointer/1.0/Android.bp
@@ -55,13 +55,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/versioning/1.0/Android.bp b/tests/versioning/1.0/Android.bp
index f0a14bc..c3e4b57 100644
--- a/tests/versioning/1.0/Android.bp
+++ b/tests/versioning/1.0/Android.bp
@@ -48,13 +48,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/versioning/2.2/Android.bp b/tests/versioning/2.2/Android.bp
index b6fd744..624a61e 100644
--- a/tests/versioning/2.2/Android.bp
+++ b/tests/versioning/2.2/Android.bp
@@ -55,13 +55,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/versioning/2.3/Android.bp b/tests/versioning/2.3/Android.bp
index 4741117..247b2ff 100644
--- a/tests/versioning/2.3/Android.bp
+++ b/tests/versioning/2.3/Android.bp
@@ -64,7 +64,6 @@
         "libcutils",
         "android.hardware.tests.versioning@1.0",
         "android.hardware.tests.versioning@2.2",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -73,6 +72,5 @@
         "libutils",
         "android.hardware.tests.versioning@1.0",
         "android.hardware.tests.versioning@2.2",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tests/versioning/2.4/Android.bp b/tests/versioning/2.4/Android.bp
index f576bf1..ff9ca1f 100644
--- a/tests/versioning/2.4/Android.bp
+++ b/tests/versioning/2.4/Android.bp
@@ -50,7 +50,6 @@
         "libcutils",
         "android.hardware.tests.versioning@2.2",
         "android.hardware.tests.versioning@2.3",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -59,6 +58,5 @@
         "libutils",
         "android.hardware.tests.versioning@2.2",
         "android.hardware.tests.versioning@2.3",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tetheroffload/Android.bp b/tetheroffload/Android.bp
new file mode 100644
index 0000000..4b50f11
--- /dev/null
+++ b/tetheroffload/Android.bp
@@ -0,0 +1,5 @@
+// This is an autogenerated file, do not edit.
+subdirs = [
+    "config/1.0",
+    "control/1.0",
+]
diff --git a/tetheroffload/config/1.0/Android.bp b/tetheroffload/config/1.0/Android.bp
new file mode 100644
index 0000000..ddf7c22
--- /dev/null
+++ b/tetheroffload/config/1.0/Android.bp
@@ -0,0 +1,58 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+    name: "android.hardware.tetheroffload.config@1.0_hal",
+    srcs: [
+        "IOffloadConfig.hal",
+    ],
+}
+
+genrule {
+    name: "android.hardware.tetheroffload.config@1.0_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.config@1.0",
+    srcs: [
+        ":android.hardware.tetheroffload.config@1.0_hal",
+    ],
+    out: [
+        "android/hardware/tetheroffload/config/1.0/OffloadConfigAll.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.tetheroffload.config@1.0_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.config@1.0",
+    srcs: [
+        ":android.hardware.tetheroffload.config@1.0_hal",
+    ],
+    out: [
+        "android/hardware/tetheroffload/config/1.0/IOffloadConfig.h",
+        "android/hardware/tetheroffload/config/1.0/IHwOffloadConfig.h",
+        "android/hardware/tetheroffload/config/1.0/BnHwOffloadConfig.h",
+        "android/hardware/tetheroffload/config/1.0/BpHwOffloadConfig.h",
+        "android/hardware/tetheroffload/config/1.0/BsOffloadConfig.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.tetheroffload.config@1.0",
+    generated_sources: ["android.hardware.tetheroffload.config@1.0_genc++"],
+    generated_headers: ["android.hardware.tetheroffload.config@1.0_genc++_headers"],
+    export_generated_headers: ["android.hardware.tetheroffload.config@1.0_genc++_headers"],
+    vendor_available: true,
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+    ],
+}
diff --git a/tetheroffload/config/1.0/IOffloadConfig.hal b/tetheroffload/config/1.0/IOffloadConfig.hal
new file mode 100644
index 0000000..4d285da
--- /dev/null
+++ b/tetheroffload/config/1.0/IOffloadConfig.hal
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.tetheroffload.config@1.0;
+
+
+/**
+ * Interface used for configuring the hardware management process
+ */
+interface IOffloadConfig {
+  /**
+   * Provides bound netlink file descriptors for use in the management process
+   *
+   * @param fd1   A file descriptor bound to the following netlink groups
+   *              (NF_NETLINK_CONNTRACK_NEW | NF_NETLINK_CONNTRACK_DESTROY).
+   * @param fd2   A file descriptor bound to the following netlink groups
+   *              (NF_NETLINK_CONNTRACK_UPDATE | NF_NETLINK_CONNTRACK_DESTROY).
+   *
+   * @return success true if successful, false otherwise
+   * @return errMsg a human readable string if eror has occured.
+   */
+  setHandles(handle fd1, handle fd2) generates (bool success, string errMsg);
+};
diff --git a/tetheroffload/control/1.0/Android.bp b/tetheroffload/control/1.0/Android.bp
new file mode 100644
index 0000000..6f50446
--- /dev/null
+++ b/tetheroffload/control/1.0/Android.bp
@@ -0,0 +1,69 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+    name: "android.hardware.tetheroffload.control@1.0_hal",
+    srcs: [
+        "types.hal",
+        "IOffloadControl.hal",
+        "ITetheringOffloadCallback.hal",
+    ],
+}
+
+genrule {
+    name: "android.hardware.tetheroffload.control@1.0_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.control@1.0",
+    srcs: [
+        ":android.hardware.tetheroffload.control@1.0_hal",
+    ],
+    out: [
+        "android/hardware/tetheroffload/control/1.0/types.cpp",
+        "android/hardware/tetheroffload/control/1.0/OffloadControlAll.cpp",
+        "android/hardware/tetheroffload/control/1.0/TetheringOffloadCallbackAll.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.tetheroffload.control@1.0_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tetheroffload.control@1.0",
+    srcs: [
+        ":android.hardware.tetheroffload.control@1.0_hal",
+    ],
+    out: [
+        "android/hardware/tetheroffload/control/1.0/types.h",
+        "android/hardware/tetheroffload/control/1.0/hwtypes.h",
+        "android/hardware/tetheroffload/control/1.0/IOffloadControl.h",
+        "android/hardware/tetheroffload/control/1.0/IHwOffloadControl.h",
+        "android/hardware/tetheroffload/control/1.0/BnHwOffloadControl.h",
+        "android/hardware/tetheroffload/control/1.0/BpHwOffloadControl.h",
+        "android/hardware/tetheroffload/control/1.0/BsOffloadControl.h",
+        "android/hardware/tetheroffload/control/1.0/ITetheringOffloadCallback.h",
+        "android/hardware/tetheroffload/control/1.0/IHwTetheringOffloadCallback.h",
+        "android/hardware/tetheroffload/control/1.0/BnHwTetheringOffloadCallback.h",
+        "android/hardware/tetheroffload/control/1.0/BpHwTetheringOffloadCallback.h",
+        "android/hardware/tetheroffload/control/1.0/BsTetheringOffloadCallback.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.tetheroffload.control@1.0",
+    generated_sources: ["android.hardware.tetheroffload.control@1.0_genc++"],
+    generated_headers: ["android.hardware.tetheroffload.control@1.0_genc++_headers"],
+    export_generated_headers: ["android.hardware.tetheroffload.control@1.0_genc++_headers"],
+    vendor_available: true,
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+    ],
+}
diff --git a/tetheroffload/control/1.0/Android.mk b/tetheroffload/control/1.0/Android.mk
new file mode 100644
index 0000000..6e52c87
--- /dev/null
+++ b/tetheroffload/control/1.0/Android.mk
@@ -0,0 +1,274 @@
+# This file is autogenerated by hidl-gen. Do not edit manually.
+
+LOCAL_PATH := $(call my-dir)
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.tetheroffload.control-V1.0-java
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_JAVA_LIBRARIES := \
+    android.hidl.base-V1.0-java \
+
+
+#
+# Build types.hal (IPv4AddrPortPair)
+#
+GEN := $(intermediates)/android/hardware/tetheroffload/control/V1_0/IPv4AddrPortPair.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.tetheroffload.control@1.0::types.IPv4AddrPortPair
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (NatTimeoutUpdate)
+#
+GEN := $(intermediates)/android/hardware/tetheroffload/control/V1_0/NatTimeoutUpdate.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.tetheroffload.control@1.0::types.NatTimeoutUpdate
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (NetworkProtocol)
+#
+GEN := $(intermediates)/android/hardware/tetheroffload/control/V1_0/NetworkProtocol.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.tetheroffload.control@1.0::types.NetworkProtocol
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (OffloadCallbackEvent)
+#
+GEN := $(intermediates)/android/hardware/tetheroffload/control/V1_0/OffloadCallbackEvent.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.tetheroffload.control@1.0::types.OffloadCallbackEvent
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IOffloadControl.hal
+#
+GEN := $(intermediates)/android/hardware/tetheroffload/control/V1_0/IOffloadControl.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOffloadControl.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ITetheringOffloadCallback.hal
+$(GEN): $(LOCAL_PATH)/ITetheringOffloadCallback.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.tetheroffload.control@1.0::IOffloadControl
+
+$(GEN): $(LOCAL_PATH)/IOffloadControl.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ITetheringOffloadCallback.hal
+#
+GEN := $(intermediates)/android/hardware/tetheroffload/control/V1_0/ITetheringOffloadCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ITetheringOffloadCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(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.tetheroffload.control@1.0::ITetheringOffloadCallback
+
+$(GEN): $(LOCAL_PATH)/ITetheringOffloadCallback.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_JAVA_LIBRARY)
+
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.tetheroffload.control-V1.0-java-static
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+    android.hidl.base-V1.0-java-static \
+
+
+#
+# Build types.hal (IPv4AddrPortPair)
+#
+GEN := $(intermediates)/android/hardware/tetheroffload/control/V1_0/IPv4AddrPortPair.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.tetheroffload.control@1.0::types.IPv4AddrPortPair
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (NatTimeoutUpdate)
+#
+GEN := $(intermediates)/android/hardware/tetheroffload/control/V1_0/NatTimeoutUpdate.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.tetheroffload.control@1.0::types.NatTimeoutUpdate
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (NetworkProtocol)
+#
+GEN := $(intermediates)/android/hardware/tetheroffload/control/V1_0/NetworkProtocol.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.tetheroffload.control@1.0::types.NetworkProtocol
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (OffloadCallbackEvent)
+#
+GEN := $(intermediates)/android/hardware/tetheroffload/control/V1_0/OffloadCallbackEvent.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.tetheroffload.control@1.0::types.OffloadCallbackEvent
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IOffloadControl.hal
+#
+GEN := $(intermediates)/android/hardware/tetheroffload/control/V1_0/IOffloadControl.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOffloadControl.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ITetheringOffloadCallback.hal
+$(GEN): $(LOCAL_PATH)/ITetheringOffloadCallback.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.tetheroffload.control@1.0::IOffloadControl
+
+$(GEN): $(LOCAL_PATH)/IOffloadControl.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ITetheringOffloadCallback.hal
+#
+GEN := $(intermediates)/android/hardware/tetheroffload/control/V1_0/ITetheringOffloadCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ITetheringOffloadCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(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.tetheroffload.control@1.0::ITetheringOffloadCallback
+
+$(GEN): $(LOCAL_PATH)/ITetheringOffloadCallback.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tetheroffload/control/1.0/IOffloadControl.hal b/tetheroffload/control/1.0/IOffloadControl.hal
new file mode 100644
index 0000000..334f4ca
--- /dev/null
+++ b/tetheroffload/control/1.0/IOffloadControl.hal
@@ -0,0 +1,221 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.tetheroffload.control@1.0;
+
+import ITetheringOffloadCallback;
+
+
+/**
+ * Interface used to control the lifecycle of tethering offload
+ */
+interface IOffloadControl {
+  /**
+   * Indicates intent to start offload for tethering in immediate future.
+   *
+   * This API must be called exactly once the first time that Tethering is requested by
+   * the user.
+   *
+   * If this API is called multiple times without first calling stopOffload, then the subsequent
+   * calls must fail without changing the state of the server.
+   *
+   * If for some reason, the hardware is currently unable to support offload, this call must fail.
+   *
+   * @param cb Assuming success, this callback must provide unsolicited updates of offload status.
+   *           It is assumed to be valid until stopOffload is called.
+   *
+   * @return success true if initialization is successful, false otherwise
+   * @return errMsg a human readable string if eror has occured.
+   *
+   * Remarks: Initializing offload does not imply that any upstreams or downstreams have yet been,
+   * or even will be, chosen.  This API is symmetrical with stopOffload.
+   */
+  @entry
+  @callflow(next={"*"})
+  initOffload(ITetheringOffloadCallback cb) generates (bool success, string errMsg);
+
+  /**
+   * Indicate desire to tear down all tethering offload.
+   *
+   * Called after tethering is no longer requested by the user. Any remaining offload must
+   * be subsequently torn down by the management process.  Upon success, the callback registered
+   * in initOffload must be released, and offload must be stopped.
+   *
+   * @return success true if offload is stopped, false otherwise
+   * @return errMsg a human readable string if eror has occured.
+   *
+   * Remarks: Statistics must be reset by this API.
+   */
+  @exit
+  stopOffload() generates (bool success, string errMsg);
+
+  /**
+   * Instruct management process not to forward traffic destined to or from the specified prefixes.
+   *
+   * This API may only be called after initOffload and before stopOffload.
+   *
+   * @param prefixes List containing fully specified prefixes. For e.g. 192.168.1.12/24
+                     or 2001:4860:0684:0:0:0:0:0:1002/64
+   *
+   * @return success true if success, false otherwise
+   * @return errMsg a human readable string if eror has occured.
+   *
+   * Remarks: This list overrides any previously specified list
+   */
+  setLocalPrefixes(vec<string> prefixes) generates (bool success, string errMsg);
+
+  /**
+   * Query offloaded traffic statistics forwarded to an upstream address.
+   *
+   * Return statistics that have transpired since the last query.  This would include
+   * statistics from all offloaded downstream tether interfaces that have been forwarded to this
+   * upstream interface.  After returning the statistics, the counters are reset to zero.
+   *
+   * Only offloaded statistics must be returned by this API, software stats must not be
+   * returned.
+   *
+   * @param upstream Upstream interface on which traffic exited/entered
+   *
+   * @return rxBytes values depicting the received bytes
+   * @return txBytes values depicting the transmitted bytes
+   */
+  getForwardedStats(string upstream) generates (uint64_t rxBytes, uint64_t txBytes);
+
+  /**
+   * Instruct hardware to stop forwarding traffic and send a callback after limit bytes have been
+   * transferred in either direction on this upstream interface.
+   *
+   * The limit must be applied to all traffic on the given upstream interface.  This
+   * includes hardware forwarded traffic, software forwarded traffic, and AP-originated traffic.
+   * IPv4 and IPv6 traffic both count towards the same limit.  IP headers are included in the
+   * byte count limit, but, link-layer headers are not.
+   *
+   * This API may only be called while offload is occurring on this upstream.  The hardware
+   * management process is not expected to cache the value and apply the quota once offload is
+   * started.  This cache is not expected, because the limit value would likely become stale over
+   * time and would not reflect any new traffic that has occurred.
+   *
+   * This limit must replace any previous limit.  It may be interpreted as "tell me when
+   * <limit> bytes have been transferred (in either direction) on <upstream>, starting
+   * now and counting from zero."
+   *
+   * Once the limit is reached, the callback registered in initOffload must be called to indicate
+   * this event and all offload must be stopped.  If offload is desired again, the hardware
+   * management process must be completely reprogrammed by calling setUpstreamParameters and
+   * addDownstream again.  Note that it is not necessary to call initOffload again to resume offload
+   * if stopOffload was not called by the client.
+   *
+   * @param upstream Upstream interface name that limit must apply to
+   * @param limit    Bytes limit that can occur before action must be taken
+   *
+   * @return success true if limit is applied, false otherwise
+   * @return errMsg a human readable string if eror has occured.
+   */
+  setDataLimit(string upstream, uint64_t limit) generates (bool success, string errMsg);
+
+  /**
+   * Instruct hardware to start forwarding traffic to the specified upstream.
+   *
+   * When iface, v4Addr, and v4Gw are all non-null, the management process may begin forwarding
+   * any currently configured or future configured IPv4 downstreams to this upstream interface.
+   *
+   * If any of the previously three mentioned parameters are null, then any current IPv4 offload
+   * must be stopped.
+   *
+   * When iface and v6Gws are both non-null, and in the case of v6Gws, are not empty, the
+   * management process may begin forwarding any currently configured or future configured IPv6
+   * downstreams to this upstream interface.
+   *
+   * If either of the two above parameters are null, or no V6 Gateways are provided, then IPv6
+   * offload must be stopped.
+   *
+   * This API may only be called after initOffload and before stopOffload.
+   *
+   * @param iface  Upstream interface name.  Note that only one is needed because IPv4 and IPv6
+   *               interfaces cannot be different (only known that this can occur during software
+   *               xlat, which cannot be offloaded through hardware anyways).  If the iface is
+   *               null, offload must be stopped.
+   * @param v4Addr The local IPv4 address assigned to the provided upstream interface, i.e. the
+   *               IPv4 address the packets are NATed to. For e.g. 192.168.1.12.
+   * @param v4Gw   The IPv4 address of the IPv4 gateway on the upstream interface.
+   *               For e.g. 192.168.1.1
+   * @param v6Gws  A list of IPv6 addresses (for e.g. 2001:4860:0684:0:0:0:0:0:1002) for possible
+   *               IPv6 gateways on the upstream interface.
+   *
+   * @return success true if success, false otherwise
+   * @return errMsg a human readable string if eror has occured.
+   *
+   * Remarks: This overrides any previously configured parameters.
+   */
+  setUpstreamParameters(string iface, string v4Addr, string v4Gw, vec<string> v6Gws)
+          generates (bool success, string errMsg);
+
+  /**
+   * Configure a downstream interface and prefix in the hardware management process that may be
+   * forwarded.
+   *
+   * The prefix may be an IPv4 or an IPv6 address to signify which family can be offloaded from the
+   * specified tether interface.  The list of IPv4 and IPv6 downstreams that are configured may
+   * differ.
+   *
+   * If the given protocol, as determined by the prefix, has an upstream set,
+   * the hardware may begin forwarding traffic between the upstream and any devices on the
+   * downstream interface that have IP addresses within the specified prefix. Traffic from the same
+   * downstream interfaces is unaffected and must be forwarded if and only if it was already
+   * being forwarded.
+   *
+   * If no upstream is currently configured, then these downstream interface and prefixes must be
+   * preserved so that offload may begin in the future when an upstream is set.
+   *
+   * This API does not replace any previously configured downstreams and must be explictly removed
+   * by calling removeDownstream.
+   *
+   * This API may only be called after initOffload and before stopOffload.
+   *
+   * @param iface  Tether interface
+   * @param prefix Downstream prefix depicting addresses that may be offloaded.
+   *               For e.g. 192.168.1.12/24 or 2001:4860:0684::/64)
+   *
+   * @return success true if success, false otherwise
+   * @return errMsg a human readable string if eror has occured.
+   *
+   * Remarks: The hardware management process may fail this call in a normal situation.  This can
+   *          happen because the hardware cannot support the current number of prefixes, the
+   *          hardware cannot support concurrent offload on multiple interfaces, the hardware
+   *          cannot currently support offload on the tether interface for some reason, or any
+   *          other dynamic configuration issues which may occur.  In this case,
+   *          traffic must remain unaffected and must be forwarded if and only if it was already
+   *          being forwarded.
+   */
+  addDownstream(string iface, string prefix) generates (bool success, string errMsg);
+
+  /**
+   * Remove a downstream prefix that may be forwarded from the hardware management process.
+   *
+   * The prefix may be an IPv4 or an IPv6 address. If it was not previously configured using
+   * addDownstream, then this must be a no-op.
+   *
+   * This API may only be called after initOffload and before stopOffload.
+   *
+   * @param iface  Tether interface
+   * @param prefix Downstream prefix depicting address that must no longer be offloaded
+   *               For e.g. 192.168.1.12/24 or 2001:4860:0684::/64)
+   *
+   * @return success true if success, false otherwise
+   * @return errMsg a human readable string if eror has occured.
+   */
+  removeDownstream(string iface, string prefix) generates (bool success, string errMsg);
+};
diff --git a/tetheroffload/control/1.0/ITetheringOffloadCallback.hal b/tetheroffload/control/1.0/ITetheringOffloadCallback.hal
new file mode 100644
index 0000000..397667f
--- /dev/null
+++ b/tetheroffload/control/1.0/ITetheringOffloadCallback.hal
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.tetheroffload.control@1.0;
+
+/**
+ * Callback providing information about status of hardware management process
+ * as well as providing a way to keep offloaded connections from timing out.
+ */
+interface ITetheringOffloadCallback {
+  /**
+   * Called when an asynchronous event is generated by the hardware management
+   * process.
+   */
+  oneway onEvent(OffloadCallbackEvent event);
+
+  /**
+   *  Provide a way for the management process to request that a connections
+   *  timeout be updated in kernel.
+   *
+   *  This is necessary to ensure that offloaded traffic is not cleaned up
+   *  by the kernel connection tracking module for IPv4.
+   */
+   oneway updateTimeout(NatTimeoutUpdate params);
+};
diff --git a/tetheroffload/control/1.0/types.hal b/tetheroffload/control/1.0/types.hal
new file mode 100644
index 0000000..e2576ac
--- /dev/null
+++ b/tetheroffload/control/1.0/types.hal
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.tetheroffload.control@1.0;
+
+enum OffloadCallbackEvent : uint32_t {
+    /**
+     * Indicate that a working configuration has been programmed and the
+     * hardware management process has begun forwarding traffic.
+     */
+    OFFLOAD_STARTED = 1,
+    /**
+     * Indicate that an error has occurred which has disrupted hardware
+     * acceleration.  Software routing may still be attempted; however,
+     * statistics may be temporarily unavailable.  Statistics may be recovered
+     * after OFFLOAD_SUPPORT_AVAILABLE event is fired.
+     */
+    OFFLOAD_STOPPED_ERROR = 2,
+    /**
+     * Indicate that the device has moved to a RAT on which hardware
+     * acceleration is not supported.  Subsequent calls to setUpstreamParameters
+     * and add/removeDownstream will likely fail and cannot be presumed to be
+     * saved inside of the hardware management process.  Upon receiving
+     * OFFLOAD_SUPPORT_AVAIALBLE, the client may reprogram the hardware
+     * management process to begin offload again.
+     */
+    OFFLOAD_STOPPED_UNSUPPORTED = 3,
+    /**
+     * Indicate that the hardware management process is willing and able to
+     * provide support for hardware acceleration at this time.  If applicable,
+     * the client may query for statistics.  If offload is desired, the client
+     * must reprogram the hardware management process.
+     */
+    OFFLOAD_SUPPORT_AVAILABLE = 4,
+    /**
+     * Hardware acceleration is no longer in effect and must be reprogrammed
+     * in order to resume.  This event is fired when the limit, applied in
+     * setDataLimit, has expired.  It is recommended that the client query for
+     * statistics immediately after receiving this event.
+     */
+    OFFLOAD_STOPPED_LIMIT_REACHED = 5
+};
+
+enum NetworkProtocol : uint32_t {
+    TCP = 6,
+    UDP = 17
+};
+
+struct IPv4AddrPortPair {
+    /** IPv4 Address and Port */
+    string addr; // for e.g. 192.168.1.12
+    uint16_t port; // for e.g. 8080
+};
+
+struct NatTimeoutUpdate {
+    IPv4AddrPortPair src;
+    IPv4AddrPortPair dst;
+    NetworkProtocol proto;
+};
diff --git a/thermal/1.0/Android.bp b/thermal/1.0/Android.bp
index 7f9c75a..bbede02 100644
--- a/thermal/1.0/Android.bp
+++ b/thermal/1.0/Android.bp
@@ -52,13 +52,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tv/cec/1.0/Android.bp b/tv/cec/1.0/Android.bp
index e6b4886..6aca979 100644
--- a/tv/cec/1.0/Android.bp
+++ b/tv/cec/1.0/Android.bp
@@ -59,13 +59,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/tv/input/1.0/Android.bp b/tv/input/1.0/Android.bp
index 468ef12..a0d7109 100644
--- a/tv/input/1.0/Android.bp
+++ b/tv/input/1.0/Android.bp
@@ -60,7 +60,6 @@
         "libutils",
         "libcutils",
         "android.hardware.audio.common@2.0",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
@@ -68,6 +67,5 @@
         "libhwbinder",
         "libutils",
         "android.hardware.audio.common@2.0",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/usb/1.0/Android.bp b/usb/1.0/Android.bp
index 847288b..4c5c8e3 100644
--- a/usb/1.0/Android.bp
+++ b/usb/1.0/Android.bp
@@ -59,13 +59,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/vibrator/1.0/Android.bp b/vibrator/1.0/Android.bp
index 5d570c9..32be077 100644
--- a/vibrator/1.0/Android.bp
+++ b/vibrator/1.0/Android.bp
@@ -52,13 +52,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/vr/1.0/Android.bp b/vr/1.0/Android.bp
index 69011c4..f0aef5c 100644
--- a/vr/1.0/Android.bp
+++ b/vr/1.0/Android.bp
@@ -48,13 +48,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/wifi/1.0/Android.bp b/wifi/1.0/Android.bp
index 7289e8a..3a44608 100644
--- a/wifi/1.0/Android.bp
+++ b/wifi/1.0/Android.bp
@@ -136,13 +136,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }
diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp
index 83b2e53..077dbb8 100644
--- a/wifi/1.0/default/hidl_struct_util.cpp
+++ b/wifi/1.0/default/hidl_struct_util.cpp
@@ -1075,6 +1075,7 @@
         hidl_request.baseConfigs.disableMatchExpirationIndication ? 0x2 : 0x0;
   legacy_request->recv_indication_cfg |=
         hidl_request.baseConfigs.disableFollowupReceivedIndication ? 0x4 : 0x0;
+  legacy_request->recv_indication_cfg |= 0x8;
   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;
diff --git a/wifi/1.0/default/wifi_legacy_hal.cpp b/wifi/1.0/default/wifi_legacy_hal.cpp
index 875de5c..b6a7550 100644
--- a/wifi/1.0/default/wifi_legacy_hal.cpp
+++ b/wifi/1.0/default/wifi_legacy_hal.cpp
@@ -181,6 +181,12 @@
   }
 }
 
+std::function<void(const NanPublishRepliedInd&)>
+    on_nan_event_publish_replied_user_callback;
+void onAysncNanEventPublishReplied(NanPublishRepliedInd* /* event */) {
+  LOG(ERROR) << "onAysncNanEventPublishReplied triggered";
+}
+
 std::function<void(const NanPublishTerminatedInd&)>
     on_nan_event_publish_terminated_user_callback;
 void onAysncNanEventPublishTerminated(NanPublishTerminatedInd* event) {
@@ -1060,6 +1066,7 @@
   return global_func_table_.wifi_nan_register_handler(
       wlan_interface_handle_,
       {onAysncNanNotifyResponse,
+       onAysncNanEventPublishReplied,
        onAysncNanEventPublishTerminated,
        onAysncNanEventMatch,
        onAysncNanEventMatchExpired,
diff --git a/wifi/supplicant/1.0/Android.bp b/wifi/supplicant/1.0/Android.bp
index 883d600..c692f9a 100644
--- a/wifi/supplicant/1.0/Android.bp
+++ b/wifi/supplicant/1.0/Android.bp
@@ -129,13 +129,11 @@
         "liblog",
         "libutils",
         "libcutils",
-        "android.hidl.base@1.0",
     ],
     export_shared_lib_headers: [
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "libutils",
-        "android.hidl.base@1.0",
     ],
 }