| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I102da9bbc6d78577a26fa03ee363a60abc389d6c
|
|
|
|
| |
Change-Id: I45c4eaf59ec78167fc236fdd59676465a5e1bcb7
|
|
|
|
| |
Change-Id: Ia0c123873ba9265b45e847d1a30c1300de3c1346
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Ie134d4296ee12333e6647ce76126f9767ba1ba34
|
|/
|
|
| |
Change-Id: Ib1b1625058c9c673692f3fbcb3546ec7c2d54a07
|
|
|
|
| |
Change-Id: I4179133a0956bc66a49201c20f1dd2d6d67874d2
|
|
|
|
| |
Change-Id: I45dca95a24b2d0327e080436fbcc7b1dad79de02
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is it. I promise.
ACTION_TECHNOLOGY_DISCOVERED -> ACTION_TECH_DISCOVERED
This was missed in our technology->tech rename.
Hide TagTechnology.reconnect()
This is used to reset any per-connection state in a tag, by reconnecting
to it. The first problem is that it belongs on Tag, not TagTechnology. The
second problem is that it may become redundant once we add Tag.rediscover()
which will also reconnect to the tag, and will also return a new Tag with
newly created technologies enumerated. And the third and most significant
problem is that you can already achieve the same result by just calling
close() followed by connect().
Hide Tag.createMockTag()
This API cannot be used reliably. First it requires using int[] for the
technology list, but those int constants are now hidden. Second it requires
knowledge of the extras parcel used to fill technology specific data - also
not public.
Introduce TagTechnology.isConnected()
Every child class already impelmented this, and given that connect() and
close() are defined on the interface, then isConnected() should be there
too.
Modify Ndef.getType to return a string (not int)
Allows more flexibility in adding new NDEF types. Current public strings are
org.nfcforum.ndef.type1
org.nfcforum.ndef.type2
org.nfcforum.ndef.type3
org.nfcforum.ndef.type4
com.nxp.ndef.mifareclassic
Add NdefFormatable.formatReadOnly()
This allows you to make the tag read-only at the same time as performing
format and write. It is important because we currently don't have any
public API to re-enumerate a tag technology list after making a tag
NDEF compatible, so you can't perform the format as a seperate step
without physically removing the tag from field and returning it.
Modify Readonly -> ReadOnly
Make Tag class final
Change-Id: Icf306aeb37b936ca3007e4868e99b6baceac4aff
|
|
|
|
|
|
|
|
| |
This makes the system more flexible and allows
adding new technology types without having to
update the API.
Change-Id: Iaee6b633965e501a70e8afc3f1d54d9d94a4d05a
|
|
|
|
| |
Change-Id: Idf3d2e344a6e87035ccb5b533ed9e81fec596132
|
|
|
|
|
| |
Bug: 3366009
Change-Id: Ia28e03e1501421906b640b78d4c9a59a20e9c668
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: Ia0acd9759d67683eaf1dc199dc2cc55e16a98e77
|
|
|
|
| |
Change-Id: I022fcd481274a2f68d93218026e77551cfae8cae
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This gives NFC service a handle to the application context.
Deprecate NfcAdapter.getDefaultAdapter(), it does not provide a context.
Using this method will print a warning, and will later throw an exception
if a method that requires a context is called. No 2.3 API's will fail, but
new API's that do require a context might fail.
Also add helper NfcAdapter.getDefaultAdapter(Context).
Change-Id: I9a6378de4ef4b61ad922f8d53e64e2a1a1d5d60c
|
|
|
|
| |
Change-Id: I907e6771ecc5babe895115c3a49288fa2144a187
|
|
|
|
| |
Change-Id: I903ad6bc124bf9a65af788dae45f55d58704ef7b
|
|
|
|
|
| |
This reverts commit ef5694692f88bb91ed6ee1191b11a66ec594ff39, reversing
changes made to 65816a32ee2c2181895e3be636f3173a6e769f67.
|
|
|
|
| |
Change-Id: I9167121da2fa66ddae23386d24fef7bcc64eb3f1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are leaving enough API so that you can see when any Tag is discovered,
get its ID, and get its NDEF messages.
But for advanced use - creating tag connections and writing messages - we have
2 problems. Firstly a lot of the code is untested
(RawTagConnection.transceive()), or in some cases known not to work
(NdefTagConnection.write()). Secondly, there is still debate about how to
best expose information about Tags.
The set of data/methods exposed for a Tag changes completely depending on the
tag technology. There may be multiple sets of technology implemented in a
single tag. Tag A may have technology X and Y, Tag B may have technology Y
and Z. Furthermore, some NFC controllers will be not be able to use all
technologies, and so Android Device 1 may see technology X and Y on Tag A but
Android device 2 may only see technology X. So we have a pretty challenging
set of constraints to work under, and we are not convinced the current Tag and
NdefTag class is the best approach going forwards.
The Tag application should be able to remain unbundled, since it just needs to
get incoming NDEF Messages.
Change-Id: Ic09f094f33794e10f8d730fffe011c9a5957e0ac
Signed-off-by: Nick Pelly <npelly@google.com>
|
|
|
|
|
|
|
| |
Retrieve the service again from ServiceManager on RemoteException.
Change-Id: Ie227b52019e7deafeab712af1addd6d957f7a8ee
Signed-off-by: Nick Pelly <npelly@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tag/NdefTag objects should just be simple data objects. Push the mapping of
internal tag type to public rawTarget/ndefTarget into Nfc Service.
This gives an oppurtunity to clean up some Tag/NdefTag API methods. Most
significantly, adding createMockTag() and createMockNdefTag() to help with
application testing.
There will probably be some more tweaking of the types/targets in
Tag/NdefTag to come, this commit makes that a lot easier.
Also:
- Introduce getActivationBytes() and getPollBytes(). These are just stubs
for NFC service to implement, we have feedback these are really important
to help identify NFC tags.
- Based on outside advice, remove 3B_PRIME (roll into 3B) and TOPAZ (roll
into 3A).
Change-Id: I3e6789c047f6ee5c298bf76c65e0885cf3c15d97
Signed-off-by: Nick Pelly <npelly@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove NFC settings from Settings.System. The NFC Service tracks them
internally using SharedPreference.
Revert back to enable()/disable()/isEnabled() - Tag discovery is the
only functionality NFC service performs right now so we don't need to
break it up more explicitly yet. enable/disable is the global NFC
on/off and later we'll add enableDiscovery(), enableTagEmulation(),
enableSecureElement() etc as needed.
Change-Id: Id5b23e89d4a29511835f509962842452075e56cb
Signed-off-by: Nick Pelly <npelly@google.com>
|
|
|
|
|
|
|
| |
These are @hide for now. Sent by Iec9596a and used in Ief09a5a4
Bug: 3097279
Change-Id: Ie5dc05e33a98366fbe1767d19ac0253651abe862
|
|
|
|
|
| |
Change-Id: I8724cb947223b7b60814d0be51e1122123ebb98a
Signed-off-by: Nick Pelly <npelly@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The initial (vendor) implementation had 4 perms, replace with 1.
Requires no permissions:
- Viewing UID, type of discovered tags and cards.
- Viewing the NDEF message contents of NDEF formatted tags and cards.
Requires android.permission.NFC
- Get/Set the local tag "MyTag"
- Creating or using a RawTagConnection (transceive())
- Creating or using a NdefTagConnection (write()/read())
Change-Id: I1b585c7d91738bed6261277061a48cf7c939482a
Signed-off-by: Nick Pelly <npelly@google.com>
|
|
|
|
|
|
|
| |
The API is implemented but still do not support muli-protocol tags.
Change-Id: I5cea3eec7b5b92e8e1106d4660e2400e4433e943
Signed-off-by: Nick Pelly <npelly@google.com>
|
|
|
|
| |
Change-Id: I60223e2ad24af98b3b16a74960365185096ae614
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NFC service is now an application service in packages/apps/Nfc.
NFC service is registered through ServiceManager.addService(), and the proxy
object NfcAdapter obtains a handle to it through ServiceManager.getService().
**Important** Had to add new symbols AID_NFC / NFC_UID / android.uid.nfc and
modify service_manager.c, Process.java and PackageManagerService.java in order
to force the com.android.nfc process to take a fixed uid, so that it can use
ServiceManager.addService().
Most of the JNI has moved to packages/apps/Nfc/jni. However NdefRecord and
NdefMessage require some in-process native code, so android_com_NdefMessage.cpp
and android_com_NdefRecord.cpp stay in frameworks/base/core/jni. They link to
a very small library libnfc_ndef.so that implements NDEF message parsing. This
has been added to core.mk so all devices (even without NFC hardware) can work
with NDEF data.
Bug: 3041259
Bug: 3097445
Change-Id: If8f00ce8f2053acfc9319ca366d4a9c02bd396e6
Signed-off-by: Nick Pelly <npelly@google.com>
|
|
- Add the second half of the new NFC API: NfcAdapter, Tag, NdefTag,
RawTagConnection, NdefTagConnection.
- Add implementations for all of the new NFC API.
Change-Id: I8da9fd1d2971ed2c8b76f2a93f207fa9e305b0f6
Signed-off-by: Nick Pelly <npelly@google.com>
|