OmapiTransport: call closeConnection outside of lock in BinderDiedCallback
closeConnection needs to take the same lock that BinderDiedCallback is
taking when looking through sCookies.
To safely call closeConnection from BinderDiedCallback outside of the
lock, we need to keep the OmapiTranport object alive by holding a strong
reference to it with a shared_ptr.
This requires std::enable_shared_from_this and ensuring all users of
OmapiTransport hold onto a shared_ptr to the object, so a new
OmapiTransport::make function is added and the existing constructor is
moved to private.
Test: cd hardware/nxp && mm
Bug: 346416142
Change-Id: Ia6d2eb2df9dd68444d2fec87c97b3af20802a9f1
5 files changed