Commit Graph

313 Commits

Author SHA1 Message Date
Ruchi Kandoi
2b527ac293 nfc: First chunked NDEF record of TNF doesn't contain the type field
Test: CTS test passes
Bug: 34943312
Change-Id: I08f37ee76810f642b35ae8bde05ef0e2eff921e0
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2017-03-06 13:10:20 -08:00
Ruchi Kandoi
2ed0b48abb nfc: Make NDEF validation stricter
- Check if the MB is not set for any record apart from the first one.
- If the record is chunked, first record must contain the type

Bug: 20722275
Test: Manual; write raw NDEF messages to a tag
Change-Id: I3e73fc5163bbcd8a1f23417e98f57b665f4f1fad
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2017-01-25 18:21:28 +00:00
Martijn Coenen
5832df526f Merge "Adddress NFC API review comments." into nyc-dev am: 1fef88d8dc
am: 68b426a30d

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

Change-Id: I00acef221305c4cb7aea75c842c1a758cccfb953
2016-05-17 18:39:50 +00:00
Martijn Coenen
68b426a30d Merge "Adddress NFC API review comments." into nyc-dev
am: 1fef88d8dc

* commit '1fef88d8dc8e25c71dc6b217202593e0f17b2105':
  Adddress NFC API review comments.

Change-Id: Ic36b9392b9475590ba8f75b352d05fba52b1ee02
2016-05-17 18:33:09 +00:00
Martijn Coenen
6136730e3b Adddress NFC API review comments.
Bug: 28775492
Change-Id: I01befba3435f0d882787fecabd3c1041fe7260d7
2016-05-17 09:09:15 +02:00
Martijn Coenen
2386212c05 Merge "Address API review comments." into nyc-dev am: 9a32929def
am: 1ffef9a239

* commit '1ffef9a239a67016607f62dfd023bf7fefb85370':
  Address API review comments.

Change-Id: I1f7da4c07988923b22bfab5689d48531cfb95aa1
2016-05-16 09:28:57 +00:00
Martijn Coenen
1ffef9a239 Merge "Address API review comments." into nyc-dev
am: 9a32929def

* commit '9a32929def3425c55a1bc96ea20346bf95357ae4':
  Address API review comments.

Change-Id: Ieb67cdc7846a06d84280e9ea9ca1cbe34dbff78f
2016-05-16 09:25:58 +00:00
Martijn Coenen
9a32929def Merge "Address API review comments." into nyc-dev 2016-05-16 09:18:36 +00:00
Steve Elliott
17750ae86e Merge "decouple HCE from FEATURE_NFC" into nyc-mr1-dev
am: b8eb2c5608

* commit 'b8eb2c5608b782d9bfc4a65625c353d79188a680':
  decouple HCE from FEATURE_NFC

Change-Id: If99fea76a8713bb4f77ffe38523501efc34b0882
2016-05-10 19:54:43 +00:00
Steve Elliott
04141eac6b 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
2016-05-09 21:19:03 +00:00
Martijn Coenen
1b65983aa9 Merge "Fix API review comments, add remove callback." into nyc-dev
am: d19191d

* commit 'd19191d4dcdefeebe0409d65740ee006c9e8a6a2':
  Fix API review comments, add remove callback.

Change-Id: I9ae9906df2f8ab3fdeb6c3e84a31ba66dcc7ca44
2016-04-28 05:43:17 +00:00
Martijn Coenen
d19191d4dc Merge "Fix API review comments, add remove callback." into nyc-dev 2016-04-28 05:34:05 +00:00
Martijn Coenen
007e0292bc Address API review comments.
Bug: 28148563
Change-Id: I0b66cf6954bb7d31e76d1e6445a656abd316ebcd
2016-04-28 00:39:33 +02:00
Tobias Thierer
28532d0026 frameworks/base: Avoid Long object allocations in Long.valueOf()
Replace usages where the Long is immediately unboxed or thrown
away with Long.parseLong().
In TaskRecord.java, I also fixed up similar uses of
{Boolean,Integer}.valueOf()

Tested: built frameworks/base successfully.

Bug: 28289401
(cherry picked from commit 4bd017d6a5)

Change-Id: Icfa4708946e774f4a1bacf185c3fd11a7087017e
2016-04-22 13:36:53 +01:00
Trevor Johns
59c9a93fc2 Merge changes from topic 'merge_docs_nyc-dev' into nyc-dev
* changes:
  Remove links to createAndInitializeUser() and createUser()
  Resolve merge conflicts of a5060ee to nyc-dev
2016-04-20 18:35:57 +00:00
Trevor Johns
682c24e228 Resolve merge conflicts of a5060ee to nyc-dev
This undoes the automerger skip which occured in
commit e740c84dc3 and
replays it as a standard (NOT -s ours) merge.

Change-Id: If5a47be26f73d6a0735c425cd66310a3e2a89086
2016-04-19 02:03:59 -07:00
Narayan Kamath
a09b4d2a61 Remove unnecessary allocation+unboxing of objects.
Transforming String->int can be done with 0 allocations
using Integer.parseInt.

bug: 28078871
Change-Id: I8d9f322d7154728849dde61ef282046032858d60
2016-04-18 09:55:59 +01:00
Martijn Coenen
d55def8924 Fix API review comments, add remove callback.
Bug: 28148561
Bug: 26426491
Change-Id: I5917ea5d8fe0d3195b407643ec271ab4eb8b30b7
2016-04-15 22:14:07 +02:00
Jeff Sharkey
115d2c189a 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
2016-02-15 17:45:42 -07:00
Martijn Coenen
6c89fa4988 Merge "Improve NFC-F transceive() docs." am: 1f4f7190a8
am: 21ab24f5c7

* commit '21ab24f5c7a1659981fab2764e406f51e9d3eada':
  Improve NFC-F transceive() docs.
2016-02-05 17:26:37 +00:00
Martijn Coenen
21ab24f5c7 Merge "Improve NFC-F transceive() docs."
am: 1f4f7190a8

* commit '1f4f7190a8fe6bd87fd9dd198cb711cb1a540354':
  Improve NFC-F transceive() docs.
2016-02-05 09:44:28 +00:00
Martijn Coenen
1f4f7190a8 Merge "Improve NFC-F transceive() docs." 2016-02-05 09:38:16 +00:00
Martijn Coenen
6711e02033 Improve NFC-F transceive() docs.
It wrongly said the SoD included the length;
put a sample frame in the docs to help devs.

Change-Id: I8ea74f37e7335f3e05f7df81fc303bf6195ac3cc
2016-02-05 10:26:16 +01:00
Martijn Coenen
f82ab8bea4 Merge "Implementation of HCE for NFC-F." am: e168012ff2
am: cf2f9d0966

* commit 'cf2f9d0966af01eb269b9ce6f2d08870647dd22f':
  Implementation of HCE for NFC-F.
2016-01-25 10:00:32 +00:00
Martijn Coenen
cf2f9d0966 Merge "Implementation of HCE for NFC-F."
am: e168012ff2

* commit 'e168012ff21408f8be85040bb4ac977061519f62':
  Implementation of HCE for NFC-F.
2016-01-25 09:56:20 +00:00
Martijn Coenen
e168012ff2 Merge "Implementation of HCE for NFC-F." 2016-01-25 09:48:43 +00:00
Yoshinobu Ito
c52adfe124 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
2016-01-22 18:14:18 +09:00
Martijn Coenen
3748600bad NFC: Allow apps to specify they're done with tag.
When an application is no longer interested in
communicating with a tag, but the tag is kept in
range of the device for a long amount of time, we
will burn a lot of power keeping the connection
to it alive.

Instead, allow the app to signal it's "done" with
the tag, which allows us to put the controller
in a low-power mode. This will save power in scenarios
such as an NFC tag embedded in a car dock or
wireless charging dock.

Bug: 26426491
Change-Id: I7a0149ede46e0c7610b06ed1776344b772677350
2016-01-18 14:53:28 -08:00
Neil Fuller
69c2907c63 Merge "Fix @code escapes"
am: b0d92f4717

* commit 'b0d92f4717af4e4736dc80b2a822dae8e5a52587':
  Fix @code escapes
2016-01-15 16:31:40 +00:00
Neil Fuller
9498e8a8d2 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 71fbb81b14)

Change-Id: I19dafddc6501be6fee362c396ac5bbdc934ae39d
2016-01-15 16:14:57 +00:00
Martijn Coenen
b325061b19 Merge "Clear calling identify b4 Beam callback." into mnc-dr1.5-dev am: 4bbd3c4819 am: c94df7c685
am: 68521a6825

* commit '68521a682524c53e6bfd883a3f41b4fe514c2d0c':
  Clear calling identify b4 Beam callback.
2015-12-23 00:33:26 -08:00
Martijn Coenen
24584f0b34 Clear calling identify b4 Beam callback.
Fixes AppOps crash, because it notices the calling
package is different from the calling UID.

Bug: 25492633
Change-Id: I55e2d975fd0a7ee94c4623efb3b19b1b54b72da2
2015-12-21 10:33:06 +00:00
Neil Fuller
71fbb81b14 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
Change-Id: Ib38a0fa2dd2a3d68e467f78a812071e763d7e881
2015-12-02 14:24:11 +00:00
Martijn Coenen
a1ec958829 Fix missing copyright headers.
Bug: 23868522
Change-Id: I37fb86e3a751fad363d70687d1b9bcd512bcd33e
2015-09-07 11:53:59 +02:00
Nicolas Prevot
2ee3beedb1 Merge "In NfcActivityManager, don't use UserHandle.CURRENT." into mnc-dev 2015-07-02 12:28:46 +00:00
Robert Schaub
a50979997c am e51d6d05: am fae35eed: Merge "docs: Changed link in Java source code comment to repair 404" into mnc-preview-docs
* commit 'e51d6d05e9334fce5d46909ea669027762c4c0a2':
  docs: Changed link in Java source code comment to repair 404
2015-07-01 17:12:31 +00:00
Nicolas Prevot
81b7b10864 In NfcActivityManager, don't use UserHandle.CURRENT.
In the work profile, UserHandle.CURRENT refers to the primary user.
We want to refer to the work profile itself.
So, using new UserHandle(UserHandle.myUserId()) instead.

BUG:21960385
Change-Id: I4d880ccf6926e437d674874295029b29278f3e12
2015-07-01 12:27:09 +01:00
Robert Schaub
e51d6d05e9 am fae35eed: Merge "docs: Changed link in Java source code comment to repair 404" into mnc-preview-docs
* commit 'fae35eed99d6bc87f3a864bdd16d951136a16cc7':
  docs: Changed link in Java source code comment to repair 404
2015-06-30 20:26:36 +00:00
Robert Schaub
f64c80a6cd docs: Changed link in Java source code comment to repair 404
Need to find out what developer is in charge of CardEmulation.java to include
in review.

Bug: 19950839

Change-Id: Ic30ebaf69e46a70a64c8a123b0f72abaff7d0b80
2015-06-30 12:41:58 -07:00
Martijn Coenen
706f23ddb9 Merge "Make peer LLCP version an int." into mnc-dev 2015-06-10 06:58:20 +00:00
Martijn Coenen
bdc34b8440 Make peer LLCP version an int.
And split major/minor.

Bug: 21343778
Change-Id: Ie9f0ecc9172849d3b088a0c1ce6d872b2f607919
2015-06-10 08:49:02 +02:00
Martijn Coenen
a2344eac37 Remove NFC CardEmulation dynamic resource APIs.
No longer needed.

Bug: 21343778
Change-Id: I5188c4bc819146861d346f3f4339f002b7173027
2015-06-05 10:45:50 +02:00
Martijn Coenen
8abf680e00 Add NFC APIs for dynamic resources.
For new Tap & Pay settings UX.

Change-Id: I55ff4e4d4a4b6d26c3c88d96431c4f14d0963323
2015-04-22 11:56:36 +02:00
Martijn Coenen
e386f7f510 Merge "Expose peer LLCP version in NDEF callbacks." 2015-04-17 07:02:59 +00:00
Martijn Coenen
fd70bb1367 Expose peer LLCP version in NDEF callbacks.
Change-Id: I98b9a9764b66345f842c1f845c8a386161d965f5
2015-04-15 12:33:37 +02:00
Martijn Coenen
ed3a29ea08 Add getPrefixAids().
Bug: 19144664
Change-Id: Ia49550102ccf1d40cd3f2bf7e5bd64d444a2e8a3
2015-04-15 09:48:57 +02:00
Narayan Kamath
0699722a13 am 3d6cfe0e: am 873b291b: Merge "fix issuse 65774"
* commit '3d6cfe0eb1c9fcfabaf7b02548dd6d5cc16203d6':
  fix issuse 65774
2015-01-02 10:34:03 +00:00
Paul Quei
65e37ee936 fix issuse 65774
"Some vendors have there own well defined specifications ...". Should be "Some vendors have their own well defined specifications ..."

Change-Id: I0d770ac0591812c1c61389eb0078493098784323
Signed-off-by: Paul Quei <paulquei@gmail.com>
2015-01-02 10:21:55 +00:00
Martijn Coenen
2bf6529bf8 Merge "Verify NFC permission immediately on API calls." into lmp-mr1-dev 2014-11-20 17:59:24 +00:00
Martijn Coenen
d8bcfbadf7 Verify NFC permission immediately on API calls.
Bug: 18358968
Change-Id: I648494e6435e107337e0c5bc4c6328774f9a54be
2014-11-14 10:51:14 -08:00