HidlBinderSupport: addPostCommandTask

Queue of tasks to be run after the binder thread
is done running.

The motivating usecase is to allow a lazy HAL to
exit when it is done with a particular call, but
this could also be used for resource deallocation
or other tasks that need to be run on the binder
thread.

This is intentionally not added for passthrough
services because there are not two separate contexts
for these.

Bug: 78509314
Test: use this to create a lazy dumpstate HAL and
   make sure it works as intended.

Change-Id: I1852c222e9b658d82b214b789aa76a8f850f7e00
2 files changed