summaryrefslogtreecommitdiffstats
path: root/nci
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-4.2.2_r1' of ↵Steve Kondik2013-02-123-43/+43
|\ | | | | | | | | | | https://android.googlesource.com/platform/packages/apps/Nfc into 1.1 Android 4.2.2 release 1
| * Snapshot b80adb2c263702442cf2f2d771168400e6ceb9f8The Android Open Source Project2012-12-133-43/+43
| | | | | | | | Change-Id: I391d8e1be1a61e68b01f0db371dbb4ed3e5b5933
| * Snapshot 1a6bcf3cca90fedfbad33c1cdd6d05af5774fc01The Android Open Source Project2012-12-1342-0/+16797
| | | | Change-Id: I3ccb25bf7cde2c22f52260cae0e9957517e6bb5f
* Merge branch 'jb-mr1-release' of ↵Steve Kondik2012-11-211-0/+12
| | | | | | | | | https://android.googlesource.com/platform/packages/apps/Nfc into HEAD Conflicts: nxp/jni/com_android_nfc_NativeNfcManager.cpp Change-Id: Ic84af6ad1cda79984f40e9fc464d2cbaa994b89a
* Reset RF field status on SE activation.Martijn Coenen2012-10-221-0/+5
| | | | | | | | | | | | | | We've seen the NFCC get in a state where it continuously reports field off/field on events. The danger is that the device goes to sleep right after a field on event. On wake-up, the field off/field on loop is gone, and the device prevents any access to the SE from the DH because it thinks the field is still present. Bug: 7386840 Change-Id: I87b681124078fe69c0244efd7b14ebe3ffd1c161
* am 547b58f4: Fix tag not deactivating to sleep during reconnect.Evan Chu2012-10-161-8/+9
|\ | | | | | | | | * commit '547b58f41866671e0028ed6f395b34e271ce81b1': Fix tag not deactivating to sleep during reconnect.
| * Fix tag not deactivating to sleep during reconnect.Evan Chu2012-10-161-8/+9
| | | | | | | | | | | | | | | | | | | | | | During reconnect, the JNI deactivates the tag to sleep mode and re-selects it. Sometimes when the tag leaves the RF field, it deactivates to idle instead of sleep; causing subsequent select to fail. Author: Mark Gorodetzky Bug: 7357299 Change-Id: Id774d0bc3b8e2cbcea93cd2ee061ffecfa821a1e
* | am a15b24e9: Check for invalid handle before configuring secure element.Evan Chu2012-10-162-1/+5
|\ \ | |/ | | | | | | * commit 'a15b24e9e405b65b7523d8c80173b1c0d71e093e': Check for invalid handle before configuring secure element.
| * Check for invalid handle before configuring secure element.Evan Chu2012-10-162-1/+5
| | | | | | | | | | | | | | | | | | | | If handle is invalid, don't adjust secure element's listening parameter. This prevents a warning message from stack. Use LLCP_MAX_MIU to prevent a warning message from stack. Bug: 7357666 Change-Id: I79af30f7d3db1d597b46d8cf43991c9157359e10
* | Don't hold a timed wakelock.Martijn Coenen2012-10-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | We used to acquire a timed wakelock when either resuming or suspending. We don't want to take a timed wakelock when suspending, since we want to suspend asap, but also don't want to underlock the wakelock. Instead of taking a timed wakelock, just abort the process in case the NFC controller hangs. Bug: 7341879 Change-Id: Ibd2f468264f60a39db3cb271a6f05c50dfb559bf
* | am a949c743: Fast-fail SE open if it\'s activated in listen mode.Martijn Coenen2012-10-116-17/+227
|\ \ | |/ | | | | | | * commit 'a949c74321b17f8ef1c93692064969f60815c7e4': Fast-fail SE open if it's activated in listen mode.
| * Fast-fail SE open if it's activated in listen mode.Martijn Coenen2012-10-116-17/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users of the NFC-extras API usually want to talk to the SE once it has completed a transaction. The hard part is knowing when it is safe to connect to the SE, as it will break the connection to any reader. And when relinquishing the connection to the SE, the reader may find the device again and process another transaction. This patch adds the following two conditions for allowing to open the SE from the DH: 1) The SE may not be activated in listen mode 2) The RF field must have been off for at least 50 ms Bug: 7275484 Change-Id: Ibde32a8e2aef045c17ab76ef08c72f96edfedaef
| * Use RF_ACTIVATE/DEACTIVATE to generate RF events. (DO NOT MERGE)Paul Chaisson2012-10-111-1/+44
| | | | | | | | | | | | | | | | Create the RF Events for SE transactions based on RF activations (listen mode and ISO-DEP only). Bug: 7276275 Change-Id: Ibea0f64ba82ed31a7c582f6a44eb15abf25dda1c
* | am accbb8c9: Don\'t return target lost in case of NACK for T2T.Martijn Coenen2012-10-091-14/+12
|\ \ | |/ | | | | | | * commit 'accbb8c908d764c5f0b8030480f3e84f0f319ff5': Don't return target lost in case of NACK for T2T.
| * Don't return target lost in case of NACK for T2T.Martijn Coenen2012-10-091-14/+12
| | | | | | | | | | | | | | | | | | Causes applications such as TagInfo to report the tag as being lost. Also fixed a small memory leak triggered in this case. Bug: 7294613 Change-Id: I260e02896e534b23de5c7e0278609e27a9a20e7f
* | Set EE wipe APDUs for NCI stack.Martijn Coenen2012-10-081-1/+13
| | | | | | | | | | | | | | | | | | | | | | The wipe APDUs are used to lock the Secure Element state whenever an app using the SE is deinstalled, when all userdata is removed, or on first boot of the device. This sequence is identical for both the NXP and NCI implementations. Bug: 7312675 Change-Id: I746580985bc986ac159e0d294823f0dbe6d3404f
* | am 10dd44d3: NFA_HciAddStaticPipe()\'s parameters changedEvan Chu2012-10-051-2/+6
|\ \ | |/ | | | | | | * commit '10dd44d39824fbccd8bf26871cb118b1475eb2f1': NFA_HciAddStaticPipe()'s parameters changed
| * NFA_HciAddStaticPipe()'s parameters changedEvan Chu2012-10-041-2/+6
| | | | | | | | | | Bug: 7282057 Change-Id: Ic877f67654906e21f1942adf05751943e3d6cb01
* | Use RF_ACTIVATE/DEACTIVATE to generate RF events.Paul Chaisson2012-10-041-1/+44
| | | | | | | | | | | | | | | | Create the RF Events for SE transactions based on RF activations (listen mode and ISO-DEP only). Change-Id: Ie8317292b0de05e1a406ca84c48491738acfe271 Bug: 7276275
* | Merge "NfcAdapterExtras: add driver name." into jb-mr1-devmike wakerly2012-10-031-0/+7
|\ \ | |/ |/|
| * NfcAdapterExtras: add driver name.mike wakerly2012-10-031-0/+7
| | | | | | | | | | Bug: 7276355 Change-Id: If2732afd542a68dc440308dae9eb76eb7ff31e25
* | Fix locking around power state.Evan Chu2012-10-033-10/+34
|/ | | | | | | Protect state against multi-threaded access. Bug: 7281263 Change-Id: I12735c725b6abf956cb7143f25397653839bc6e4
* Substitute empty select for configurable AID.Paul Chaisson2012-10-022-1/+47
| | | | | | | | Workaround some SEs that do not support interpreting an empty select as a select of the card manager. Bug: 7198430 Change-Id: Icce0e793ca6f03d5c2271812859b04417d2708e8
* Merge "Fix native crash during RF field notifications." into jb-broadcom-nfcMartijn Coenen2012-10-011-1/+1
|\
| * Fix native crash during RF field notifications.Martijn Coenen2012-10-011-1/+1
| | | | | | | | | | Bug: 7264008 Change-Id: I2647b0c6adf8f95e21d9f789c411742aef19c5ad
* | Power up the NFCC when DH wants to talk to the SE.Paul Chaisson2012-09-305-53/+73
| | | | | | | | | | | | | | | | We need to allow usecases were the DH wants to talk to the SE even if the screen is off. Bug: 7257431 Change-Id: Iad66ef29757985b7aab5f0748fbf7589b3777bc3
* | Do not activate a tag during NFC disable.Evan Chu2012-09-302-3/+9
|/ | | | | | | Could cause RF field to remain on. Bug: 7164846 Change-Id: I82efc29b96c7129465fea5354fa5484da31618a6
* Disable all RF activity when DH connects to SE.Martijn Coenen2012-09-262-1/+13
| | | | | | | | | | | | | | If we leave RF polling/listen enabled while talking to the SE from the DH, there is corruption on frames sent out over SWP. To resolve this, disable discovery (both poll and listen) when the SE is route to the DH. This also makes the behavior identical to that of the PN65N devices, which don't allow any RF activity when the SE is routed to the host. Bug: 7004303 Change-Id: I05ad55a6f75b9f346feaf20dccefc23919ff538f
* Enable/disable RF discovery only when needed.Martijn Coenen2012-09-261-4/+11
| | | | | | | Fixes coming out of suspend with EE routing enabled. Bug: 7233312 Change-Id: Ibbb9d7c26c2152fbac543d84d3306fc0ed50272d
* Tell secure element to warm-reset when closing pipe to DH.Evan Chu2012-09-252-1/+36
| | | | | | | | | | | Set HCI registry to cause Oberthur secure element to perform warm-reset. We use this to close any applets that the DH may have opened during communication to the SE. This feature is Oberthur-specific. Bug: 7163680 Change-Id: Id0589b5b41bbea1df9b8dbd73abd5a112f773916
* Fix NXP PN544 controller interop with Broadcom controllerEvan Chu2012-09-256-56/+463
| | | | | | | | When NDEF detection times out, stop polling temporarily. Let NXP PN544 controller poll and activate the NFC-DEP interface. Bug: 6986507 Change-Id: Iaa3194e4dbc4b9d2c16aaeb360a7f15dfd82c38a
* Don't try to set low-power mode if NFA_enable fails.Evan Chu2012-09-251-1/+2
| | | | | | | Would otherwise cause stack hang. Bug: 7214014 Change-Id: I5a5373f389b06b873cee1c1fb694502d7ad598b3
* Don't print error for resetting SE route.Martijn Coenen2012-09-201-1/+1
| | | | | Bug: 7113095 Change-Id: Iaa2e2b05244ec10392c98aa5dd0d5ee84e62e39f
* Grant licenseEvan Chu2012-09-201-0/+50
| | | | | Bug: 7125646 Change-Id: If700eb3cdd85e9ee08701d2dd8971ce2500a834d
* copyright by The Android Open Source ProjectEvan Chu2012-09-1931-263/+425
| | | | | Bug: 7125646 Change-Id: I4de457f982857be315d65386f431d5eafcd8af02
* Fix locking in PeerToPeer.Martijn Coenen2012-09-184-255/+462
| | | | | | | | | | | | | | | | | | | | The PeerToPeer class had some serious multi-threading issues: - mServers / mClients simultaneously being accessed by different threads - P2pServer / P2pClient objects being deleted while still being used by other threads - Race conditions where we could go to sleep on a condition variable without ever waking up. This fixes most of the issues by: - Properly locking all access to mServers / mClients - Using Android's sp mechanism to do ref counting on P2pServer/P2pClient/NfaConn TODO: - Fix races around the condition variables - those are very hard to hit, but we need them fixed anyway. Bug: 7089048 Change-Id: I08564c65cc40734086e517d6107e31f86c3b6adc
* Integrate NFC Hardware Abstraction Layer.Evan Chu2012-09-185-76/+6
| | | | | Bug: 7123942 Change-Id: I4fa153b80e1af2b00b326370e102f714cde4334b
* Merge "User proper error code during tag reading" into jb-broadcom-nfcMartijn Coenen2012-09-111-1/+1
|\
| * User proper error code during tag readingEvan Chu2012-09-111-1/+1
| | | | | | | | | | | | | | | | When reading a tag and it does not respond to a command, use taglost=1. It causes a TagLostException in the app. Bug: 7047415 Change-Id: I766849991441b82e5ad03d3031bc735fa5f9c27a
* | Merge "Use correct app name for NFA_HciDeregister()" into jb-broadcom-nfcMartijn Coenen2012-09-112-2/+4
|\ \ | |/
| * Use correct app name for NFA_HciDeregister()Evan Chu2012-09-112-2/+4
| | | | | | | | | | | | | | The "app name" parameters must match in HciDregister() and HciRegister() Change-Id: I43010268bb4c0ee7cdc7c1440346a6dedc230a58
* | Fix NFC low-power modes.Evan Chu2012-09-071-11/+24
|/ | | | | | | | | | | At the end of nfcManager_doInitialize(), enter low-power mode. This logic is used after boot and before the user unlocks the screen. If the user does not unlock the screen, the phone stays in low-power mode. Additionally, only power off the chip if discovery is disabled AND the SE is not selected. Change-Id: I2bd2effce34b5dc586ad484c1da2ae86da49f0c1
* Use NFA_DM_DISC_DURATION_POLL from config file.Paul Chaisson2012-09-071-0/+4
| | | | | | | Use the poll duration ("NFA_DM_DISC_DURATION_POLL") from the conf file if one is configured. Change-Id: If17d402cbe8505b096a168640f99b88f7e3b6e48
* Remove old NPP->SNEP redirect code.Martijn Coenen2012-09-062-451/+4
| | | | | | | | | This code was used when Android did not support SNEP natively yet. The current Android behavior is to automatically try SNEP first, then fall back to NPP. Change-Id: Ifb1df3a5439cc1a7b939b4ae1dc70135d9c63a25
* Correct spelling.Evan Chu2012-09-062-4/+4
| | | | Change-Id: Ie747c06a0a5161ad5479f93cbc56e482ed7da33c
* correctly handle P2P congestion eventEvan Chu2012-09-061-10/+15
| | | | | | Correctly handle NFA_P2P_CONGEST_EVT to prevent race condition. Change-Id: If255ade96867d45b2a7cff1cb3d6e4cbc2d883d3
* handle NACK, ACK for Mifare UltralightEvan Chu2012-09-063-1/+59
| | | | | | | | BLTH01652900: During trasceive operation for Mifare Ultralight, handle NACK and ACK responses properly Bug: 7047415 Change-Id: I778a2bbbcd3fff47b0da73ec37d76bf81708d931
* Remove "brcm" in namesEvan Chu2012-09-068-63/+62
| | | | | | BLTH01642677. Remove "brcm" in names. Change-Id: Ic3a08abfeb2808d2a0b01402a76d9864b099ef49
* Upgrade to stack NFA_MI_1.03.36Evan Chu2012-08-312-9/+13
| | | | Change-Id: I79510a45e8a552626f0473000e23d0fc6888ee33
* Create JavaClassConstants.h to store some global namesEvan Chu2012-08-2811-33/+48
| | | | | | Create JavaClassConstants.h to store some global names Change-Id: I918d9e8f6db646f637cddbebbc2c4e5c5495623d