Cleanup NN callback error handling
This CL introduces a new templated class CallbackValue to handle HIDL "return value" callbacks in a terser and more readable way. This CL also introduces a new macro HANDLE_HAL_STATUS to return from the current function when an error is present with the ability to append a more descriptive error message. Finally, this CL changes the behavior of synchronous executions. Prior to this CL, IPreparedModel fell back to an asynchronous execution if the synchronous execution was allowed and failed. This change instead returns a failure if synchronous execution is allowed and fails. Bug: 173084343 Test: mma Change-Id: I62714a932e71dfc77401bbcb9eaaaf3d94fb9707 Merged-In: I62714a932e71dfc77401bbcb9eaaaf3d94fb9707 (cherry picked from commit 98ed9baf)
Loading
Please register or sign in to comment