Fix RF field stuck on race condition.
If we deactivate a tag to sleep after an NDEF check,
we're waiting for a DEACTIVATE_NTF event from the core
stack to unblock us. However, there is a
code path where we can be unblocked even without a
DEACTIVATE_NTF event. If you'd happen to remove the tag
right after the deactivation, we'd be getting read/write
interface errors, which erroneously unblock the deactivate
before it has been completed.
Then, we send another deactive command to go back to discovery.
However, because the previous deactivate is still pending, the
deactivate to discovery command gets dropped, and we stay in
a situation where the RF field is stuck on, burning power.
For now fix by adding RW_INTF_ERROR_EVTs to the list of events
that do not unblock a thread waiting on deactivate. Ideally
no other event is allowed to unblock, but we'll need more time
to verify that is actually true.
Bug: 8616351
Change-Id: I381046f0320fd4b31c5ec65d54ef2e9530c3b13c
1 file changed