History log of /frameworks/base/core/java/android/nfc/NfcAdapter.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d86b8fea43ebb6e5c31691b44d8ceb0d8d3c9072 03-Jun-2017 Jeff Sharkey <jsharkey@android.com> Annotate @SystemApi with required permissions.

Most @SystemApi methods should be protected with system (or higher)
permissions, so annotate common methods with @RequiresPermission to
make automatic verification easier.

Verification is really only relevant when calling into system
services (where permissions checking can happen on the other side of
a Binder call), so annotate managers with the new @SystemService
annotation, which is now automatically documented.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api && make -j32 offline-sdk-docs
Bug: 62263906
Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
/frameworks/base/core/java/android/nfc/NfcAdapter.java
5832df526f2fe2804266c662def53b91e9cb62ca 17-May-2016 Martijn Coenen <maco@google.com> Merge "Adddress NFC API review comments." into nyc-dev am: 1fef88d8dc
am: 68b426a30d

* commit '68b426a30d964295360f32defc2b66e6b7247a93':
Adddress NFC API review comments.

Change-Id: I00acef221305c4cb7aea75c842c1a758cccfb953
6136730e3bf463f744d22d4d5a236d9183b9064e 17-May-2016 Martijn Coenen <maco@google.com> Adddress NFC API review comments.

Bug: 28775492
Change-Id: I01befba3435f0d882787fecabd3c1041fe7260d7
/frameworks/base/core/java/android/nfc/NfcAdapter.java
04141eac6bbcd6dc5c184f7a87226d2244cf5570 15-Apr-2016 Steve Elliott <steell@google.com> decouple HCE from FEATURE_NFC

Allows getting an instance of NfcAdapter through
NfcAdapter.getNfcAdapter on a device which has
FEATURE_NFC_HOST_CARD_EMULATION(_NFCF) but not FEATURE_NFC.

All non-HCE APIs will throw an UnsupportedOperationException if accessed
without FEATURE_NFC.

Bug: 24532713
Change-Id: I95c0309d8eea46f592b3c713541a3ed6e0f96aef
/frameworks/base/core/java/android/nfc/NfcAdapter.java
d55def89244f9c7be69559e48300734d3966e712 14-Apr-2016 Martijn Coenen <maco@google.com> Fix API review comments, add remove callback.

Bug: 28148561
Bug: 26426491
Change-Id: I5917ea5d8fe0d3195b407643ec271ab4eb8b30b7
/frameworks/base/core/java/android/nfc/NfcAdapter.java
115d2c189a46f535778d9dd0923f703ff2f888fe 16-Feb-2016 Jeff Sharkey <jsharkey@android.com> Add feature versions for devices and apps.

We're starting to see more instances of device features that will
increment separately from the SDK API level, such as camera HAL,
GPU capabilities, Bluetooth, and other hardware standards.

This change adds the ability for device features to specify a
version, which is defined to be backwards compatible. That is, apps
requesting an older version of a feature must continue working on
devices with a newer version of that same feature.

When a version is undefined, we assume the default version "0".

Bug: 27162500
Change-Id: If890bf3f3dbb715e8feb80e7059a0d65618482ea
/frameworks/base/core/java/android/nfc/NfcAdapter.java
e168012ff21408f8be85040bb4ac977061519f62 25-Jan-2016 Martijn Coenen <maco@google.com> Merge "Implementation of HCE for NFC-F."
c52adfe12469a1d1bcd5b7119b83363e094a7b84 22-Jan-2016 Yoshinobu Ito <Yoshinobu.Ito@jp.sony.com> Implementation of HCE for NFC-F.

This impementation includes HCE(Host-based Card Emulation) for NFC-F
which emulates NFC Forum Type 3 Tag on a smartphone.

Signed-off-by: Daisuke Ito <DaisukeE.Ito@jp.sony.com>
Yoshinobu Ito <Yoshinobu.Ito@jp.sony.com>

Change-Id: I1618a7fba801e0705ff3cc078206a1446b3dd56d
/frameworks/base/core/java/android/nfc/NfcAdapter.java
9498e8a8d2deb7b0a2e964d5d3c5d3b8747610e9 30-Nov-2015 Neil Fuller <nfuller@google.com> Fix @code escapes

The body of {@code} must not be HTML escaped. This is one of
several changes that fix the source in conjunction with a
doclava fix.

Bug: 25757239
(cherry-picked from commit 71fbb81b14958b80fe55738607740c6630e4e9da)

Change-Id: I19dafddc6501be6fee362c396ac5bbdc934ae39d
/frameworks/base/core/java/android/nfc/NfcAdapter.java
56a3e67433fe1d6649c7665d58e913e784a0ea1c 24-Sep-2014 Martijn Coenen <maco@google.com> Add hidden API to disable NFC (optional persist).

Bug: 17298769
Change-Id: I1fa59592a34f1207731dc75d2e548b3e614d94f5
/frameworks/base/core/java/android/nfc/NfcAdapter.java
9c4f400aac00b1cdc665bece0c1315fccaa86d8b 09-Sep-2014 Andres Morales <anmorales@google.com> Add hidden API for pausing and resuming NFC polling.

Bug:17401266
Change-Id: Icce34787fc89dc33445f6c36f40f669a8b9b2f92
/frameworks/base/core/java/android/nfc/NfcAdapter.java
b59d35c16d55dda03622b24d90ac57773086e1fd 19-Aug-2014 Andres Morales <anmorales@google.com> Remove old NFC unlock api

Bug: 16401635
Change-Id: I667d91c2346355ed0a2115644e6192f5f208e288
/frameworks/base/core/java/android/nfc/NfcAdapter.java
f9a97942e1b530cb87a8d7b28551889bc438a744 15-Aug-2014 Andres Morales <anmorales@google.com> Fix issue where unlock handlers are not properly updated

If an unlock handler already exists, we need to try
to update the tech mask for it. Don't permit unlock
handlers with no tech mask.

Bug: 17054331
Change-Id: I54a885d28bdd8ce41d8646d968621c7d6abc9387
/frameworks/base/core/java/android/nfc/NfcAdapter.java
11d2e53dc0d2682f66f8dcbd8f0ad52432cb4aa7 23-Jul-2014 Andres Morales <anmorales@google.com> NFC Unlock api changes

Bug: 16401635
Change-Id: I994bd80be40052c2f894199bb44ebbde40077f27
/frameworks/base/core/java/android/nfc/NfcAdapter.java
92b4b3c64ddbec9d10b631e03f0fbba225ca9057 30-Jul-2014 Andres Morales <anmorales@google.com> Revert "NFC Unlock api changes"

This reverts commit 9fef5fbcd6d47ef86823b3a2d82d34801f9be335.

Change-Id: Idabe1c2901e0e26d38f84583308f69804ab2c1c3
/frameworks/base/core/java/android/nfc/NfcAdapter.java
131197aa6e6b0ae91fefe4bb5f39fffb780997c5 23-Jul-2014 Andres Morales <anmorales@google.com> NFC Unlock api changes

Bug: 16401635
Change-Id: I138a9aa0bb156982b6c7656c51a1e2194776e4ed
/frameworks/base/core/java/android/nfc/NfcAdapter.java
29c2e3797a6c397fa7812bc4cf167a72dde28faa 29-Jul-2014 Martijn Coenen <maco@google.com> Make some NFC APIs @systemAPI.

Change-Id: I12e292563a517211e4fae7a1f64021758f396d1a
/frameworks/base/core/java/android/nfc/NfcAdapter.java
dbedb4cc0f6c64705c16396bdd34445dd8191cad 02-Jul-2014 Martijn Coenen <maco@google.com> Add new IPC for direct Beam invoke.

Used by BeamShareActivity when Beam is invoked
through the share menu. Also made these IPCs
one-way as they can run asynchronously.

Bug: 15939863
Change-Id: I7d048947c96c697e6b04bbda2ec3fbf28cccc29b
/frameworks/base/core/java/android/nfc/NfcAdapter.java
d8cf53f87d1416613aa34cfb28f5042033e3299c 20-Jun-2014 Andres Morales <anmorales@google.com> Make unlock api take String instead of int codes

int code method not exposed to third parties

Change-Id: I18ad0703be9d06664db3fd00a6435f789979fe73
/frameworks/base/core/java/android/nfc/NfcAdapter.java
3b33fd283c32a8fb707a23d25f3f3cf13e8b046f 20-May-2014 Andres Morales <anmorales@google.com> Framework changes to support NFC trustlet.

Adds a system-only ability to register for receiving
tags from NfcService at the lockscreen.

Change-Id: I4b50941031e8d1f40ebb6314211226e70a2ad187
/frameworks/base/core/java/android/nfc/NfcAdapter.java
62b25a5bf0750483f36ac79c88177ee2ab630f8e 20-May-2014 Andres Morales <anmorales@google.com> Revert "Adding INfcUnlockSettings and NfcUnlock interface class."

This will be re-added as a Trustlet in a subsequent CL.

This reverts commit 38a7ed05f8fed0aa81f7214d827875f9876ffbe1.

Change-Id: I5aa36df42a7751f165b4ef184e0cda57e5568b59
/frameworks/base/core/java/android/nfc/NfcAdapter.java
6924c4ef8db3ffd80b35f2b736b7ea9577148e9e 25-Feb-2014 Martijn Coenen <maco@google.com> Fix NFC docs breakage.

Change-Id: I680dc7974316c77cb1835b5a81f30e6961ba3c49
/frameworks/base/core/java/android/nfc/NfcAdapter.java
7fe9fa163ccd2ec34cbf533be4422aa66356431f 30-Jan-2014 Martijn Coenen <maco@google.com> Add an API to manually invoke Android Beam.

Activities can call NfcAdapter.invokeBeam() to
manually invoke the Beam animation. Any NFC tap
is then enough to complete the transaction.

Also, added NdefRecord convenience method for
creating Text records.

Bug: 5134061
Change-Id: Ia9df360d1d7e8451157c85a6d12f2a4eec924960
/frameworks/base/core/java/android/nfc/NfcAdapter.java
38a7ed05f8fed0aa81f7214d827875f9876ffbe1 15-Nov-2013 Andres Morales <anmorales@google.com> Adding INfcUnlockSettings and NfcUnlock interface class.

Change-Id: Ie55a5d4bb58c2944952fc84cce32d3573a3a1a22
/frameworks/base/core/java/android/nfc/NfcAdapter.java
b38ad76a829f9bdbc27e86647de31a5ad19f117a 17-Oct-2013 Scott Main <smain@google.com> additional javadoc for NfcAdapter.ReaderCallback

Change-Id: I3cad8b43d53992bb3d53920abb510456ee72afb5
/frameworks/base/core/java/android/nfc/NfcAdapter.java
b523bfa64d9304ef22d563f81defa48b047c623a 12-Sep-2013 Martijn Coenen <maco@google.com> Rename FLAG_READER_NFC_KOVIO to FLAG_READER_NFC_BARCODE.

Bug: 10722206
Change-Id: I8b672cd7b9015e1ec88af96ef1fd0774d20b8d17
/frameworks/base/core/java/android/nfc/NfcAdapter.java
5b1e032ea7c06ab11d778264dd950009fcb93cc5 03-Sep-2013 Martijn Coenen <maco@google.com> Reader mode NFC API: move to callback model.

Using intents for reader mode doesn't work well for 2 reasons:
1) Intents are used to resolve, but in reader mode we already
know where to resolve to. Additionally, dispatching an intent
causes additional latency.
2) Using intents with foreground dispatch was tricky; for every
call to onNewIntent() with a new tag, there was a call to
onPause(), which effectively disabled reader mode again,
causing a discovery loop.

Instead, let the app register a callback, and call that when
we discover a new tag. Also, add new flag to disable platform
sounds, and to change the presence check delay.

Bug: 10360259
Change-Id: I8373543d6cf2f7ca73c9b3e42bb8b51e3ac48cac
/frameworks/base/core/java/android/nfc/NfcAdapter.java
c20ed2ff125fd23bed25df8172bf24db84c5a352 27-Aug-2013 Martijn Coenen <maco@google.com> Add NFC reader-mode API.

Allows applications to temporarily force the NFC controller
to only do tag discovery. This will allow Android applications
to read and interact with devices that employ HCE.

Bug: 10360259
Change-Id: I709ead9a26f8e6ae8582cc295d82bd896e7c5bba
/frameworks/base/core/java/android/nfc/NfcAdapter.java
a7397883de67d674970d91f86d46ccf637e5e543 31-Jul-2013 Martijn Coenen <maco@google.com> NFC: Host-based card emulation APIs.

- New INfcCardEmulation interface to allow apps to interface
with card emulation system.
- New BIND_NFC_SERVICE permission to prevent malicious apps
from binding to card emulation services.
- ApduServiceInfo is now in the framework.
- Added constants to Settings.Secure for storing defaults.
- Modified XML grammar a bit.

Change-Id: I56b3fa6b42eb5dc132c91c1386ab1e6bac779059
/frameworks/base/core/java/android/nfc/NfcAdapter.java
1fa2aff21bc4cb89a141828c2661530e6aa655dd 27-Feb-2013 Martijn Coenen <maco@google.com> Add direct NDEF push API.

Hidden for now. Also, modified callback that is called
from NfcService to pass all data in a single object
(BeamShareData). This avoids having to do multiple IPCs
at touch time.

Bug: 5134061
Change-Id: I235f608cef9935041b33b4b7a6980f109c15576c
/frameworks/base/core/java/android/nfc/NfcAdapter.java
e55fe4f3bb19992d8dcfc5cb19528f9a52cdcbb1 09-Jan-2013 Martijn Coenen <maco@google.com> Make NfcAdapter states public and fix build.

Change-Id: Idb2dd5e524cda5e3c03d4f2689266fa03be4ea13
/frameworks/base/core/java/android/nfc/NfcAdapter.java
4ba5eaf7f3b92656311f1ea1869d359729ba88e4 08-Jan-2013 Martijn Coenen <maco@google.com> Make NfcAdapter STATE_CHANGED intent action public.

Bug: 5141885
Change-Id: Ia357409a51fb45f1739bb37940fa746f94fa9056
/frameworks/base/core/java/android/nfc/NfcAdapter.java
97e0a1c6f3b7ab8f0796931182f0343dd7e73782 25-Jun-2012 Scott Main <smain@google.com> docs: clean up javadoc code snippets, unescaped entities

Change-Id: Idc21caceccaaa2cc11a6c46b453b6a9b26164f34
/frameworks/base/core/java/android/nfc/NfcAdapter.java
3b6ecf0ec1a6822577450908f46496cbe121202e 06-Jun-2012 Martijn Coenen <maco@google.com> Small NFC API docs addition.

Indicate that if the device does not support Bluetooth or WiFI,
calling the API is a no-op.

Bug: 6620788
Change-Id: Ib261e0e7855d0914e97803b3b808015b72f3a186
/frameworks/base/core/java/android/nfc/NfcAdapter.java
2c10311a01a9414a8efcedb267a45289a1617888 15-May-2012 Martijn Coenen <maco@google.com> NFC API documentation.

Added docs for beam Uri push and added some sanity checks on params.

Change-Id: I7c43b71c8a9ca4f742933d2d5b9473e0e2451dd3
/frameworks/base/core/java/android/nfc/NfcAdapter.java
3bba8d0457408421a6468f03bbb36e9ff32b81cf 10-Apr-2012 Sunil Jogi <sunil.jogi@nxp.com> Added NFC disable during phone shutdown

NFC was not disabled/deinitialized when phone shutdown. This patch
add NFC disable on phone shutdown which can complete any pending
NFC transaction before phone shutdown.

Change-Id: Id1e604be7c34adec8623a1e526d8ff99e18bf74b
/frameworks/base/core/java/android/nfc/NfcAdapter.java
20e8dd9f9e7cff63c83e36a1761538a04c224cc1 13-Apr-2012 Martijn Coenen <maco@google.com> Unhide new Beam push APIs.

Also added support for multiple Uris, removed mimeType argument.

Change-Id: Iad2c4d0e36a174080d7bc9c9c8ab893f90231d02
/frameworks/base/core/java/android/nfc/NfcAdapter.java
1d7e9062330a5a02247752de32a68ecbeba82783 04-Apr-2012 Nick Pelly <npelly@google.com> First cut at Bluetooth Beam

Change-Id: I37e5759515ff8779095b6d8adf5ad9c456fa8529
/frameworks/base/core/java/android/nfc/NfcAdapter.java
854e077555ce5b606c6a688dd5fd0594be02b9f8 02-Apr-2012 Martijn Coenen <maco@google.com> Document "disable default Beam" meta-data entry.

Change-Id: Icaa767ee37fcca08b1ff5143eb94cf8e66be840c
/frameworks/base/core/java/android/nfc/NfcAdapter.java
8ce7a27770735791b5c38e4128f4ab9cee86bc43 21-Mar-2012 Nick Pelly <npelly@google.com> Use Application#registerLifecycleEvents() instead of a Fragment for Beam.

Fragments don't work as desired if called after life-cycle events
such as onDestory() or onSaveInstanceState().

The new approach doesn't work after onDestroy() either, but we can more
easily detect this now. For pre-JB apps, we will log an error, and for
JB and onwards we will throw.

Update documentation to make these rules clear, and to encourage
the use of a single Activity per API call, and to make the call
in onCreate().

Bug: 5199662
Bug: 5994691
Bug: 6034901
Bug: 6125297

Change-Id: Ib0dde6abfa44cd56c7ddc13ba0ad0e83bbe30058
/frameworks/base/core/java/android/nfc/NfcAdapter.java
188cddb1d8c89749618401e371a7e7900cb58d6d 01-Feb-2012 Martijn Coenen <maco@google.com> Hidden API for setting p2p NFC modes.

Change-Id: I406bab36b441cf99b5b45f51701dbcbab588a9b0
/frameworks/base/core/java/android/nfc/NfcAdapter.java
1f5badc1cb08f10ddf4b09aaaf34060a23999a51 24-Jan-2012 Nick Pelly <npelly@google.com> Add NdefMessage.getByteLength(), and more minor fixes:

Remove NdefMessage from dispatch(). It's already in the Tag.
/*package*/ cleanup
Fix sitemap after removal of NFCDemo

Change-Id: Ie1f6d9ea98144aa97f56bb709a33f5d0ef916e8b
/frameworks/base/core/java/android/nfc/NfcAdapter.java
c97a552023c3c71079b39092e80c9b44f25a789b 05-Jan-2012 Nick Pelly <npelly@google.com> Improve NDEF API's

o Add NdefRecord.toMimeType()
Maps the record to a MIME type
o Add NdefRecord.toUri()
Maps the record to a URI
o Add hidden NfcAdapter.dispatch()
Helps test the dispatch path.
o Modify createMime(), createUri() and createExternal():
Do not try and strictly follow RFC requirements for URI or MIME content
types. This just leads to heartbreak - the RFC requirements are too strict.
For example RFC1341 forbids the use of '.' in a MIME type, however this is in
common use in types such as "application/vnd.companyname". I think the best
approach is to only remove 'obvious' whitespace issues, and to convert
uppercase to lowercase as per Android guidelines.

Change-Id: Id686f5f3b05b2dceafad48e1cfcbdb2b3890b854
/frameworks/base/core/java/android/nfc/NfcAdapter.java
2b072677538de979961b5bf527109fdab1713731 23-Dec-2011 Joe Fernandez <joefernandez@google.com> am 201469f5: am bb7f590a: Merge "docs: Add developer guide cross-references, Project ACRE, round 4" into ics-mr1

* commit '201469f54522436be79d4d6665721049bfc74320':
docs: Add developer guide cross-references, Project ACRE, round 4
3aef8e1d1b2f0b87d470bcccf37ba4ebb6560c45 20-Dec-2011 Joe Fernandez <joefernandez@google.com> docs: Add developer guide cross-references, Project ACRE, round 4

Change-Id: I1b43414aaec8ea217b39a0d780c80a25409d0991
/frameworks/base/core/java/android/nfc/NfcAdapter.java
a356bf1cd81614a94ef6c720998792480ade4c84 14-Dec-2011 Nick Pelly <npelly@google.com> Rewrite NDEF parsing in Java, clean-up API.

o Lots of documentation fixes.
o Add NdefMessage(NdefRecord ... records) ctor
o Add NdefRecord.createMime()
o Add NdefRecord.createExternal()
o Add toString(), equals() and hashCode() implementations
o Deprecate NdefRecord(byte[]) and NdefRecord.toByteArray()
o Remove framework dependency on libnfc_ndef.so
o Remove NfcAdapter.getDefaultAdapter(), its been deprecated a while

next step:
o Attempt to move NdefMessage -> Intent conversion into NDEF, and
make it CTS tested. This will ensure consistent NDEF -> Intent
mapping across all Android devices.

Change-Id: Ifed4910caa9a1d6bad32dbf0a507ab22bca35e22
/frameworks/base/core/java/android/nfc/NfcAdapter.java
cee040eb27b88d1d4daa544fbaafdf5c7dac6dbb 22-Nov-2011 Nick Pelly <npelly@google.com> Merge "Throw a nicer error message when using an invalid context to create Nfc"
b04cce0eb5917db436b7db39eb67c064df2e015a 22-Nov-2011 Nick Pelly <npelly@google.com> Throw a nicer error message when using an invalid context to create Nfc

This can happen when using getContext() instead of getTargetContext()
in an InstrumentationTestCase.

Bug: 5644274
Change-Id: I020a637c271e25bcf25ae2927fd878001d5fea0a
/frameworks/base/core/java/android/nfc/NfcAdapter.java
f955d057ddd232af4bd4a74075838dae298c7365 18-Nov-2011 Nick Pelly <npelly@google.com> am c6a0277b: am 63b7360e: Merge "Fix NPE on devices that don\'t have NFC." into ics-mr1

* commit 'c6a0277bca29359ec1aee123495065982d2eea7a':
Fix NPE on devices that don't have NFC.
a5193b24c1c944331f329eca1d4f85df3a024b1d 17-Nov-2011 Nick Pelly <npelly@google.com> Fix NPE on devices that don't have NFC.

We should return null instead of NPE.

Bug: 5622939
Change-Id: I802f4a99ea9f5e73453d5ea30da4e1d9fa279b9c
/frameworks/base/core/java/android/nfc/NfcAdapter.java
34059a912520e6c145f18373c4300e4a567da89d 11-Nov-2011 Nick Pelly <npelly@google.com> am 4780228f: am 48b651cb: Merge "Changes for access control." into ics-mr1

* commit '4780228fb2476304e29ddf9a118c460ac4eb96ee':
Changes for access control.
bb951c893973691554f49d2e725985125f866b27 08-Nov-2011 Jeff Hamilton <jham@android.com> Changes for access control.

The package name is now required when using the
NFC extras APIs so the context is stored away
and used to derive the package name to be sent
to the NfcService.

Bug: 4515759
Change-Id: I1a3aba3fc026e0090a914b0686fc4b8dec25b927
/frameworks/base/core/java/android/nfc/NfcAdapter.java
0946fe5be33eca9c728e5ad86869691f980590e2 10-Nov-2011 Martijn Coenen <maco@google.com> Revert "Remove deprecated (hidden) enableForegroundNdefPush API's." (DO NOT MERGE).

This reverts commit 562dfff65ac79590c0b7c50019cd3d107e8b4e0e. These API's are still used
by GMM in the version that ships with MR1, so we need them to keep Beam working for
GMM. Note that these APIs are hidden.

From version 5.13 onwards GMM will use the new API's.

Change-Id: I316a9c9b7d0052a14f6c1df70f2ed463bca61800
/frameworks/base/core/java/android/nfc/NfcAdapter.java
cccf01d3e270bbf53ae6601698109ac4ef461076 31-Oct-2011 Nick Pelly <npelly@google.com> API Change: add isNdefPushEnabled() & ACTION_NFC_SETTINGS.

Modify isNdefPushEnabled() semantics slightly - true only if isNfcEnabled && NDEF push enabled.

Fix up docs.

Change-Id: Icd2df9c636ecf2d8274851bbda423f2eae7bac5f
/frameworks/base/core/java/android/nfc/NfcAdapter.java
79425fd600e521f1eb4947c26ef631d3e1d29920 11-Oct-2011 Nick Pelly <npelly@google.com> Merge "Remove deprecated (and hidden) enableForegroundNdefPush callback API's."
2d68a6ba3c1354f363e5ee77448f163664bf47d9 27-Sep-2011 Scott Main <smain@google.com> docs: mix of BT and NFC javadoc updates
Add Health profile to various discussions about profiles
Add descriptions to NFC interfaces, tweak some desciptions, and fix some broken links

Change-Id: Ib89434c78a4ad60b4358dca9a6c335451d1c4125
/frameworks/base/core/java/android/nfc/NfcAdapter.java
562dfff65ac79590c0b7c50019cd3d107e8b4e0e 23-Sep-2011 Nick Pelly <npelly@google.com> Remove deprecated (and hidden) enableForegroundNdefPush callback API's.

This were just left in until youtube and maps pre-builts were updated.

Change-Id: I41d3ccb5c17f04be62c2ac854355fb6e66785176
/frameworks/base/core/java/android/nfc/NfcAdapter.java
82328bfd40008d85917cc01a1b2eb8eed1f23ec4 30-Aug-2011 Nick Pelly <npelly@google.com> NFC API updates.

o NfcAdapter.set*(): enforce at least one activity is provided at compile time.
o Unhide and update javadoc for some API's scheduled for ICS release.

Change-Id: I2bf4ea101442dcdeb359be26d3869f82e6e3748b
/frameworks/base/core/java/android/nfc/NfcAdapter.java
c84c89a6cacaf16c1ba41f57cc1aecdb150e85f9 23-Aug-2011 Nick Pelly <npelly@google.com> Improve NDEF push API

Introduce
setNdefPushMessage()
setNdefPushMessageCallback()
setNdefPushCompleteCallback()

Deprecate public API
enableForegroundNdefPush()
disableForegroundNdefPush()

Hide & Deprecate staged (public but never released) API
enableForegroundNdefPushCallback()

The new API's do not require the application to explicitly call
enable()/disable() in onPause()/onResume(), we use a Fragment behind
the scenes to manager this automatically.

NDEF Push can be disabled by using a null parameter, so each
enable()/disable() pair is collapsed to a single set() call.

Application code should now look something like:

public void onCreate() {
NfcAdapter adapter = NfcAdapter.getDefaultAdapter(this);
if (adapter != null) { // check that NFC is available on this device
adapter.setNdefPushMessage(myNdefMessage, this);
}
}

And that's it - no need to explicitly hook into onPause() and onResume() events.

Also - introduce a generic NfcEvent class that is provided as a parameter on
all NFC callbacks. Right now it just provides the NfcAdapter, but using
the wrapper classes allows us to add more fields later without changing
the callback signature. (i'm thinking Bluetooth).

Change-Id: I371dcb026b535b8199225c1262eca64ce644458a
/frameworks/base/core/java/android/nfc/NfcAdapter.java
8d32a01bd24b8a0d1a98f0581b3394a78fab8242 09-Aug-2011 Nick Pelly <npelly@google.com> Add NFC to airplane mode

NFC now observes airplanes mode, and is by default toggleable in airplane mode.

Change-Id: I5f19d35422c9eb1cffb0b5e0631b3f3c5eeaedcf
/frameworks/base/core/java/android/nfc/NfcAdapter.java
7a1ac5c0fbade27c08ae566771b628cd37ca5d77 21-Jul-2011 Martijn Coenen <maco@google.com> Hide new interface to fix build.

Change-Id: I9d408ad5ab64399af67b37a01be973634a194ae2
/frameworks/base/core/java/android/nfc/NfcAdapter.java
6d7489407995210f3f01690d1f0c8b970362d8ae 21-Jul-2011 Martijn Coenen <maco@google.com> Interfaces for enabling/disabling zero-click.

Change-Id: If7a90e67ca0f05cb18bea2861001e9cb6a14f4d6
/frameworks/base/core/java/android/nfc/NfcAdapter.java
a77258b98ec1aa7f605a93e4be59c3540c90c05c 21-Jul-2011 Jeff Hamilton <jham@android.com> Remove the hidden My Tag APIs.

Bug: 5048185
Change-Id: Iaf8a77e301fd378738db632e23674facd2c8fccc
/frameworks/base/core/java/android/nfc/NfcAdapter.java
01425365a85e605139f612502f68954cad869e5b 24-May-2011 Jason parks <jparks@google.com> Add public API to do NDEF push.

Change-Id: I102da9bbc6d78577a26fa03ee363a60abc389d6c
/frameworks/base/core/java/android/nfc/NfcAdapter.java
367f41f8f61126c2ab34a34cc676756a9fc23ac2 08-Mar-2011 Nick Pelly <npelly@google.com> Implement new NFC-EE API's as shared library (frameworks/base).

Change-Id: I45c4eaf59ec78167fc236fdd59676465a5e1bcb7
/frameworks/base/core/java/android/nfc/NfcAdapter.java
7bcd2c62ebfad640e8082c1dc700c9d8c57aba81 07-Jan-2011 daniel_tomas <daniel.tomas@nxp.com> New API added in NfcAdapter to enable/disable SE card emulation

Change-Id: Ia0c123873ba9265b45e847d1a30c1300de3c1346
/frameworks/base/core/java/android/nfc/NfcAdapter.java
58c9d4726ebf3165b0dbbcebb1130dfc5502bfe9 09-Feb-2011 Jeff Hamilton <jham@android.com> Merge "More documentation updates for NFC." into gingerbread
28319c0cec94977682db32b949628a8e4b8183dc 09-Feb-2011 Jeff Hamilton <jham@android.com> More documentation updates for NFC.

Change-Id: Ie134d4296ee12333e6647ce76126f9767ba1ba34
/frameworks/base/core/java/android/nfc/NfcAdapter.java
39cf3a445e507f219ecc8a476f6038f095d9d520 07-Feb-2011 Nick Pelly <npelly@google.com> Document NFC permissions.

Change-Id: Ib1b1625058c9c673692f3fbcb3546ec7c2d54a07
/frameworks/base/core/java/android/nfc/NfcAdapter.java
167d9e473f9240d452b25218625c326f31eebbaa 08-Feb-2011 Jeff Hamilton <jham@android.com> Improve the docs a bit for foreground dispatch.

Change-Id: I4179133a0956bc66a49201c20f1dd2d6d67874d2
/frameworks/base/core/java/android/nfc/NfcAdapter.java
74fe6c6b245ebe7d3b3d96962c32980d88dca4f5 03-Feb-2011 Nick Pelly <npelly@google.com> NFC documentation overhaul.

Change-Id: I45dca95a24b2d0327e080436fbcc7b1dad79de02
/frameworks/base/core/java/android/nfc/NfcAdapter.java
f003e26df96067b4b136f0859012cb7ec3ed930f 01-Feb-2011 Nick Pelly <npelly@google.com> Final final final Gingerbread MR API changes.

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
/frameworks/base/core/java/android/nfc/NfcAdapter.java
d88e9aa575eb3a9d20cdb0e8918d54993e1ce1e0 24-Jan-2011 Jeff Hamilton <jham@android.com> Use classnames instead of ints for NFC techs.

This makes the system more flexible and allows
adding new technology types without having to
update the API.

Change-Id: Iaee6b633965e501a70e8afc3f1d54d9d94a4d05a
/frameworks/base/core/java/android/nfc/NfcAdapter.java
9f20cd7ff26548e98d7b8412807720c7b340133d 23-Jan-2011 Jeff Hamilton <jham@android.com> Allow null filters for foreground dispatch to act as catch all.

Change-Id: Idf3d2e344a6e87035ccb5b533ed9e81fec596132
/frameworks/base/core/java/android/nfc/NfcAdapter.java
4e21e1d21a877cce4db5ec8c5786604cc10f2d7e 21-Jan-2011 Jeff Hamilton <jham@android.com> API changes for NFC.

Bug: 3366009
Change-Id: Ia28e03e1501421906b640b78d4c9a59a20e9c668
/frameworks/base/core/java/android/nfc/NfcAdapter.java
ce3224cda51f946871daa1e11e3976e25c59e6fa 17-Jan-2011 Jeff Hamilton <jham@android.com> Javadoc updates for NFC.

Change-Id: Ibd91829979576297599fbcc9eb8054924af1d527
/frameworks/base/core/java/android/nfc/NfcAdapter.java
33ff2405581271adf14ed4e45597a3b0b80a46ab 17-Jan-2011 Jeff Hamilton <jham@android.com> New APIs for NDEF Push Protocol.

The NPP is only usable by the foregorund
activity to prevent dispatching confusion
on the far end.

Change-Id: I08475a52083fd7f81b79b7fe2faf4e126121a809
/frameworks/base/core/java/android/nfc/NfcAdapter.java
b73203ab7e308b747819de2b2400afe971ef3bff 15-Jan-2011 Nick Pelly <npelly@google.com> Merge "Make sure service handles are live before passing to other objects." into gingerbread
52d3203ef69d4babbc4dd030a15c08c0b8d1d226 08-Jan-2011 Jeff Hamilton <jham@android.com> Add dispatching overrides for foreground apps.

Apps can register to override the default dispatching
but only when they're in the foreground.

Change-Id: I8e9a9254d3f79f097fb3c8c677d806043574ba4d
/frameworks/base/core/java/android/nfc/NfcAdapter.java
253c509cb0d36b39c3d878c0caf7f1eca194068a 13-Jan-2011 Nick Pelly <npelly@google.com> Make sure service handles are live before passing to other objects.

Change-Id: Ia3fa799b56463f313da0e84a50c4dc75d584eaca
/frameworks/base/core/java/android/nfc/NfcAdapter.java
200ca02fcaf2c24ea7716f65ed9a7bff8cddd975 07-Jan-2011 daniel_tomas <daniel.tomas@nxp.com> New Intent defined for RF ON/OFF events

Change-Id: Ie1bc056bd36eb999b4678c594a3edc801a0cf6a1
/frameworks/base/core/java/android/nfc/NfcAdapter.java
3dd6c458530476eccb33bc05c9c9cd83823bcf8d 10-Jan-2011 Nick Pelly <npelly@google.com> Remove attemptDeadServiceRecovery() from TagTechnology's.

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
/frameworks/base/core/java/android/nfc/NfcAdapter.java
b4003bf73e8150fa775506ae508cc55011442308 10-Jan-2011 Nick Pelly <npelly@google.com> Change Tag.getTechnology(NfcAdapter, int) to NfcAdapter.getTechnology(Tag, int)

The later feels less clumsy.

Change-Id: I50f29aef23d2993dcfd25f4c4f2cb0d77bdc0610
/frameworks/base/core/java/android/nfc/NfcAdapter.java
be372d6462605010910e771cef15d5adccd0a59e 23-Dec-2010 Jeff Hamilton <jham@android.com> Make the new NFC APIs public.

Change-Id: Ia0acd9759d67683eaf1dc199dc2cc55e16a98e77
/frameworks/base/core/java/android/nfc/NfcAdapter.java
641dd62155fd2eeddd93b2036154b13c05b70ba2 02-Dec-2010 Jeff Hamilton <jham@android.com> First pass at advanced NFC tag dispatching APIs and other cleanup.

Change-Id: I022fcd481274a2f68d93218026e77551cfae8cae
/frameworks/base/core/java/android/nfc/NfcAdapter.java
50b4d8f643f31b37e9872f562fb869059cf79c8a 08-Dec-2010 Nick Pelly <npelly@google.com> Make getSystemService(NFC_SERVICE) the NFC entry point.

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
/frameworks/base/core/java/android/nfc/NfcAdapter.java
9024564107b58955f7bd257cab6fc6dfcb2e5ec2 17-Nov-2010 Daniel Tomas <daniel.tomas@trusted-logic.com> Secure Element access implementation

Change-Id: I907e6771ecc5babe895115c3a49288fa2144a187
/frameworks/base/core/java/android/nfc/NfcAdapter.java
6be655c768a82716612c00fdd156254d8dc00f42 12-Nov-2010 Jeff Hamilton <jham@android.com> Rough first pass at the NFC technology API.

Change-Id: I903ad6bc124bf9a65af788dae45f55d58704ef7b
/frameworks/base/core/java/android/nfc/NfcAdapter.java
4934d3361edadb761d9c65fe8c2bf5b8d01e8121 11-Nov-2010 Jeff Hamilton <jham@android.com> Revert "Merge "Remove the My Tag feature." into gingerbread"

This reverts commit ef5694692f88bb91ed6ee1191b11a66ec594ff39, reversing
changes made to 65816a32ee2c2181895e3be636f3173a6e769f67.
/frameworks/base/core/java/android/nfc/NfcAdapter.java
575a6bbfe0300b670ce7403c9dddd1298ec49e20 03-Nov-2010 Jeff Hamilton <jham@android.com> Remove the My Tag feature.

Change-Id: I9167121da2fa66ddae23386d24fef7bcc64eb3f1
/frameworks/base/core/java/android/nfc/NfcAdapter.java
11b075e218b9921a953eeebe73fcd1a8a81f764b 28-Oct-2010 Nick Pelly <npelly@google.com> Hide some NFC API's.

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>
/frameworks/base/core/java/android/nfc/NfcAdapter.java
6d55e1342fc35c26dd97700ae791b34668266018 27-Oct-2010 Nick Pelly <npelly@google.com> Make best effort attempt to recover NFC service when it dies.

Retrieve the service again from ServiceManager on RemoteException.

Change-Id: Ie227b52019e7deafeab712af1addd6d957f7a8ee
Signed-off-by: Nick Pelly <npelly@google.com>
/frameworks/base/core/java/android/nfc/NfcAdapter.java
07f3bee2db8b6e93ebbf7222676bd9f468e85569 22-Oct-2010 Nick Pelly <npelly@google.com> Push Tag/NdefTag implementation details into the service.

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>
/frameworks/base/core/java/android/nfc/NfcAdapter.java
7ea5c45e8d89f59065f088d4e11cceeeed9d64d1 21-Oct-2010 Nick Pelly <npelly@google.com> NFC settings cleanup.

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>
/frameworks/base/core/java/android/nfc/NfcAdapter.java
afb082dba5232a45a7563e085f12284f7d5ffc1d 18-Oct-2010 Brad Fitzpatrick <bradfitz@android.com> NFC: broadcast intent constants for adapter state change

These are @hide for now. Sent by Iec9596a and used in Ief09a5a4

Bug: 3097279
Change-Id: Ie5dc05e33a98366fbe1767d19ac0253651abe862
/frameworks/base/core/java/android/nfc/NfcAdapter.java
fdf9086e24f4720ee9fbc852b980041f126aa3c2 18-Oct-2010 Nick Pelly <npelly@google.com> Prevent use of NFC api if device is not featurized for NFC.

Change-Id: I8724cb947223b7b60814d0be51e1122123ebb98a
Signed-off-by: Nick Pelly <npelly@google.com>
/frameworks/base/core/java/android/nfc/NfcAdapter.java
e47150e933e6f610546f57183477f324566e521e 18-Oct-2010 Nick Pelly <npelly@google.com> Fix up NFC permissions.

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>
/frameworks/base/core/java/android/nfc/NfcAdapter.java
a926540d5455a973dd8ca19c00c108620d9c68c2 15-Oct-2010 Sylvain Fonteneau <sylvain.fonteneau@trusted-logic.com> Implement methods introduced in draft #5 NFC API.

The API is implemented but still do not support muli-protocol tags.

Change-Id: I5cea3eec7b5b92e8e1106d4660e2400e4433e943
Signed-off-by: Nick Pelly <npelly@google.com>
/frameworks/base/core/java/android/nfc/NfcAdapter.java
c9f7890a203a013646650a695157277df81b6a17 15-Oct-2010 Scott Main <smain@google.com> Revise some javadocs for NFC; add package description

Change-Id: I60223e2ad24af98b3b16a74960365185096ae614
/frameworks/base/core/java/android/nfc/NfcAdapter.java
bc21fdefdfbeba1754c6cd339c7dd8e8f1d6fd48 14-Oct-2010 Nick Pelly <npelly@google.com> NFC: Move NFC service implementation out of system_server.

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>
/frameworks/base/core/java/android/nfc/NfcAdapter.java
590b73bc5b8e5f7b59bff1d9264a52388a5162e6 12-Oct-2010 Nick Pelly <npelly@google.com> NFC API revision round 2.

- 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>
/frameworks/base/core/java/android/nfc/NfcAdapter.java