summaryrefslogtreecommitdiff
path: root/core/java/android/nfc
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-13.0.0_r16' into t13.0George Zacharia2022-12-152-15/+9
|\ | | | | | | | | | | | | | | | | | | | | Android 13.0.0 Release 16 (TQ1A.221205.011) Also included the following reverts: 1. Revert "fw/b: Import Wi-Fi standard icon [1/2]" 2. Revert "Add preference for toggling the wallpaper zooming animation" Co-authored-by: Semavi Ulusoy <doc.divxm@gmail.com> Change-Id: I9a6b51e452c28d10411712c59778bb54da5783e9
| * Assign the nonce from NfcService while contructing a Tag objectchloedai2022-05-242-15/+9
| | | | | | | | | | | | | | | | | | | | | | 1. Remove nonce setting method from AIDL, only NfcService could generate nonce 2. NfcService directily assign a nonce to Tag object while contructing Bug: 199291025 Test: test with some reader apps, test pass Change-Id: I0cf3d22a785b463589f1ba9bd3ca49825839b9ce Merged-In: I0cf3d22a785b463589f1ba9bd3ca49825839b9ce
* | base: Support for third party NFC features and extensionsPuneet Mishra2022-10-215-16/+43
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is a combination of following changes: 1) frameworks/base: Support for third party NFC features Integration of below modifications are necessary to support third party NFC software: * a new interface in INfcAdapter.aidl allowing vendor specific extensions and features * a new size for MIFARE Classic tags * a modified constructor to distinguish MIFARE Classic tags from NfcA tags * allowing extensions to AidGroup and changing the protection of the instance variables to package protected Author: Puneet Mishra <puneetm@codeaurora.org> Change-Id: Ic11dc68c4ea83262c705ec50b75b5808aa064f82 (integrated from commit 57a001b7851c97d41f042dda643f9a87aa6306e5) 2) NFC: Allow extensions to ApduServiceInfo Mobile network operators expect additional features in ApduServiceInfo to support their payment solutions. To achieve this, the final keyword is removed from the class definition and its instance variables, thereby allowing extensions to the class. Author: Puneet Mishra <puneetm@codeaurora.org> Change-Id: I9058d08e729027b04ee94405c66ff9d99c0f963b Change-Id: I04bbe46bf9efd032e973bba7a16dc430fb6edd12
* Merge changes from topic "Backport: tag availability checking mechanism" ↵Chloe Dai2022-03-081-1/+9
|\ | | | | | | | | | | | | | | into sc-v2-dev-plus-aosp am: 40a364f284 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17046201 Change-Id: I14e5e6e0b7bd6d8333ed8d35557ff3dcf7d01fbf
| * [automerge] Add null checking to fix NullPointerException while creating ↵chloedai2022-03-071-1/+9
| |\ | | | | | | | | | | | | | | | | | | | | | | | | mock tag 2p: d52c4c3e83 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17046201 Bug: 221452261 Change-Id: Ibd6b72aba6b8755d38524cda66ed5fce0f4c8aab
| | * Add null checking to fix NullPointerException while creating mock tagchloedai2022-03-071-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | Bug: 221452261 Test: Test pass Change-Id: Ie64df0d8d291468b258f92524af10da504c7dade Merged_In: Ie64df0d8d291468b258f92524af10da504c7dade (cherry picked from commit dbdc1bd3c7d53734bf4501e131bb50921f547a7f)
| * | [automerge] Add tag availability checking mechanism 2p: 113f3a4a1dPresubmit Automerger Backend2022-03-072-0/+24
| |\| | | | | | | | | | | | | | | | | | | | | | Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16730930 Bug: 199291025 Change-Id: Ib99e5fe19b020154867910bbaeb513be277a81cd Merged-In: Iabaab1f6d2d22e15966d31dd79099369d828f4c6
| | * Add tag availability checking mechanismchloedai2022-03-072-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set a cookie to the tag objects when they are constructed, the cookie could be used to check the availability before returning the tag service Bug: 199291025 Test: test with some reader apps, test pass Merged-In: Iabaab1f6d2d22e15966d31dd79099369d828f4c6 Change-Id: Iabaab1f6d2d22e15966d31dd79099369d828f4c6
| | * Fix getSelectionModeForCategoryGeorge Chang2021-05-262-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NFC_PAYMENT_DEFAULT_COMPONENT is not accessable for market apps Check if default payment name already registered in settings by NfcService. Add a new AIDL interface isDefaultPaymentRegistered in INfcCardEmulation.aidl Bug: 189178386 Test: atest CtsNfcTestCases Merged-In: I0a09c9763d39c8e0b9b28df85603bdc7f281669d Change-Id: I0a09c9763d39c8e0b9b28df85603bdc7f281669d
* | | Merge "Add an optional extra field description for ACTION_CHANGE_DEFAULT" ↵Treehugger Robot2022-03-031-1/+4
|\| | | | | | | | | | | | | | | | | | | | | | | am: 2b65ebc340 am: 8f7978d676 am: c65ee54bcb Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2000590 Change-Id: Ia8749bb7d273af93c310a10e101511ec2db0fbd7
| * | Add an optional extra field description for ACTION_CHANGE_DEFAULTJack Yu2022-03-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add the description using Intent.EXTRA_USER to pass the UserHandle of the user that owns the app. Bug: 215300017 Test: build pass Change-Id: Ieeaf0876b19cae60743cbf279e5c937a457165c9
* | | Merge "Remove EXTRA_USERID from NFC CardEmulation" am: 1a11b7b5d5 am: ↵Treehugger Robot2022-02-221-7/+0
|\| | | | | | | | | | | | | | | | | | | | | | | f5d51cb655 am: 37e2084dce Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1984767 Change-Id: I34632e1f8ba0d71f36dd10dfef95c8fa6dc89fc2
| * | Remove EXTRA_USERID from NFC CardEmulationJack Yu2022-02-151-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Based on suggestion, use existing Intent.EXTRA_USER to pass the UserHandle as the extra field of ACTION_CHANGE_DEFAULT. Bug: 215300017 Test: manual Change-Id: I15c5032f0229e8049fa1ef3741638974189ac3cf
* | | Merge "Add tag availability checking mechanism"Chloe Dai2022-01-262-0/+24
|\ \ \
| * | | Add tag availability checking mechanismchloedai2022-01-202-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set a cookie to the tag objects when they are constructed, the cookie could be used to check the availability before returning the tag service Bug: 199291025 Test: test with some reader apps, test pass Change-Id: Iabaab1f6d2d22e15966d31dd79099369d828f4c6
* | | | Revert "Revert "Migrate unsafe parcel APIs in framework-minus-apex""Bernardo Rufino2022-01-191-2/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 331be9a6431d6489f8d1e1b80cb510d0ee073c50. Reintroducing ag/16366278 since it seems unrelated to b/214053959 (more details on b/214053959#comment55). Original commit message: Migrate unsafe parcel APIs in framework-minus-apex Migrate the following unsafe parcel APIs in framework-minus-apex: * Parcel.readSerializable() * Parcel.readArrayList() * Parcel.readList() * Parcel.readParcelable() * Parcel.readParcelableList() * Parcel.readSparseArray() This CL was generated by applying lint fixes that infer the expected type from the caller code and provide that as the type parameter (ag/16365240). A few observations: * In some classes we couldn't migrate because the class also belonged to another build module whose min SDK wasn't current (as is the case for framework-minus-apex), hence I suppressed the lint check (since I'll eventually submit the lint check to the tree). * In some cases, I needed to do the cast in https://stackoverflow.com/a/1080525/5765705 to make the compiler happy since there isn't another way of providing a class of type Class<MyClassWithGenerics<T>>. * In the readSerializable() case, the new API also requires the class loader, that was inferred to by InferredClass.class.getClassLoader(). * Note that automatic formatting and import rely on running hooked up to the IDE, which wasn't the case here. Bug: 195622897 Change-Id: I272432e6e082a973f7a50492ec35d79c2b577c93 Test: TH passes
* | | Revert "Migrate unsafe parcel APIs in framework-minus-apex"Bernardo Rufino2022-01-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 90bb3709dc75f7e44914222114752de5bce133d4. Reason for revert: b/214053959 Change-Id: Ic271bab1d3eaf677a5989dda9deb944ee2ad6850
* | | Migrate unsafe parcel APIs in framework-minus-apexBernardo Rufino2021-12-151-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate the following unsafe parcel APIs in framework-minus-apex: * Parcel.readSerializable() * Parcel.readArrayList() * Parcel.readList() * Parcel.readParcelable() * Parcel.readParcelableList() * Parcel.readSparseArray() This CL was generated by applying lint fixes that infer the expected type from the caller code and provide that as the type parameter (ag/16365240). A few observations: * In some classes we couldn't migrate because the class also belonged to another build module whose min SDK wasn't current (as is the case for framework-minus-apex), hence I suppressed the lint check (since I'll eventually submit the lint check to the tree). * In some cases, I needed to do the cast in https://stackoverflow.com/a/1080525/5765705 to make the compiler happy since there isn't another way of providing a class of type Class<MyClassWithGenerics<T>>. * In the readSerializable() case, the new API also requires the class loader, that was inferred to by InferredClass.class.getClassLoader(). * Note that automatic formatting and import rely on running hooked up to the IDE, which wasn't the case here. Bug: 195622897 Test: TH passes Change-Id: I11a27b9bdab7959ee86e90aa1e1cbebd7aaf883c
* | NFC-F support in work profileJack Yu2021-11-042-3/+5
| | | | | | | | | | | | | | | | Add one function to get NfcF service based on user id. Bug: 202367033 Test: mauanl tests Change-Id: I15f3ef84198b0af40d33fd16f457fb9b6cb7ca32
* | NFC support in work profileJack Yu2021-10-291-0/+7
| | | | | | | | | | | | | | | | Add new constant userId extra for ACTION_CHANGE_DEFAULT. Bug: 202367033 Test: mauanl tests Change-Id: I4ce95f3939a8bb80b77926f111f34d084be8fb3e
* | NFC support in work profileJack Yu2021-10-292-5/+53
| | | | | | | | | | | | | | | | | | Add one function to get service based on user id. Add one function to set deafult for next tap based on user id. Bug: 202367033 Test: mauanl tests Change-Id: Ib5bd36528c0d398215b078dbbd4f19305ce1402c
* | Merge "Fix getSelectionModeForCategory" am: be74a9f6ba am: 057beb9bdaGeorge Chang2021-05-272-3/+18
|\ \ | |/ |/| | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1719130 Change-Id: Ieeee702d0a3dd1f55151354ab2f04ba1f1885572
| * Fix getSelectionModeForCategoryGeorge Chang2021-05-262-3/+18
| | | | | | | | | | | | | | | | | | | | NFC_PAYMENT_DEFAULT_COMPONENT is not accessable for market apps Check if default payment name already registered in settings by NfcService. Add a new AIDL interface isDefaultPaymentRegistered in INfcCardEmulation.aidl Bug: 189178386 Test: atest CtsNfcTestCases Change-Id: I0a09c9763d39c8e0b9b28df85603bdc7f281669d
* | Merge "Update register and unregisterControllerAlwaysOnListener" am: ↵Treehugger Robot2021-04-281-0/+16
|\| | | | | | | | | | | | | | | 16019ad77d am: 925778283c am: 270ca9b85e Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1686685 Change-Id: Ib847254e7ccf35aa0050bcb1893fa9924899af97
| * Update register and unregisterControllerAlwaysOnListenerGeorge Chang2021-04-261-0/+16
| | | | | | | | | | | | | | | | | | Don't register listener if Nfc ControllerAlwaysOn is not supported Bug: 186172688 Test: atest NfcManagerTests Test: atest android.permission.cts.NfcPermissionTest Change-Id: I0e2a4ad372754c56f72296fdbaed8c98c06e1c56
* | Merge changes from topic "nfcc_aon_listener" am: 2195e2b514 am: 2f336d3401 ↵George Chang2021-04-151-0/+7
|\| | | | | | | | | | | | | | | am: e3cba3971a Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669508 Change-Id: I3a234b2714f8254df7f4082b909b1f960b5d03f7
| * Add NfcManagerTestsGeorge Chang2021-04-151-0/+7
| | | | | | | | | | | | Bug: 184837312 Test: atest NfcManagerTests Change-Id: I1838a8232a34d9b2f35941408c499f59c68aa5e7
* | Update ControllerAlwaysOnStateCallback to ControllerAlwaysOnListener am: ↵George Chang2021-04-154-60/+60
|\| | | | | | | | | | | | | | | 78fad0d6d3 am: 9aa1fc83e5 am: 5293a03622 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675631 Change-Id: Ib6e7a448fcc62cc9af7600a2fb8df640ee7e9606
| * Update ControllerAlwaysOnStateCallback to ControllerAlwaysOnListenerGeorge Chang2021-04-154-60/+60
| | | | | | | | | | | | | | Bug: 182979907 Test: atest NfcNciInstrumentationTests Test: atest android.permission.cts.NfcPermissionTest Change-Id: Iba0e3881b1bdb7ce080c15ae52f454912dc66ec9
* | Merge "Add callbacks to indicate NFC setControllerAlwaysOn state changed" ↵George Chang2021-04-074-25/+217
|\| | | | | | | | | | | | | | | am: cfc798e793 am: c5e292c9aa am: 9ef0cdbbc3 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1657764 Change-Id: I64403a77aa63acb4cf0b35f6b72e82c518fa8040
| * Add callbacks to indicate NFC setControllerAlwaysOn state changedGeorge Chang2021-04-014-25/+217
| | | | | | | | | | | | | | | | remove unused android.nfc.action.ALWAYS_ON_STATE_CHANGED broadcast Bug: 182979907 Test: atest NfcNciInstrumentationTests Change-Id: I1032ee16d4d4e3f9d1b0c84f33ac70264ecda2b3
* | Merge changes from topic "update_NFCC_Always_on" am: 7b7b809587 am: ↵George Chang2021-03-302-15/+15
|\| | | | | | | | | | | | | | | 6a6d92ff09 am: f5dcd90370 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655107 Change-Id: I57b2db68bb05750718298d776ba2d365bea44a8b
| * Update SetAlwaysOn to SetControllerAlwaysOnGeorge Chang2021-03-282-12/+12
| | | | | | | | | | | | Bug: 182979907 Test: atest NfcNciInstrumentationTests Change-Id: I6b794259ec597e5d7f86e94705017b8fe169a102
| * Add new permission to set NFC always on statesGeorge Chang2021-03-281-3/+3
| | | | | | | | | | | | Bug: 182979907 Test: atest NfcNciInstrumentationTests Change-Id: I9a82c37f0b6716e68dc4c2d7e0f171d892f09112
| * Add attr for nfc applications to configure support power statesJack Yu2021-02-011-2/+39
| | | | | | | | | | | | | | | | | | | | Use requireDeviceUnlock and requireDeviceScreenOn to configure the power state for the AIDs of the nfc applications. Bug: 171460473 Test: build pass Merged-In: I03bd537082117e595a7badfb2d8ca6ee7cae08cf Change-Id: I03bd537082117e595a7badfb2d8ca6ee7cae08cf
* | Merge "Added setAlwaysOn feature" am: 66e56014df am: 0eda082f6a am: 2baabee7bbTreehugger Robot2021-01-202-0/+121
|\| | | | | | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1477323 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I92a8bf54ce320942e83563b5fc16fc7ea6198510
| * Merge "Added setAlwaysOn feature"Treehugger Robot2021-01-202-0/+121
| |\
| | * Added setAlwaysOn featureGeorge Chang2021-01-202-0/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Fix typo in comment in android/nfc/tech/Ndef.java" am: 87bc42389d am: ↵Treehugger Robot2021-01-201-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | d7788c1cd5 am: b7640bf2ed Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554496 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Iff58656da800f3429ec91e3e3d5a48f01bfd9fe3
| * | Merge "Fix typo in comment in android/nfc/tech/Ndef.java"Treehugger Robot2021-01-201-1/+1
| |\ \ | | |/ | |/|
| | * Fix typo in comment in android/nfc/tech/Ndef.javaJakub Pawlowski2021-01-201-1/+1
| | | | | | | | | | | | | | | | | | Bug: 150104448 Test: none Change-Id: I4a0c2c8020d42396e5a142d93d24d754a5b32930
* | | Merge "Add REQUIRE_UNLOCK_FOR_NFC broadcast to notify SystemUI" am: ↵George Chang2021-01-201-0/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | c76df1366c am: 8feaa187be am: 8418eaba20 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552500 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I4bf7335e312a59346842a1c503e2fce5ac198b17
| * | Add REQUIRE_UNLOCK_FOR_NFC broadcast to notify SystemUIGeorge Chang2021-01-171-0/+8
| | | | | | | | | | | | | | | | | | Bug: 177041874 Test: manual Change-Id: I1ba9bac867fae8d3d22eb895acbe0f46cb8d76a0
* | | Add attr for nfc applications to configure support power statesJack Yu2020-12-161-2/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use requireDeviceUnlock and requireDeviceScreenOn to configure the power state for the AIDs of the nfc applications. Bug: 171460473 Test: build pass Change-Id: I03bd537082117e595a7badfb2d8ca6ee7cae08cf
* | | resolve merge conflicts of 358f0d4fc8c248498cf113c41e043877a14e89a1 to masterJeff Sharkey2020-12-084-0/+16
|\| | | | | | | | | | | | | | | | | | | | Bug: 174932174 Test: I solemnly swear I tested this conflict resolution. Exempt-From-Owner-Approval: refactoring with team leads buy-in Change-Id: I9262a08ffc1ccede8e519d0eed90ed2bfcf0232c
| * | Improve OWNERS coverage across frameworks/base/.Jeff Sharkey2020-12-084-0/+16
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge changes Ifcb0f60e,I09ecdff9 am: 5bc68e02a0 am: 6f4a8baa7a am: ↵Treehugger Robot2020-11-181-0/+106
|\| | | | | | | | | | | | | | | 00f3d0f52b am: 149c95c766 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1498599 Change-Id: Ie5a84ef28e386e6f7d44171b0376ae5ff646a9eb
| * Nfc adapter randomly returns null on devices having NfcJack Yu2020-11-131-0/+6
| | | | | | | | | | | | | | | | | | Try to get NfcAdapter from NfcManager only when nfc service interface is ready. Bug: 173184157 Test: manaul test Change-Id: Ifcb0f60e23f01cafd8b6b5f6bc8522773ece23a6
| * Improve NfcAdapter APIs to report correct nfc stateJack Yu2020-11-121-0/+100
| | | | | | | | | | | | | | | | | | 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
| * Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-11-044-10/+13
| | | | | | | | | | | | | | | | | | | | | | 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