More robust ref counting in EuiccConnector.
The current implementation has two holes: -If the LPA crashes between the command being dispatched successfully (a oneway IPC) and the callback being executed, the operation will never be considered finished. -The callbacks happen on a binder thread, whereas all other access to the ref counter happens on the handler thread. We address both of these by moving the callbacks to the state machine's handler thread and by keeping track of all callbacks for all pending commands. If the state machine is about to leave the connected state, because the connection is now severed, we call all of these callbacks (with a generic "service unavailable" error). Fixes: 37480432 Test: TreeHugger + Test of a crashing LPA Change-Id: Icc31317d43cffa28f386478f04f7dd99622eb3c9
Loading
Please register or sign in to comment