pal: Fix a race condition in ContextManager's callback handling
ContextManager's callback function StreamProxyCallback can run
into race condition when multiple ASPS events are arrived back
to back due to lack of synchronization. When the race condition
happens, an ASPS event will fail to wake up the command thread
to process its request command. To fix it, add a mutex lock in
StreamProxyCallback to block new events when an event is being
processed. Also remove mutex lock in ParseASPSEventPayload to
avoid deadlock.
Change-Id: I3ce2eeba49708bce0dc640f12c5dcea53b7489bd
2 files changed