History log of /packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8d9375ec6e24546fe7b5423e436b7bbe48862f57 07-Nov-2013 Martijn Coenen <maco@google.com> Increase NFC-A guard time to work around B5 issue.

Increase NFC-A guard time in reader mode, to make
sure we properly wake up BCM20791B05 devices.

Bug: 10852675
Change-Id: Ia30972d5d7850171bc58068c5d6896025eb6c2c1
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
8d154680537afa5242edeb98c8f414d6186558cf 04-Oct-2013 Martijn Coenen <maco@google.com> Increase reader mode pull duration.

Also fixed a bug where gActivated is not
properly reset (scenario: turn NFC off
while doing P2P/reader) and moved some
logs to DBG. Will flick the DBG switch
later.

Bug: 10852675
Change-Id: If115ab162ddc4a080166f00cdf5e95ed4da70642
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
33aeb7c13f8fd9d9bd301f31680836b8ec912d51 12-Sep-2013 Martijn Coenen <maco@google.com> Fix build.

Change-Id: Id29de698f60266a0dd8d6fb4d5823dc5011f1562
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
d6ead4d11c56cc4b1e90a93d6d5fe7583abbbfb8 12-Sep-2013 Martijn Coenen <maco@google.com> Reader API: disable LPTD on NCI devices when in reader mode.

To improve reader performance.

Bug: 10360259
Change-Id: I3a76563b876aafa9c8cd555127a32f8c8e5bfd14
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
f5cd84c3a7ffb66196ab3c0745569da937d7533b 30-Aug-2013 Martijn Coenen <maco@google.com> Upgrade to new API changes.

Following API review. Also:
- Added support for pause/resume P2P in reader mode
- Fixed bug where we tried to route even when NFC was off,
causing lockups.

Bug: 10550349
Bug: 10552589
-

Change-Id: I48f6834386bd542bdf1b7f1a8b1072d8981b0915
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
c4e4277a71c70e96198cb760676ad3b40f9e0e3d 27-Aug-2013 Martijn Coenen <maco@google.com> Implement reader mode APIs.

Disable p2p/listen modes on request. Currently only
for NCI platforms, NXP will follow later.

Also, fixed some compiler warnings and a mem leak.

Bug: 10360259
Change-Id: Id13db24914adc43db62e055b66e0989e9cde2482
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
a8aa07142ea0078d3ae4ae486e094e2f2f4ff732 27-Mar-2013 Evan Chu <evanchu@broadcom.com> Sync up with Broadcom JNI changes.

Patches contributed by Evan Chu<evanchu@broadcom.com>
and Paul Chaisson<pchaisson@broadcom.com>.

Bug: 10360038
Change-Id: I1402191406b08e097680f8c7f587f393f749184e
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
d53c2b599c73f7404b5a604be4d9a5449cafdd72 16-Jul-2013 Martijn Coenen <maco@google.com> HCE: Support dynamic routing changes.

- Routing table will now be dynamically updated as
HCE services are installed/removed/modified
- Layering and arch:
- RegisteredAidCache knows about which services want
which AIDs, and on what route.
- AidRoutingManager maintains the current state of the
AID routing table in the NFCC.
- HostEmulationManager is responsible for incoming
HCE transactions and resolving them to the correct
service.
- Fixed various bugs

Change-Id: I16327dfca96a9bd3fb5633c2e6b4247fe35ab8d6
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
9f8f6cf9c58405ecafe2d425801e6c14088db8c7 30-Apr-2013 Martijn Coenen <maco@google.com> Host-based card emulation.

Initial check-in that allows to build basic HCE apps:
- Introduced new RoutingManager, taking care of programming
the routing table to the NFCC.
- Added DeviceHost interfaces for adding/removing aids to
the routing table, and sending raw frames.
- On devices that have an eSE, the eSE is the default route.
- Removed routing code from SecureElement class.
- HostEmulationManager resolves and dispatches AIDs
routed to the host to an application service.
- Simple Messenger service interface for exchanging APDUs.
- RegisteredAidCache keeps a cache of AIDs that are registered
by Android applications, as well as their route.

TODO:
- Dynamic registration of AIDs.
- Dynamic updates of the routing table.
- AID conflict resolution.
- Allow apps to indicate AIDs present "off-host".
- Implement base-class HCE service in framework.
- Switch default route to host.

Change-Id: I7d7643770fcc848699810ec5443d0d9b81d85669
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
4293521790a2d46cb94f0bcf5b241634128d39f2 02-May-2013 Martijn Coenen <maco@google.com> am fa5d6ea2: am f5954743: Don\'t overwrite SWP_CFG on SE pipe enable/disable.

* commit 'fa5d6ea26ada28448971e7f0b542dfe84307836d':
Don't overwrite SWP_CFG on SE pipe enable/disable.
f5954743f1d8b8ace641880fd55466fff4d914cb 02-May-2013 Martijn Coenen <maco@google.com> Don't overwrite SWP_CFG on SE pipe enable/disable.

Different BCM2079x revisions have different interpretations for
bits in the SWP_CFG config parameter. Instead of overwriting
whatever is there, read the current value, and just set/unset
the bit for UICC_IDLE timeout as desired.

Bug: 8776949
Change-Id: I33807aef1e94cfa6a2f4af0dd6a46dae630d850f
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
9cc194fd111bd41013b2ba1b096b0111ae7585fb 19-Apr-2013 Martijn Coenen <maco@google.com> Remove special deactivation handling code.

Original purpose of this block is unclear, so
removing it.

Change-Id: Ic1753f3a8c7a4d688b2f31fb6184ec6131a5ffe8
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
2526197cb8039c1fa66c950110c78cbc95de1bba 17-Apr-2013 Martijn Coenen <maco@google.com> 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
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
aafca6482d0b65b1ecab990659c07e4a82582db8 15-Apr-2013 Martijn Coenen <maco@google.com> Don't restart RF discovery if not needed.

No need to restart RF discovery is the
current routing is already applied.

Bug: 8508568
Change-Id: If4c2b4fef9211bbd0708e72a82e9726e43dd7857
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
b408fc371821c397b47c8722c339c6b4359e062f 09-Apr-2013 Martijn Coenen <maco@google.com> Properly reset field / listen mode flags in SE object.

On NFC disable, the SE object is "finalized" but not
destroyed. It is reused on the next NFC enable, but
the listen mode / field status flags were not cleared
then.

Bug: 8574917
Bug: 8489820
Change-Id: I8e11c60eda47762404a5d5020a0c2e6ff95ead2a
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
e9a5b789db1a0a437073d20820be6266920cc7e8 07-Apr-2013 Martijn Coenen <maco@google.com> Fix race condition between NFC disabling and field events.

This field disabled notification was not strictly necessary -
we enforce it now anyway when the p2p link is disabled.

Change-Id: I45dbf34daba88b58376d63e1f83778ec2373a6ca
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
57a44d07a3de327e8cdbbcd622118aa517313dbe 28-Mar-2013 Martijn Coenen <maco@google.com> Deal with pre-MR2 PN544 NXP stack LLCP bugs.

In MR2 we started connecting LLCP on link
activation instead of when the send was confirmed. Pre-MR2
NXP-stack devices have a bug that causes them to only
send the first SYMM after 750 ms (in case they are the
initiator). There is another bug that causes that same stack
to crash if two threads try to send a packet at the same
time.

Unfortunately, this combination of factors creates the
following race:

1) pre-MR2 PN544-initiator initiates p2p link with MR2 device
2) pre-MR2 PN544-initiator starts Touch to Beam animation
3) pre-MR2 PN544 doesn't have data to send, but delays SYMM for 750ms
4) MR2 device finally gets SYMM after 750ms, and sends CONNECT PDU
5) pre-MR2 PN544-initiator device responds to CONNECT PDU with CC on Thread 1
6) Within a ~50 ms window, the user on the pre-MR2 PN544-initiator touches
the screen to confirm the send. This causes Thread 2 to try to send
something, which fails.

As a result, the Beam transaction fails. Unfortunately
this is quite easy to reproduce, since the Beam animation takes
about 750ms, just the same amount of time it takes for the SYMM
to get sent.

To prevent such a race condition, we should make sure that we do
not create multi-threaded access on the remote device. The best way
to do that is to not connect the LLCP services automatically when
talking to a pre-MR2 PN544-initiator.

Long story short, when we don't receive a first packet of data
after 200 ms, we consider the remote device to be a buggy
implementation, and delay the connect until the time the user
decides to send something (in which case it's fine - it's unlikely
the user at the other side tries to send something at exactly the
same time).

Also fixed RF field notifications to be more robust; whenever
p2p is activated, we disable field events, and always treat the
field as being on.

Bug: 8508568
Change-Id: I41b427afb24c7f8d228adc91d258cca553539588
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
218b2ef897289d3e6fd7818c6883809149f62f08 27-Mar-2013 Martijn Coenen <maco@google.com> Update JNI to work with latest stack drop.

Also improved support for Kovio.

Change-Id: If3c7a7a638f9af30b21fd86e4d7609cfb2c35558
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
61beae816af13f75dabb484d287739723c716dee 13-Mar-2013 Martijn Coenen <maco@google.com> Wait for UICC_IDLE config event to complete.

Also remove some obsolete UICC_IDLE config code.

Bug: 7487151
Change-Id: I0d11744f966bb57d2fe9496ee3a1cb0402955134
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
97a71fe90493efd5947bb6f18c7b58a7e795c1dd 18-Jan-2013 Evan Chu <evanchu@broadcom.com> Support for Kovio tags via NfcBarcode API class

Change by Mark Gorodetzky.

Bug: 7222958
Change-Id: If0e2d973e92f0f6c148cc7a3c7fdf860221a3af2
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
803eb6ae8cd5b2ac3ffe010a3ced9018bf0b3d1d 22-Dec-2012 Elliott Hughes <enh@google.com> am f843d899: Merge "Fix NFC JNI local reference and pin table leaks."

* commit 'f843d8995fb94bdb1059061bad650c21ffd3588e':
Fix NFC JNI local reference and pin table leaks.
2534d9a546f24435d9dab8168f9ea5bf8ca1eb9b 18-Dec-2012 Elliott Hughes <enh@google.com> Fix NFC JNI local reference and pin table leaks.

Also turn compiler warnings up and fix the easy ones.

Bug: http://code.google.com/p/android/issues/detail?id=20441
Change-Id: I1043300f344b8296cfbb6bfad17388d5c3b314d1
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
be1939b4b6003ac7a65fcb95a3912f5e1ce8e75f 14-Dec-2012 The Android Open Source Project <initial-contribution@android.com> Snapshot b80adb2c263702442cf2f2d771168400e6ceb9f8

Change-Id: I391d8e1be1a61e68b01f0db371dbb4ed3e5b5933
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp
525c260303268a83da4c3413b953d13c9084e834 14-Dec-2012 The Android Open Source Project <initial-contribution@android.com> Snapshot 1a6bcf3cca90fedfbad33c1cdd6d05af5774fc01

Change-Id: I3ccb25bf7cde2c22f52260cae0e9957517e6bb5f
/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp