Merge "Regenerate make files for Vehicle HAL 2.1"
diff --git a/broadcastradio/1.0/default/Tuner.cpp b/broadcastradio/1.0/default/Tuner.cpp
index b564d5a..ff643b8 100644
--- a/broadcastradio/1.0/default/Tuner.cpp
+++ b/broadcastradio/1.0/default/Tuner.cpp
@@ -22,7 +22,7 @@
 #include "BroadcastRadio.h"
 #include "Tuner.h"
 #include "Utils.h"
-#include <system/radio_metadata.h>
+#include <system/RadioMetadataWrapper.h>
 
 namespace android {
 namespace hardware {
@@ -167,6 +167,7 @@
 Return<void> Tuner::getProgramInformation(getProgramInformation_cb _hidl_cb)  {
     int rc;
     radio_program_info_t halInfo;
+    RadioMetadataWrapper metadataWrapper(&halInfo.metadata);
     ProgramInfo info;
 
     ALOGV("%s", __FUNCTION__);
@@ -175,12 +176,10 @@
         goto exit;
     }
 
-    radio_metadata_allocate(&halInfo.metadata, 0, 0);
     rc = mHalTuner->get_program_information(mHalTuner, &halInfo);
     if (rc == 0) {
         Utils::convertProgramInfoFromHal(&info, &halInfo);
     }
-    radio_metadata_deallocate(halInfo.metadata);
 
 exit:
     _hidl_cb(Utils::convertHalResult(rc), info);
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_utils.h b/radio/1.0/vts/functional/radio_hidl_hal_utils.h
index f0c4504..23b6ffa 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_utils.h
+++ b/radio/1.0/vts/functional/radio_hidl_hal_utils.h
@@ -417,6 +417,8 @@
 
     Return<void> setIndicationFilterResponse(const RadioResponseInfo& info);
 
+    Return<void> setSimCardPowerResponse(const RadioResponseInfo& info);
+
     Return<void> acknowledgeRequest(int32_t serial);
 };
 
diff --git a/radio/1.0/vts/functional/radio_response.cpp b/radio/1.0/vts/functional/radio_response.cpp
index 18a02ed..b2a74f4 100644
--- a/radio/1.0/vts/functional/radio_response.cpp
+++ b/radio/1.0/vts/functional/radio_response.cpp
@@ -655,6 +655,11 @@
     return Void();
 }
 
+Return<void> RadioResponse::setSimCardPowerResponse(
+        const RadioResponseInfo& info) {
+    return Void();
+}
+
 Return<void> RadioResponse::acknowledgeRequest(int32_t serial) {
     return Void();
 }
diff --git a/renderscript/1.0/default/Context.cpp b/renderscript/1.0/default/Context.cpp
index 5a09cf9..4e0964e 100644
--- a/renderscript/1.0/default/Context.cpp
+++ b/renderscript/1.0/default/Context.cpp
@@ -73,30 +73,30 @@
     return rs_to_hidl<Type>(_type);
 }
 
-Return<Allocation> Context::allocationCreateTyped(Type type, AllocationMipmapControl mips, int32_t usage, Ptr ptr) {
+Return<Allocation> Context::allocationCreateTyped(Type type, AllocationMipmapControl amips, int32_t usage, Ptr ptr) {
     RsType _type = hidl_to_rs<RsType>(type);
-    RsAllocationMipmapControl _mips = static_cast<RsAllocationMipmapControl>(mips);
+    RsAllocationMipmapControl _amips = static_cast<RsAllocationMipmapControl>(amips);
     uint32_t _usage = usage;
     uintptr_t _ptr = hidl_to_rs<uintptr_t>(ptr);
-    RsAllocation _allocation = Device::getHal().AllocationCreateTyped(mContext, _type, _mips, _usage, _ptr);
+    RsAllocation _allocation = Device::getHal().AllocationCreateTyped(mContext, _type, _amips, _usage, _ptr);
     return rs_to_hidl<Allocation>(_allocation);
 }
 
-Return<Allocation> Context::allocationCreateFromBitmap(Type type, AllocationMipmapControl mips, const hidl_vec<uint8_t>& bitmap, int32_t usage) {
+Return<Allocation> Context::allocationCreateFromBitmap(Type type, AllocationMipmapControl amips, const hidl_vec<uint8_t>& bitmap, int32_t usage) {
     RsType _type = hidl_to_rs<RsType>(type);
-    RsAllocationMipmapControl _mips = static_cast<RsAllocationMipmapControl>(mips);
+    RsAllocationMipmapControl _amips = static_cast<RsAllocationMipmapControl>(amips);
     const hidl_vec<uint8_t>& _bitmap = bitmap;
     uint32_t _usage = usage;
-    RsAllocation _allocation = Device::getHal().AllocationCreateFromBitmap(mContext, _type, _mips, _bitmap.data(), _bitmap.size(), _usage);
+    RsAllocation _allocation = Device::getHal().AllocationCreateFromBitmap(mContext, _type, _amips, _bitmap.data(), _bitmap.size(), _usage);
     return rs_to_hidl<Allocation>(_allocation);
 }
 
-Return<Allocation> Context::allocationCubeCreateFromBitmap(Type type, AllocationMipmapControl mips, const hidl_vec<uint8_t>& bitmap, int32_t usage) {
+Return<Allocation> Context::allocationCubeCreateFromBitmap(Type type, AllocationMipmapControl amips, const hidl_vec<uint8_t>& bitmap, int32_t usage) {
     RsType _type = hidl_to_rs<RsType>(type);
-    RsAllocationMipmapControl _mips = static_cast<RsAllocationMipmapControl>(mips);
+    RsAllocationMipmapControl _amips = static_cast<RsAllocationMipmapControl>(amips);
     const hidl_vec<uint8_t>& _bitmap = bitmap;
     uint32_t _usage = usage;
-    RsAllocation _allocation = Device::getHal().AllocationCubeCreateFromBitmap(mContext, _type, _mips, _bitmap.data(), _bitmap.size(), _usage);
+    RsAllocation _allocation = Device::getHal().AllocationCubeCreateFromBitmap(mContext, _type, _amips, _bitmap.data(), _bitmap.size(), _usage);
     return rs_to_hidl<Allocation>(_allocation);
 }
 
diff --git a/renderscript/1.0/default/Context.h b/renderscript/1.0/default/Context.h
index 38c45c5..d8bfe4f 100644
--- a/renderscript/1.0/default/Context.h
+++ b/renderscript/1.0/default/Context.h
@@ -40,9 +40,9 @@
     Return<Allocation> allocationAdapterCreate(Type type, Allocation baseAlloc) override;
     Return<void> allocationAdapterOffset(Allocation alloc, const hidl_vec<uint32_t>& offsets) override;
     Return<Type> allocationGetType(Allocation allocation) override;
-    Return<Allocation> allocationCreateTyped(Type type, AllocationMipmapControl mips, int32_t usage, Ptr ptr) override;
-    Return<Allocation> allocationCreateFromBitmap(Type type, AllocationMipmapControl mips, const hidl_vec<uint8_t>& bitmap, int32_t usage) override;
-    Return<Allocation> allocationCubeCreateFromBitmap(Type type, AllocationMipmapControl mips, const hidl_vec<uint8_t>& bitmap, int32_t usage) override;
+    Return<Allocation> allocationCreateTyped(Type type, AllocationMipmapControl amips, int32_t usage, Ptr ptr) override;
+    Return<Allocation> allocationCreateFromBitmap(Type type, AllocationMipmapControl amips, const hidl_vec<uint8_t>& bitmap, int32_t usage) override;
+    Return<Allocation> allocationCubeCreateFromBitmap(Type type, AllocationMipmapControl amips, const hidl_vec<uint8_t>& bitmap, int32_t usage) override;
     Return<NativeWindow> allocationGetNativeWindow(Allocation allocation) override;
     Return<void> allocationSetNativeWindow(Allocation allocation, NativeWindow nativewindow) override;
     Return<void> allocationSetupBufferQueue(Allocation alloc, uint32_t numBuffer) override;
diff --git a/wifi/1.0/IWifiNanIfaceEventCallback.hal b/wifi/1.0/IWifiNanIfaceEventCallback.hal
index 80d67ce..dd956d6 100644
--- a/wifi/1.0/IWifiNanIfaceEventCallback.hal
+++ b/wifi/1.0/IWifiNanIfaceEventCallback.hal
@@ -141,6 +141,7 @@
    *        |NanStatusType.INTERNAL_FAILURE|
    *        |NanStatusType.INVALID_SESSION_ID|
    *        |NanStatusType.INVALID_PEER_ID|
+   *        |NanStatusType.FOLLOWUP_TX_QUEUE_FULL|
    */
   oneway notifyTransmitFollowupResponse(CommandIdShort id, WifiNanStatus status);
 
@@ -281,8 +282,9 @@
    *
    * @param cmdId command Id corresponding to the original |transmitFollowupRequest| request.
    * @param status WifiNanStatus of the operation.  Possible status codes are:
+   *               |NanStatusType.SUCCESS|
    *               |NanStatusType.NO_OTA_ACK|
-   *               |NanStatusType.FOLLOWUP_TX_QUEUE_FULL|
+   *               |NanStatusType.PROTOCOL_FAILURE|
    */
   oneway eventTransmitFollowup(CommandIdShort id, WifiNanStatus status);
 
diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp
index e57919d..4dd1ba6 100644
--- a/wifi/1.0/default/hidl_struct_util.cpp
+++ b/wifi/1.0/default/hidl_struct_util.cpp
@@ -134,6 +134,7 @@
     return false;
   }
   hidl_status->ringName = reinterpret_cast<const char*>(legacy_status.name);
+  hidl_status->flags = 0;
   for (const auto flag : {WIFI_RING_BUFFER_FLAG_HAS_BINARY_ENTRIES,
                           WIFI_RING_BUFFER_FLAG_HAS_ASCII_ENTRIES}) {
     if (flag & legacy_status.flags) {
@@ -457,6 +458,7 @@
   if (!hidl_scan_data) {
     return false;
   }
+  hidl_scan_data->flags = 0;
   for (const auto flag : {legacy_hal::WIFI_SCAN_FLAG_INTERRUPTED}) {
     if (legacy_cached_scan_result.flags & flag) {
       hidl_scan_data->flags |=
@@ -1749,6 +1751,7 @@
   hidl_capabilities->lcrSupported = legacy_capabilities.lcr_support;
   hidl_capabilities->responderSupported =
       legacy_capabilities.responder_supported;
+  hidl_capabilities->preambleSupport = 0;
   for (const auto flag : {legacy_hal::WIFI_RTT_PREAMBLE_LEGACY,
                           legacy_hal::WIFI_RTT_PREAMBLE_HT,
                           legacy_hal::WIFI_RTT_PREAMBLE_VHT}) {
@@ -1758,6 +1761,7 @@
               convertLegacyRttPreambleToHidl(flag));
     }
   }
+  hidl_capabilities->bwSupport = 0;
   for (const auto flag : {legacy_hal::WIFI_RTT_BW_5,
                           legacy_hal::WIFI_RTT_BW_10,
                           legacy_hal::WIFI_RTT_BW_20,