Consistently deal with onRegistration() transport errors.
In all cases, we remove the registered callback from our
internal state when a call into it fails.
We also register death recipients for each of the registered
callbacks.
Because of this, a registration callback failing should be
an extremely rare event: it can only happen if a callback
is attempted right after the process dies, but before we have
processed the death notification.
Therefore, log registration callbacks failing as errors, as
it may mean there's more going on.
Bug: 31632518
Bug: 34643534
Test: hidl_test; adb shell stop; manually killing processes with
listeners
Change-Id: I73be10c2c56d1a343f875960535a165531b5c235
4 files changed