Commit Graph

296 Commits

Author SHA1 Message Date
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
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
Andres Morales
56f299b87a Add UserHandle to BeamShareData
Allows NfcService to start the beam transfer
process in the correct user.

Bug:17966846
Change-Id: Ie98c98e763f0c2eabf11afda645c421b0332a2f6
2014-11-03 11:44:10 -08:00
Andres Morales
258d222152 Fix build, previous commit failed to remove an import
Bug:17883273
Change-Id: I6ef422eae83fb8b44279f1bf5a811858b791afa7
2014-10-07 11:15:58 -07:00
Andres Morales
052690540e Remove dead NFC unlock code from fw/base
Bug:17883273
Change-Id: I214d141b0b9d83b5698f596087fabb1f30543606
2014-10-06 16:04:19 -07:00
Martijn Coenen
0a094c61bc Merge "Add hidden API to disable NFC (optional persist)." into lmp-dev 2014-09-26 18:08:31 +00:00
Martijn Coenen
56a3e67433 Add hidden API to disable NFC (optional persist).
Bug: 17298769
Change-Id: I1fa59592a34f1207731dc75d2e548b3e614d94f5
2014-09-25 18:02:27 -07:00
Martijn Coenen
5e991a129c Upper-case incoming AIDs.
This fixes scenarios where different services
register the same AID in a different case, and
we don't see any conflict.

Bug: 16517161
Change-Id: I610b585ce7d57b4e32c21004a1d4c50e1133986a
2014-09-16 16:06:45 -07:00
Martijn Coenen
9ed2d5f746 Merge "Fix static AID prefix registration." into lmp-dev 2014-09-16 17:40:30 +00:00
Martijn Coenen
0985fb6c42 Fix static AID prefix registration.
Bug: 16517161
Change-Id: Ibaddf8720907f1d28d44231d927f538628bbf9d0
2014-09-16 10:09:12 -07:00
Martijn Coenen
7e25a504d4 Merge "AID prefix registration." into lmp-dev 2014-09-16 14:55:04 +00:00
Andres Morales
9c4f400aac Add hidden API for pausing and resuming NFC polling.
Bug:17401266
Change-Id: Icce34787fc89dc33445f6c36f40f669a8b9b2f92
2014-09-11 16:43:17 -07:00
Martijn Coenen
826a73b83b AID prefix registration.
Bug: 16517161
Change-Id: I4e008b84fd1372b17a98437ec8a6b71c33d7cd05
2014-09-08 23:49:07 -07:00
Andres Morales
b59d35c16d Remove old NFC unlock api
Bug: 16401635
Change-Id: I667d91c2346355ed0a2115644e6192f5f208e288
2014-08-19 13:13:10 -07:00
Andres Morales
f9a97942e1 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
2014-08-15 17:08:24 +00:00
Andres Morales
11d2e53dc0 NFC Unlock api changes
Bug: 16401635
Change-Id: I994bd80be40052c2f894199bb44ebbde40077f27
2014-07-31 01:09:02 +00:00
Andres Morales
92b4b3c64d Revert "NFC Unlock api changes"
This reverts commit 9fef5fbcd6d47ef86823b3a2d82d34801f9be335.

Change-Id: Idabe1c2901e0e26d38f84583308f69804ab2c1c3
2014-07-30 21:30:50 +00:00
Andres Morales
131197aa6e NFC Unlock api changes
Bug: 16401635
Change-Id: I138a9aa0bb156982b6c7656c51a1e2194776e4ed
2014-07-30 21:17:06 +00:00
Martijn Coenen
29c2e3797a Make some NFC APIs @systemAPI.
Change-Id: I12e292563a517211e4fae7a1f64021758f396d1a
2014-07-30 21:03:07 +00:00