Replies: 1 comment
-
|
Hi @kanjoe24, This is not something the HAL service needs to handle. The AIDL-generated client proxy always allocates the return variable and passes a valid pointer to the service. The service will never receive a NULL The flow is:
There is no code path where the framework passes NULL to the service. If a malformed raw Binder transaction somehow omitted the reply parcel, it would fail at the transport layer before the service method is ever invoked. The HAL service should not add NULL checks on |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In AIDL, the return value of a function is converted into a pointer and passed as the last argument of the generated function.
For example, a service function defined as:
Capabilities getCapabilities();is generated as:
::android::binder::Status DeviceInfo::getCapabilities(Capabilities* _aidl_return);What should be the expected behaviour of the service when _aidl_return is NULL?
Should the service raise an exception in this case? If so, which one would be appropriate — EX_NULL_POINTER or EX_ILLEGAL_ARGUMENT?
Beta Was this translation helpful? Give feedback.
All reactions