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/PeerToPeer.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/PeerToPeer.cpp
|
ead6b34f0bdc6506533db2f5c2fa07d001417f42 |
|
11-Mar-2013 |
Martijn Coenen <maco@google.com> |
Increase LLCP data-link connection timeout to 2000 ms. Some older PN544-based solutions would only send the first SYMM back (as an initiator) after the full LTO (750ms). But our connect timer starts immediately, and hence we may timeout if the timer is set to 1000 ms. Worse, that causes us to immediately connect to the NPP socket, causing concurrency issues in the NXP stack. Increase the default timeout to 2000 ms, giving us enough time to complete the first connect. Change-Id: I1e45ebd2f97dc6bb362e2bfea3a42445f69ad59d
/packages/apps/Nfc/nci/jni/PeerToPeer.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/PeerToPeer.cpp
|
be1939b4b6003ac7a65fcb95a3912f5e1ce8e75f |
|
14-Dec-2012 |
The Android Open Source Project <initial-contribution@android.com> |
Snapshot b80adb2c263702442cf2f2d771168400e6ceb9f8 Change-Id: I391d8e1be1a61e68b01f0db371dbb4ed3e5b5933
/packages/apps/Nfc/nci/jni/PeerToPeer.cpp
|
525c260303268a83da4c3413b953d13c9084e834 |
|
14-Dec-2012 |
The Android Open Source Project <initial-contribution@android.com> |
Snapshot 1a6bcf3cca90fedfbad33c1cdd6d05af5774fc01 Change-Id: I3ccb25bf7cde2c22f52260cae0e9957517e6bb5f
/packages/apps/Nfc/nci/jni/PeerToPeer.cpp
|