Commit Graph

384 Commits

Author SHA1 Message Date
Treehugger Robot
66e56014df Merge "Added setAlwaysOn feature" 2021-01-20 19:13:43 +00:00
Treehugger Robot
87bc42389d Merge "Fix typo in comment in android/nfc/tech/Ndef.java" 2021-01-20 18:53:40 +00:00
Jakub Pawlowski
90dc908098 Fix typo in comment in android/nfc/tech/Ndef.java
Bug: 150104448
Test: none
Change-Id: I4a0c2c8020d42396e5a142d93d24d754a5b32930
2021-01-20 10:38:54 +01:00
George Chang
a0f9f4b73b Added setAlwaysOn feature
Add setAlwaysOn() system api.
This API is used to request that the NFC service
shall kept controller state on.

Add isAlwaysOnEnabled() system api.
This API is used to check setAlwaysOn is enabled or not.

Add isAlwaysOnSupported() system api.
This API is used to check setAlwaysOn is supported or not.

Bug: 176212892
Test: manual
Change-Id: If7ece9730c57838d870bb70cb2725919e75ef6c2
2021-01-20 03:18:06 +00:00
George Chang
994b5753c1 Add REQUIRE_UNLOCK_FOR_NFC broadcast to notify SystemUI
Bug: 177041874
Test: manual
Change-Id: I1ba9bac867fae8d3d22eb895acbe0f46cb8d76a0
2021-01-17 14:38:56 +00:00
Jeff Sharkey
fab0ab3c9c Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script from
detailed ownership information confirmed by team leads.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I9789c97c1de8e5d962b48c29c57d82fe83729eba
Change-Id: I9789c97c1de8e5d962b48c29c57d82fe83729eba
2020-12-08 08:36:27 -07:00
Jack Yu
3217255a4d Nfc adapter randomly returns null on devices having Nfc
Try to get NfcAdapter from NfcManager only when nfc service interface is
ready.

Bug: 173184157
Test: manaul test
Change-Id: Ifcb0f60e23f01cafd8b6b5f6bc8522773ece23a6
2020-11-13 18:34:42 +08:00
Jack Yu
cb2a677767 Improve NfcAdapter APIs to report correct nfc state
For enable and disable and state checking APIs, retry once if we found
nfc service is dead.

Bug: 173077348
Test: manual tests
Change-Id: I09ecdff9b0b7071569a854e7ace42a46b62a464f
2020-11-12 12:07:38 +08:00
Mathew Inwood
5d123b6775 Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

Bug: 170729553
Test: Treehugger
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
2020-11-04 09:45:53 +00:00
Jeff Sharkey
a8cec413b6 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I245b8d9cac722da76ea67983738a3cbb9deb68df
2020-09-14 10:00:07 -06:00
Automerger Merge Worker
02e6db0e4d Merge "Update preferred payment related APIs" am: d9b1353771 am: cde012199e
Change-Id: I46d98fcd989d4ea5d8ad8d7414bf86a8358ebfa8
2020-03-11 07:48:46 +00:00
Jack Yu
d70879e5bb Update preferred payment related APIs
Add API docs for ACTION_PREFERRED_PAYMENT_CHANGED and the constants(PREFERRED_PAYMENT_*).
Change return type from String to CharSequence for
getDescriptionForPreferredPaymentService.

Test: build pass
Bug: 149998286
Change-Id: Ibe0c77bb25da2673cc8f46cd1e2735c0a1e30523
2020-03-11 02:51:25 +00:00
Mike Ma
5313cbcb1b Core proto definition for "dumpsys nfc --proto"
Add NfcServiceProto for protobuf dumpsys of nfc service. Primarily used
by incident service to capture an incident report proto.

Command to invoke (any of the following after lunch and env setup):
$ adb shell dumpsys nfc --proto
$ adb shell incident 3052
$ incident_report 3052

Bug: 146086108
Exempt-From-Owner-Approval: Owners not reachable.
Test: Execute the above commands and compare the output against dumpsys
      nfc.

Change-Id: I024e148d64ccef5441a67efcbad95c622e5df12a
2020-02-17 15:34:36 -08:00
George Chang
3eb265ae00 Throw IOException on multiple connects.
Only one TagTechnology can be connected at a time.
Other calls to connect() will return IOException.

Bug: 144398423
Test: check error on multiple connects
Change-Id: I19a5f33c7f0d3e7592fe7791c1e04ddc2c9d6125
2020-01-21 23:46:05 +00:00
Artur Satayev
bc3d8b9071 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I534e3fd1305e2f4af076986770033478448a665c
Merged-In: I534e3fd1305e2f4af076986770033478448a665c
2020-01-13 12:39:59 +00:00
Jack Yu
2dbf394181 Provide APIs to get preferred payment service information
Provide APIs to get current preferred payment service information:
1. AID list
2. RouteDestination
3. Description
APIs would be guarded by a new permission.

Bug:139790381
Test: Build pass
Change-Id: I1a4fff5fee58f6e5d6727319cff9ad90e55fc767
2019-12-12 20:08:18 +08:00
Akinobu Nakashima
f18917783c Merge "Fix backward compatibility when there's no secureElementName"
am: 24ae670b4e

Change-Id: I963ccde31ca834bf4fec47e4dca05dcce1d1c4e2
2019-08-27 09:57:56 -07:00
Akinobu Nakashima
90690d2a8b Fix backward compatibility when there's no secureElementName
secureElementName can be unspecified in xml file.
If secureElementName is not specified, offHostName is null.
Then ApduServiceInfo#isOnHost returns true even if it is off-host
because mOnHost is wrongly set to true.

Test: manual
Bug: 137916987
Change-Id: I52ad1f09d3733fc435a937397fc9a433bd630a46
2019-08-06 13:15:29 +00:00
Ruchi Kandoi
6cc1ebe1e6 Update Secure NFC API definitions
Bug: 124767797
Test: None
Merged-In: If78d90fdc0a24d5f44bbb582f388a9c60b12786c
Change-Id: If78d90fdc0a24d5f44bbb582f388a9c60b12786c
2019-06-12 11:16:08 +00:00
Jack Yu
dbca60beb9 Update Multi-OffHost related API definition
Test: build pass
Bug: 128831640
Change-Id: Ia0a8ec38b0c4e60df18f727b0f5a7fdba84fe9e1
2019-04-16 16:55:07 -07:00
Jack Yu
c48f223018 Update Multi-OffHost related API definition
Test: build pass
Bug: 128831640
Change-Id: Ia0a8ec38b0c4e60df18f727b0f5a7fdba84fe9e1
2019-04-16 15:45:20 -07:00
Ioannis Ilkos
2b6277245a Add statically built regex pattern to avoid rebuilding all the time
Bug: b/129682219
Change-Id: I4a94c641d99964bed96ecb1725b84c8a9331879d
Test: Build, treehugger
2019-04-02 09:23:19 +00:00
Jack Yu
c4d52632e8 Merge "Update Android Beam deprecated API description" am: 527b6de018 am: 8b855b16f3
am: 862152f8cd

Change-Id: I0ddd6f1bffc709ffe93e194cd38996758cf48484
2019-03-27 19:09:38 -07:00
Jack Yu
65b438b07a Update Android Beam deprecated API description
Bug: 127532226
Test: None
Change-Id: Id3a769c4cf97bbaee751fd5dc0831bdc5993ef50
2019-03-25 06:29:55 +00:00
Ruchi Kandoi
5e72196be3 Merge "Add @NonNull annotations to (un)setOffHostForService()" am: 78366e46b2 am: 049cd3b67e
am: 0baada5d2a

Change-Id: I207de7be71246830bbf01e0c6b126892997ccadc
2019-03-08 06:42:19 -08:00
Treehugger Robot
78366e46b2 Merge "Add @NonNull annotations to (un)setOffHostForService()" 2019-03-07 20:07:16 +00:00
Ruchi Kandoi
3b2e5c3d02 Merge "Update Secure NFC API definitions" 2019-03-07 18:44:52 +00:00
Ruchi Kandoi
2d09e5c41f Update Secure NFC API definitions
Bug: 124767797
Test: None
Change-Id: If78d90fdc0a24d5f44bbb582f388a9c60b12786c
2019-03-05 10:17:54 -08:00
Ruchi Kandoi
4480f2592e Add @NonNull annotations to (un)setOffHostForService()
Test: None
Bug: 126699330
Bug: 126701964
Change-Id: Id8edf1720ee391d51eef70daeba63133c1efb339
2019-03-04 14:42:32 -08:00
Jeff Sharkey
9e8f83db6d All Parcelable CREATOR fields are @NonNull.
If they were null, then the Parcelable would fail to work.

Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
2019-02-28 23:29:04 -07:00
Andrei Onea
efd37eff41 Add @UnsupportedAppUsage annotations
For packages:
  android.net
  android.net.wifi
  android.nfc

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Merged-In: I7489aad1dceeb18ed7ca48a1ed8829a668b3fa04
Change-Id: I16570aef456b45a5543bf889dddc7a0d25441928
2019-02-28 14:39:20 +00:00
Andrei Onea
9a8b6bf0f1 Add @UnsupportedAppUsage annotations
For packages:
  android.net
  android.net.wifi
  android.nfc

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I7489aad1dceeb18ed7ca48a1ed8829a668b3fa04
2019-02-27 13:31:33 +00:00
Xin Li
0e71b4f19b DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into
stage-aosp-master

Bug: 124234733
Change-Id: Ic4f67fde0835da0b1c363906cccef0d244e38393
2019-02-14 09:48:06 -08:00
Ruchi Kandoi
d8c592703d Merge "Add Secure NFC functionality" am: 3ffdb26aa8 am: c538141c6d
am: 32b84ede51

Change-Id: I67f436d48dfd5578d04d284e7669685760b0716f
2019-01-28 22:59:55 -08:00
Ruchi Kandoi
32b84ede51 Merge "Add Secure NFC functionality" am: 3ffdb26aa8
am: c538141c6d

Change-Id: I5e1c1d44396099c841f09bfdd2ac956f01fd4ceb
2019-01-28 22:14:28 -08:00
Ruchi Kandoi
d97bb0929e Add Secure NFC functionality
Test: Toggle NFC switch; Manual check functionality
Change-Id: Ib57e6f8162f93f2f028e6bcc063ab3466f9c5474
2019-01-23 15:11:36 -08:00
Ruchi Kandoi
d98f84b0d9 Merge "Deprecate Android beam APIs and create a feature flag to gate them" am: 6a3d45c4b2 am: d0c8a165d8
am: a33da54c8d

Change-Id: I1eda6b7d5879045e6bd35821ee5368ef72855942
2019-01-04 14:18:15 -08:00
Ruchi Kandoi
a33da54c8d Merge "Deprecate Android beam APIs and create a feature flag to gate them" am: 6a3d45c4b2
am: d0c8a165d8

Change-Id: I886941a5011fdf204fe62c1162dd2ad69d466f62
2019-01-04 14:06:55 -08:00
Ruchi Kandoi
96fe50bc1b Deprecate Android beam APIs and create a feature flag to gate them
Test: Test application trying to invoke the API
Bug: 117519147
Change-Id: Icd3187e4f3e0f180cb42d36011f60895fb395002
2019-01-04 21:49:00 +00:00
Ruchi Kandoi
0e1c39bf55 Merge changes from topic "multi-se-support" am: 54502d68ea am: 9c0ec9be9f
am: 650ff88a4c

Change-Id: I562af1c9c1b0c254d8b23466caceb94ef767aa1f
2019-01-04 12:38:53 -08:00
Ruchi Kandoi
650ff88a4c Merge changes from topic "multi-se-support" am: 54502d68ea
am: 9c0ec9be9f

Change-Id: Ieca9b142094c8c568409290fdf690fad529ef604
2019-01-04 12:25:13 -08:00
Ruchi Kandoi
44bb579621 Add a mechanism to register AIDs to specific off-host SE
Test: manual
Bug: 117253962
Change-Id: Id34bf84dcff7789548eac19478010838bebd9758
2019-01-04 01:14:50 +00:00
Ruchi Kandoi
ebf267a2a4 Add Off-Host Card Emulation Features
Test: CTS test; manual
Bug: 117253962
Change-Id: I7c35b1bffbc57870bb8c67704811a2649854d94e
2019-01-03 23:00:59 +00:00
Nathan Harold
41e2d7494f Merge "Move some members to the "Q blacklist"." am: f5cf9f24ed
am: 13c9e7e2f3

Change-Id: Ia2419cce28d26d9464da2a5172cb332b629e943e
2018-10-24 16:14:06 -07:00
Mathew Inwood
45d2c252b1 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Merged-In: I719b5c94e5b1f4fa562dd5d655953422958ad37e
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
(cherry picked from commit 8c854f86a4)
2018-10-22 17:28:24 -07:00
kopriva
c7d26d48ce Merge "docs: bug 37128155, broken link" into pi-dev am: 415e35525f
am: cc5deaf7d5

Change-Id: I41b0ec4bc5fb9d9c3ace80a0d21d3f4d1ea6d29f
2018-10-08 23:37:48 -07:00
kopriva
cc5deaf7d5 Merge "docs: bug 37128155, broken link" into pi-dev
am: 415e35525f

Change-Id: I2ef8a7bcb904734d5d7073e57c7a2bdc1334fe2c
2018-10-08 23:28:36 -07:00
kopriva
ee2eda11e6 docs: bug 37128155, broken link
Test: make ds-docs

Bug: 37128155

Change-Id: I39e432b6000b9c32ef62bc10f2d8ad343b9305f9
Exempt-From-Owner-Approval: Docs-only change
2018-10-04 14:47:12 -07:00
kopriva
64c4523ed4 Merge "docs: fixed five typos" into pi-dev am: 82b413428e
am: d366837e05

Change-Id: I0cf5630bc936c872ca936f2d3de9e8aaa509f083
2018-09-18 12:10:35 -07:00
kopriva
d366837e05 Merge "docs: fixed five typos" into pi-dev
am: 82b413428e

Change-Id: I4af571d6bcfa151235223b51cb8135fbacb62c82
2018-09-18 12:00:24 -07:00