| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: Ib2bc4d964ad925977ed58e466cc50ed3e89f5924
|
|
|
|
|
|
|
|
|
|
| |
IOException on close() can be useful to indicate that in-progress transactions
were canceled.
I also audited all of our tech classes to make sure every function that needs
to throw IOException does so.
Change-Id: Iaa9c43d79d59ff85772d5c3e4b4d57a6fa8df4cf
|
|
|
|
| |
Change-Id: I0168fb4a75f4dff88e347c0dfd1f0b39e2dba0d6
|
|
|
|
|
|
|
|
| |
o Some javadoc updates
o writeBlock -> writePages (Block means something else in NFC Forum).
o validate page offset
Change-Id: Icae54db3397d57aaa451caaa86d56e8ba82507f2
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This makes the system more flexible and allows
adding new technology types without having to
update the API.
Change-Id: Iaee6b633965e501a70e8afc3f1d54d9d94a4d05a
|
|/
|
|
|
|
|
|
|
|
|
| |
Also make sure they are non-negative.
This is not documented in Mifare Classic spec, but based on findings from NXP:
- Operand should be stored in little-endian format in the transceive buffer
- Tag ignores the sign bit on the operand, its effectively 31-bit unsigned
- Overflow and underflow generates an error.
Change-Id: Id3389b3894ded732c4b00d564ca53f5df651359e
|
|
|
|
|
|
|
|
|
|
| |
When generating a mock tag (after a NDEF exchange over LLCP), one of
the internal fields is set to null. This was causing NullPointerException
when being converted to a Parcel.
This is fixed by not including this field in the Parcel for mock tags.
Change-Id: I000e2faa54d71fd755ba7993e1e258743aad98fb
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Ib35f615142bda48a5e33888a09ebae2880624788
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove method overloading for combinations of sector+block addressing.
Instead provide methods that more closly match the raw commands, and more
efficient helpers to convert between blocks and sectors.
o fix off-by-one bug in getBlockCountInSector()
o add BLOCK_SIZE
o remove DESFIRE not operating in classic emulation (SAK 0x20)
o hide isEmulated(), there is no use case, and the info is available elsewhere
o getTotalBlockCount() -> getBlockCount()
o getBlockCount(int) -> getBlockCountInSector(int)
o introduce blockToSector() and sectorToBlock()
o remove authenticateBlock()
make it really clear that authentication is per sector, and reduce function
explosion. blockToSector() allows you to use authenticateSector...
o explicit authenticateSectorWithKeyA() / authenticateSectorWithKeyB()
get rid of magic boolean
o remove all (int sector, int block) parameters
always address by absolute block. this makes the API crystal clear, and
helps reduce function explosion
o validation of all sector and block indices
o dont & 0xff when converting to byte - its redundant
o Remove TYPE_OTHER. Mifare Classic types are well-known and stable.
Change-Id: I3c9f8254ff307f31b388b3d7592c862d5de6afa5
|
|/
|
|
| |
Change-Id: Idf3d2e344a6e87035ccb5b533ed9e81fec596132
|
|
|
|
|
| |
Bug: 3366009
Change-Id: Ia28e03e1501421906b640b78d4c9a59a20e9c668
|
|
|
|
|
|
| |
Update API for this and the previous commit.
Change-Id: I19275a5d00081bd0f00afea59a2b673344a32954
|
|
|
|
| |
Change-Id: Idf2c3253f7bc5f371133c4f18bfc2afde69c3010
|
|
|
|
| |
Change-Id: Ie3cac9bec04e80defae44ba02086ad0cdfd301a9
|
|
|
|
| |
Change-Id: I4fe5a6bf9fd42a28c9619e6e0bf11885bcc43f91
|
|
|
|
| |
Change-Id: Iadbaf5c29821eff78ad487b248af529febcdc4ce
|
|
|
|
|
|
| |
Added a method for setting the timeout on IsoDep transactions.
Change-Id: Ie627e7a826556e46295fefe69b9be83ebf911d93
|
|
|
|
| |
Change-Id: Ibd91829979576297599fbcc9eb8054924af1d527
|
|
|
|
|
|
|
|
| |
The NPP is only usable by the foregorund
activity to prevent dispatching confusion
on the far end.
Change-Id: I08475a52083fd7f81b79b7fe2faf4e126121a809
|
|\
| |
| |
| | |
into gingerbread
|
| |
| |
| |
| | |
Change-Id: Ia3fa799b56463f313da0e84a50c4dc75d584eaca
|
|/
|
|
|
|
|
| |
Apps can register to override the default dispatching
but only when they're in the foreground.
Change-Id: I8e9a9254d3f79f097fb3c8c677d806043574ba4d
|
|
|
|
| |
Change-Id: Ie1bc056bd36eb999b4678c594a3edc801a0cf6a1
|
|
|
|
|
|
|
|
| |
The method is needed since makeReadOnly() only works on T1T/T2T. Also removed
makeLowlevelReadonly(), since NFC forum does not allow setting the CC and the lock
bits separately.
Change-Id: I8e6d7c065b1f017ef07d878c41df05e1a8193f5a
|
|
|
|
|
|
|
|
|
|
|
|
| |
attemptDeadServiceRecovery() is a hack to recover from NfcService dying. It
should be a rare event, and is only needed in NfcAdapter which is a long-lived
object.
TagTechnology objects are transient, it is acceptable for them to go stale
when NFC service dies. Lets not complicate the code with recovery for a rare
event.
Change-Id: I101350e920b075c680eb4f250683f0a2bb878553
|
|
|
|
|
|
| |
The later feels less clumsy.
Change-Id: I50f29aef23d2993dcfd25f4c4f2cb0d77bdc0610
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BasicTagTechnology.transceive(byte[] raw) should work for most child classes,
except those that want to disable (raw) transceive.
Current plan is not to add transceiveMifare() etc - use explicit methods
instead.
Add package scoped BasicTagTechnology.transceive(byte[] rata, boolean raw)
as a helper to remove code duplication.
Change-Id: Iaea161022751c99058d291e2ed0f8c475d1c7282
|
|
|
|
| |
Change-Id: Ia0acd9759d67683eaf1dc199dc2cc55e16a98e77
|
|
|
|
| |
Change-Id: Iaa8f1b4dec5d626ffb17a33d71d2f92dd0d99636
|
|\
| |
| |
| | |
part)." into gingerbread
|
| |
| |
| |
| |
| |
| | |
Also fixed a missing assignment in NfcB technology.
Change-Id: Ic564a0a17a9638c11fa528056da40f74ed37e9e6
|
|\ \
| |/
| |
| | |
gingerbread
|
| |
| |
| |
| | |
Change-Id: I9d2c83411411fea4ef46bb7c30ebdbcd9ee3e7d8
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Change-Id: Idfa391dd9d4a401e1daa3dc90ca57e4a3d9e0fa3
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
It's a convenience method that can be implemented with transceive();
not really needed for now.
Change-Id: Idd855c85b15d97ae679d11d908834be3cb2741d8
|
|/
|
|
| |
Change-Id: I675993bc3aae6a741d63be458a0dfea240dd5316
|
|
|
|
|
|
|
|
|
| |
It's not easy to determine if this
is possible, so instead apps should
attempt a format and handle errors
in the format request.
Change-Id: I078a208b849e71ef3fb6b5970a9111ece4a2d201
|
|
|
|
|
|
|
|
|
|
| |
- It's useful to have accessors at block level, so apps don't really have to know
about the sector structure (and how many blocks there are in a sector).
- There's no way to tell whether a read/write/ didn't work because of auth
failure. The documentation should be changed to make this point clear.
- Added increment/decrement commands, for atomic increment/decrement of value blocks.
Change-Id: I590feacbcd1443f1be7a86ab046a5b1f33e2e04c
|
|
|
|
|
|
| |
Regression due to all the (re)connect changes.
Change-Id: I637618f63518965e893a5a59db61002271666fa4
|
|
|
|
| |
Change-Id: I8d9dfadb5911b2d11d1ba6dcf1381decbb8386ef
|
|
|
|
| |
Change-Id: Ib5432e7f6b6aaf6ec1cb06693592cb7c6440a6f8
|
|
|
|
|
|
|
| |
- The NfcService now allows for connecting to a specific technology;
- The "active" parts of technology classes may not be used at the same time.
Change-Id: Ibb569f51cc6da4f3e24df9d0850c6f49a022b0c2
|
|
|
|
|
|
|
|
| |
- Added getNdefCached() to return the message read at discovery time.
- Fixed format() to check ndef before doing the write:
libnfc actually requires a checkNdef to be done before writing.
Change-Id: I9b3108299c05539bdef92dd74f62f911fb5a16bf
|
|
|
|
| |
Change-Id: I022fcd481274a2f68d93218026e77551cfae8cae
|
|
|
|
|
|
| |
disconnect.
Change-Id: I8935e4aae452adeec472c0b3ff3c77f1400a264e
|