Allow MQDescriptors with null native_handles to be passed over hwbinder
This would be useful for cases where the MQDescriptor is sent
along with a HAL specific status.
Test: FMQ unit tests
Change-Id: I24931f7524972c698b59bf11eaacf0f980c0d6ff
diff --git a/transport/include/hidl/HidlBinderSupport.h b/transport/include/hidl/HidlBinderSupport.h
index ba11937..8b98021 100644
--- a/transport/include/hidl/HidlBinderSupport.h
+++ b/transport/include/hidl/HidlBinderSupport.h
@@ -147,7 +147,7 @@
if (_hidl_err != ::android::OK) { return _hidl_err; }
const native_handle_t *_hidl_mq_handle_ptr;
- _hidl_err = parcel.readEmbeddedNativeHandle(
+ _hidl_err = parcel.readNullableEmbeddedNativeHandle(
parentHandle,
parentOffset + MQDescriptor<T, flavor>::kOffsetOfHandle,
&_hidl_mq_handle_ptr);