The majority of Manager-style classes already use Context.getUserId()
when making calls into the OS, so clean up the remaining callers to
unify behind this strategy.
This gives @SystemApi developers a nice clean interface to interact
across user boundaries, instead of manually adding "AsUser" or
"ForUser" method variants, which would quickly become unsustainable.
Test: builds, boots
Bug: 72863821
Exempt-From-Owner-Approval: trivial changes
Change-Id: Ib772ec4438e57a2ad4950821b9432f9842998451
If HCEF Application does not provide the T3T PMM value, set the
default value (FFFFFFFFFFFFFFFF) as per NCI specification.
Bug: 64112415
Test: CTS Verifier; HCE-F Reader/Emulator Test
Change-Id: I24f212d9bebd978342e4dd04d618572132e7eb4b
(cherry picked from commit 20a77e973f62f145ab7b3a4822ce34407c0ca476)
As per NCI2.0 LF_T3T_PMM is a part of LF_T3T_IDENTIFIER.
Since it is required for each LF_T3T_IDENTIFIER entry,
It can be taken from application.
Test: Compiles.
Change-Id: Icc168592c292d869a4c331dd28fe43b4d75c9a41
(cherry picked from commit e7ecebae11)
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
If ID_LENGTH field is omitted from Empty Type record, it cannot be
detected as Ndef since the data is strictly checked by e3fc7d9954.
But it is not possible to create raw bytes of Empty Type record
which can meet this condition by using NdefRecord/NdefMessage.
To fix this issue, added ID_LENGTH field to Empty type record.
Bug: 38299566
Test: Write and read NDEF tag with empty type record
Change-Id: Idb58c80cf8562a8b314f4ddeccdc627dc0c6f5b4
(cherry picked from commit ef9d0a480ef72a4ff0de5b5afa3661cff81fd8b5)
- 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>
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
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
This undoes the automerger skip which occured in
commit e740c84dc3 and
replays it as a standard (NOT -s ours) merge.
Change-Id: If5a47be26f73d6a0735c425cd66310a3e2a89086
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
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
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
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
Fixes AppOps crash, because it notices the calling
package is different from the calling UID.
Bug: 25492633
Change-Id: I55e2d975fd0a7ee94c4623efb3b19b1b54b72da2
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
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