summaryrefslogtreecommitdiffstats
path: root/jni
Commit message (Collapse)AuthorAgeFilesLines
* Fix locking around download.Martijn Coenen2012-03-211-8/+14
| | | | | | | Regression from an earlier patch that refactored the download code. Bug: 6205363 Change-Id: I5ec23f4ee7ead5802cc6856a05cd0167dcc8f611
* Support for setting p2p modes from javaland and some cleanup.Martijn Coenen2012-03-022-162/+86
| | | | | | Removed code-duplication, fixed some warnings. Change-Id: I5b7a2986e3836d6689b677bf80cb93421bfa821e
* am 962460d1: am cd7cbe30: Merge "Remove a warning of mismatch arguments"Jean-Baptiste Queru2012-02-151-1/+1
|\ | | | | | | | | * commit '962460d13b4bc4563ae381848dd3fc373c9d1a3c': Remove a warning of mismatch arguments
| * Remove a warning of mismatch argumentsChih-Wei Huang2012-02-141-1/+1
| | | | | | | | | | | | | | | | The fix removes the warning: packages/apps/Nfc/jni/com_android_nfc_NativeNfcManager.cpp:286: warning: too few arguments for format Change-Id: I81c61055f675890ea2e8be5f417f83df48621cff
* | Use a buffer in connectionless sockets.Martijn Coenen2012-01-302-2/+13
| | | | | | | | Change-Id: I2199dac0a342e553e66bdf95fdfcfd00ef6816c3
* | Fix advertised well-known services.Martijn Coenen2012-01-271-1/+3
| | | | | | | | | | | | | | We only indicated (the mandatory) link management service, but should indicate SDP and SNEP as well. Change-Id: I8a232fc6f74076d858e082145ebf18313de354d3
* | LLCP 1.1 support.Martijn Coenen2012-01-272-28/+51
| | | | | | | | | | | | | | | | | | | | - Allow servicename for connectionless sockets; - Pass in servicename in Bind() for both types; - EchoServer: allow MIU=128 again since ATR_RES fix was merged in libnfc-nxp - EchoServer: fix reading from incorrect offset. Change-Id: Ie77fe5b46e7a17435e6261c8b7400dcca4d3784a
* | LLCP echo server implementation.Martijn Coenen2012-01-201-4/+0
| | | | | | | | | | | | | | | | | | | | Can be used to test the Android LLCP stack with nfcpy. Disabled by default. Also fixed unnecessary JNI release call causing warnings in the logs. Change-Id: Iaed159e23dadc1601be2df2aadbe1d9c54c50615
* | Bring LLCP connectionless sockets back to life.Martijn Coenen2012-01-131-2/+2
| | | | | | | | | | | | Useful for testing the connectionless part of the LLCP stack. Change-Id: I76a7962526ec1e6ff463c938431229f89c545824
* | Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-069-158/+158
| | | | | | | | | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: If3f714c482c26a9b90cae43dbab6e4ee7f46dcb9
* | Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-052-17/+17
| | | | | | | | | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: Ibefef5fe8213c339fa584bffd9cf72658277f552
* | Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGESteve Block2012-01-041-4/+4
| | | | | | | | | | | | | | See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: I22fac4374807db8284f90fc8246a25dbeaec5e2f
* | Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-036-51/+51
| | | | | | | | | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: Ie4ce01d556684684b2e3ccb5c2fd65307ec11960
* | Merge "Always search for p2p target in discovery list."Martijn Coenen2011-12-151-29/+37
|\ \
| * | Always search for p2p target in discovery list.Martijn Coenen2011-12-151-29/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previous code always selected the first target, which adds an implicent dependency on libnfc to always put p2p first in the list. Make our preference for p2p explicit by searching the list for p2p targets. If no p2p target found, connect the first target as we did before. Change-Id: I2be95e3d0a7f7d96aa4ecf5d229a74b98e9e3e61
* | | Nfc: s/NFC JNI/NFCJNI/ in jni log tag.mike wakerly2011-12-141-1/+1
|/ / | | | | | | | | | | | | This has annoyed me forever (adb filters don't seem to work with spaces; greppability suffers). Would it break anything? Change-Id: I9a5d9e0dc237582db25f73ea72a56a5ba447b199
* | LOG -> ALOGNick Pelly2011-12-121-1/+1
| | | | | | | | Change-Id: I03eac9d3a1c9fea5e90487415391114b454fd5ff
* | am 985dcef8: Fix Beam&Tag failures after opening NFC-EE.Nick Pelly2011-12-071-22/+23
|\ \ | |/ | | | | | | * commit '985dcef867fcdb1afaca0fc478ec46dacf22b654': Fix Beam&Tag failures after opening NFC-EE.
| * Fix Beam&Tag failures after opening NFC-EE.Nick Pelly2011-12-071-22/+23
| | | | | | | | | | | | | | | | | | | | | | An earlier MR1 checkin stopped re-registering the remote device notification callback with libnfc on start_discovery. This causes a regression since opening the NFC-EE will change the callback. So Tag&Beam notifications end up going to the secure element callback - causing crashes or missed tags. Bug: 5725521 Change-Id: Idddba26b7babae095c124fda44e5b1da37549acd
* | am 3a675100: Merge "Fix NdefFormatable not showing up for NfcA ↵Martijn Coenen2011-11-281-64/+38
|\ \ | |/ | | | | | | | | | | technologies." into ics-mr1 * commit '3a6751007b70265fc69019f59f308246cad76157': Fix NdefFormatable not showing up for NfcA technologies.
| * Merge "Fix NdefFormatable not showing up for NfcA technologies." into ics-mr1Martijn Coenen2011-11-281-64/+38
| |\
| | * Fix NdefFormatable not showing up for NfcA technologies.Martijn Coenen2011-11-281-64/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression from a patch applied long ago: the NfcA technology used to have its higher-level type (Mifare / 4A) associated with it, and the code that determined formatable used this. The patch associated NfcA technology only with the 3A libnfc type, causing the format check to return false for all of these types. Change-Id: Idc02873de447b6d8121bff02af795a6a7f5058cf
* | | am 078e8368: Merge "Set up DISCOVERY and SE notification callbacks at NFC ↵Nick Pelly2011-11-171-62/+69
|\ \ \ | |/ / | | | | | | | | | | | | | | | init." into ics-mr1 * commit '078e8368a229482e3e835bb51b53a2ad649187d0': Set up DISCOVERY and SE notification callbacks at NFC init.
| * | Set up DISCOVERY and SE notification callbacks at NFC init.Nick Pelly2011-11-161-62/+69
| |/ | | | | | | | | | | | | | | Previously we only set these up on startDiscovery, so we could not receive SE events at the lock screen on first boot. Bug: 5375005 Change-Id: I0ed75cd8ea52ea956708b4fa807c1fd91e4f78b6
* | Allow EEPROM settings override using properties.Martijn Coenen2011-11-111-3/+20
|/ | | | | | | | | | Usage: setprop debug.nfc.eeprom.9E74 B0 will write value 0xB0 to EEPROM address 0x9E74. Only effective after turning NFC off and back on again. Change-Id: I3572e3418122fcd7cd2d110498cd513e232202bd
* Get EEPROM settings from NFC HAL.Martijn Coenen2011-11-042-119/+30
| | | | | | | Also removed port configuration: libnfc retrieves it directly from the NFC HAL now. Change-Id: Ic57d20c3a8079aaaae3c129da189e8abf4e03dab
* EEPROM values for NFC FW 109.11Martijn Coenen2011-10-251-3/+8
| | | | | | | | | Enable hybrid polling with a ratio of 1 regular poll for every 4 low-power polls. Also, turn off the new EMD setting. Change-Id: I840d0538bf374fa1980bcfc4926d3d2e43a3ce4f
* Write NFC EEPROM setting for lower-power poll measurements to default.Martijn Coenen2011-10-251-43/+44
| | | | Change-Id: I7eb676a75786584f0ed6757d8179cd457f3ef4ee
* NFC: Enable guard host timeout.Martijn Coenen2011-10-211-3/+18
| | | | | | | Set to 255 ms, increase number of retries to 64. Add dump() interface to native library Change-Id: Ib3a32f70453f7f8b79ff89394410f56b4b9dd7a2
* NFC: enable low-power RF polling feature.Martijn Coenen2011-10-111-2/+2
| | | | | Bug: 5430205 Change-Id: I2b6581cb54f49693744bd8739856877dec19f933
* Manually port d77e05f7 from gingerbread:Jeff Hamilton2011-09-141-49/+202
| | | | | | | | | Patch to perform a download at NfcService boot time This patch permit, when NFC is off, to perform a download if the PN544 is not up to date Change-Id: Iaa01e218ccd1e4cb18ef77d58c18348823135b1e
* Merge "EEPROM setting for configuring NfcF polling, set RC=0."Martijn Coenen2011-09-011-2/+4
|\
| * EEPROM setting for configuring NfcF polling, set RC=0.Martijn Coenen2011-08-081-2/+4
| | | | | | | | | | | | This is required by [DIGITAL]. Change-Id: I47458e20141654b7083513ccbb3fe6ceea085212
* | Fix to support enable/disable Secure Element through event mechanismSunil Jogi2011-08-241-3/+3
| | | | | | | | | | | | | | | | When the API SE SetMode is called, using the NXP_EVT_SE_SWITCH_MODE event to enable/disable the card emulation. At NFC Init, SE is always set by default in Off mode. Change-Id: Ic692631a33169a6ed208a3d6d229497534edab3b
* | Fix GB<->ICS sharing.Martijn Coenen2011-08-191-1/+1
| | | | | | | | | | | | | | | | Should throw an IOException() whenever recv() failed. Also changed recv error return value to be -1, to be more in line with common sockets. Change-Id: If65fe9e22c76f0a4558a9a6dedc0662bac038ee8
* | Revert "Fix to support enable/disable Secure Element through event mechanism"Nick Pelly2011-08-181-5/+26
| | | | | | | | This reverts commit 9dcaaa08fe2ae563bfb792a091577b4b70be15b8.
* | Fix to support enable/disable Secure Element through event mechanismDaniel Tomas2011-08-161-26/+5
| | | | | | | | | | | | | | | | | | | | | | In that patch, when the API SetMode is called, we are now using the NXP_EVT_SE_SWITCH_MODE event to enable/disable the card emulation mode Change-Id: I7ddadc3b20ade7d2a951eb111fa4d1008fd15126 Conflicts: jni/com_android_nfc_NativeNfcManager.cpp
* | Fix memory corruption.Martijn Coenen2011-08-101-2/+10
| | | | | | | | | | | | | | | | In the error scenario, cb_data was freed and subsequently still accessed. Bug: 5067103 Change-Id: I3ca2910ef48d40f8c8beed612211457cb6140b7d
* | Fix NfcExecutionEnvironment.transceive() failures.Nick Pelly2011-08-091-2/+17
|/ | | | | | | | | | | | | | | | | An earlier change to add multiple protocol support for NfcA and IsoDep causes 3 technologies (NfcA, MifareClassic, IsoDep) to be enumerated on the Secure Element instead of 2 (MifareClassic, IsoDep). This caused a regression because com_android_nfc_jni_open_secure_element_notification_callback() always connected to the 2nd handle, without checking protocols. Fix is to walk the protocol list and look for IsoDep instead of hard-coding the index. For some reason IsoDep seems to be phNfc_eISO14443_A_PICC and not phNfc_eISO14443_4A_PICC in this code. Change-Id: If7471b494099a09cf6d0bf5e255da556f11570b1
* Merge "resolved conflicts for merge of 5057a591 to master"Nick Pelly2011-07-261-29/+34
|\
| * resolved conflicts for merge of 5057a591 to masterNick Pelly2011-07-261-29/+34
| |\ | | | | | | | | | | | | | | | While I was there, rework of NativeNfcTag.findAndReadNdef() Change-Id: I971403d880f281c8f64d2f9ed60756f6e692e9ae
| | * Patch to manage TARGET_LOST status in case of Multiple protocol tagDaniel Tomas2011-07-251-29/+34
| | | | | | | | | | | | | | | | | | Plumb status codes up through the stack. Change-Id: Id30e69fff3bb56082ab29d42f166cb12c3061857
* | | Merge "Improve DESFire check to determine NdefFormatable."Martijn Coenen2011-07-261-6/+19
|\ \ \ | |/ / |/| |
| * | Improve DESFire check to determine NdefFormatable.Martijn Coenen2011-07-261-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous code just checked for a response from the tag - but some tags will just generate an error-response to the (custom) DESFire getVersion command. These would be marked formatable incorrectly. Additionaly now the length of the response is checked, and the status bytes at the end of the response (which are fixed and well-known). Eventually this code should live in libnfc. Change-Id: Ib10cbc8f4e92977b66cf8353eb0a01b05c912c24
* | | Merge 3d644e80Jean-Baptiste Queru2011-07-264-3/+38
|\ \ \ | | |/ | |/| | | | Change-Id: I8391bb474ecfe80ea9e7f13178fbaccf2cc576e8
| * | Prevent SE from being opened while target is in field.Daniel Tomas2011-07-254-3/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes an issue where an attempt to open the SE while the NFC Controller is in initiator (reader/writer or P2P Initiator) mode would cause a strange error response, and all further attempts to open the SE fail. Change-Id: I6401f644c73a993433cb73fee2eff8c11ededa1d
* | | am e1e26c9d: am 7aedb9c2: Patch to enable the Card Emulation detection mechanismDaniel Tomas2011-07-251-1/+4
|\ \ \ | |/ / | | / | |/ |/| * commit 'e1e26c9d0f067b2e52bcbfc59a87eba489039fa2': Patch to enable the Card Emulation detection mechanism
| * Patch to enable the Card Emulation detection mechanismDaniel Tomas2011-07-191-1/+4
| | | | | | | | | | | | | | This patch permit to enable Card Emulation detection mechanism, via an EEPROM setting, to avoid any card emulation notification when two Nexus S are in front of each other. Change-Id: I200a2a1b3ce31863a1684cd0968cd0eec008885a
* | Support for getTimeout() (NFC service).Martijn Coenen2011-07-201-11/+57
| | | | | | | | | | Bug: 4492175 Change-Id: I289e40d1527e7b570e8fd46f9968094b92a31902
* | resolved conflicts for merge of 399a21b8 to masterKenny Root2011-07-151-1/+1
|\ \ | |/ | | | | Change-Id: Ia3f4e08598504039eca70aa95e7ddd590e903881