IPCThreadState: 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.

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

Change-Id: I138c8441dc08a2c2804bc5f68a2545a7fb269809
2 files changed