-
Jeff Hamilton authored
The LLCP stack is still using globals without holding the concurrency lock. When turning the screen off we were previously disabling the NFCEE routing before disconnecting the active target. The routing code would grab the lock and then touch the globals, which the LLCP was using illegally, causing a crash when the LLCP triggered callbacks are delivered. This change reorders the shutdown at screen off to disconnect the remote target before issuing the change to the NFCEE routing in an attempt to stop the ongoing LLCP transactions, thereby avoiding the crash. Since the callbacks are asynchronous the race is still there, but it's hit more like 10% of the time instead of 100% of the time. Bug: 5366024 Change-Id: I31230166c1c5bf116195db350ac6605feb90e87f
e0b5fcb7