Reader mode NFC API: move to callback model.
Using intents for reader mode doesn't work well for 2 reasons:
1) Intents are used to resolve, but in reader mode we already
know where to resolve to. Additionally, dispatching an intent
causes additional latency.
2) Using intents with foreground dispatch was tricky; for every
call to onNewIntent() with a new tag, there was a call to
onPause(), which effectively disabled reader mode again,
causing a discovery loop.
Instead, let the app register a callback, and call that when
we discover a new tag. Also, add new flag to disable platform
sounds, and to change the presence check delay.
Bug: 10360259
Change-Id: I8373543d6cf2f7ca73c9b3e42bb8b51e3ac48cac
6 files changed