diff options
-rw-r--r-- | AconfigFlags.bp | 4 | ||||
-rw-r--r-- | Android.bp | 1 | ||||
-rw-r--r-- | api/ApiDocs.bp | 1 | ||||
-rw-r--r-- | api/StubLibraries.bp | 1 | ||||
-rw-r--r-- | api/api.go | 3 | ||||
-rw-r--r-- | core/api/current.txt | 438 | ||||
-rw-r--r-- | core/api/module-lib-current.txt | 5 | ||||
-rw-r--r-- | core/api/removed.txt | 16 | ||||
-rw-r--r-- | core/api/system-current.txt | 40 | ||||
-rw-r--r-- | core/api/system-lint-baseline.txt | 10 | ||||
-rw-r--r-- | core/api/system-removed.txt | 11 | ||||
-rw-r--r-- | core/java/Android.bp | 10 | ||||
-rw-r--r-- | core/java/android/nfc/TEST_MAPPING | 10 | ||||
-rw-r--r-- | core/java/android/nfc/tech/OWNERS | 2 | ||||
-rw-r--r-- | core/tests/nfctests/OWNERS | 1 | ||||
-rw-r--r-- | nfc-extras/Android.bp | 4 | ||||
-rw-r--r-- | nfc/Android.bp | 42 | ||||
-rw-r--r-- | nfc/api/current.txt | 438 | ||||
-rw-r--r-- | nfc/api/lint-baseline.txt | 95 | ||||
-rw-r--r-- | nfc/api/module-lib-current.txt | 9 | ||||
-rw-r--r-- | nfc/api/module-lib-lint-baseline.txt | 93 | ||||
-rw-r--r-- | nfc/api/removed.txt | 16 | ||||
-rw-r--r-- | nfc/api/system-current.txt | 44 | ||||
-rw-r--r-- | nfc/api/system-lint-baseline.txt | 105 | ||||
-rw-r--r-- | nfc/api/system-removed.txt | 11 | ||||
-rw-r--r-- | nfc/jarjar-rules.txt | 38 | ||||
-rw-r--r-- | nfc/java/android/nfc/ApduList.aidl (renamed from core/java/android/nfc/ApduList.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/ApduList.java (renamed from core/java/android/nfc/ApduList.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/AvailableNfcAntenna.aidl (renamed from core/java/android/nfc/AvailableNfcAntenna.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/AvailableNfcAntenna.java (renamed from core/java/android/nfc/AvailableNfcAntenna.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/Constants.java (renamed from core/java/android/nfc/Constants.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/ErrorCodes.java (renamed from core/java/android/nfc/ErrorCodes.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/FormatException.java (renamed from core/java/android/nfc/FormatException.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/IAppCallback.aidl (renamed from core/java/android/nfc/IAppCallback.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/INfcAdapter.aidl (renamed from core/java/android/nfc/INfcAdapter.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/INfcAdapterExtras.aidl (renamed from core/java/android/nfc/INfcAdapterExtras.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/INfcCardEmulation.aidl (renamed from core/java/android/nfc/INfcCardEmulation.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/INfcControllerAlwaysOnListener.aidl (renamed from core/java/android/nfc/INfcControllerAlwaysOnListener.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/INfcDta.aidl (renamed from core/java/android/nfc/INfcDta.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/INfcFCardEmulation.aidl (renamed from core/java/android/nfc/INfcFCardEmulation.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/INfcTag.aidl (renamed from core/java/android/nfc/INfcTag.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/INfcUnlockHandler.aidl (renamed from core/java/android/nfc/INfcUnlockHandler.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/ITagRemovedCallback.aidl (renamed from core/java/android/nfc/ITagRemovedCallback.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/NdefMessage.aidl (renamed from core/java/android/nfc/NdefMessage.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/NdefMessage.java (renamed from core/java/android/nfc/NdefMessage.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/NdefRecord.aidl (renamed from core/java/android/nfc/NdefRecord.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/NdefRecord.java (renamed from core/java/android/nfc/NdefRecord.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/NfcActivityManager.java (renamed from core/java/android/nfc/NfcActivityManager.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/NfcAdapter.java (renamed from core/java/android/nfc/NfcAdapter.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/NfcAntennaInfo.aidl (renamed from core/java/android/nfc/NfcAntennaInfo.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/NfcAntennaInfo.java (renamed from core/java/android/nfc/NfcAntennaInfo.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/NfcControllerAlwaysOnListener.java (renamed from core/java/android/nfc/NfcControllerAlwaysOnListener.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/NfcEvent.java (renamed from core/java/android/nfc/NfcEvent.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/NfcFrameworkInitializer.java (renamed from core/java/android/nfc/NfcFrameworkInitializer.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/NfcManager.java (renamed from core/java/android/nfc/NfcManager.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/NfcServiceManager.java (renamed from core/java/android/nfc/NfcServiceManager.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/Tag.aidl (renamed from core/java/android/nfc/Tag.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/Tag.java (renamed from core/java/android/nfc/Tag.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/TagLostException.java (renamed from core/java/android/nfc/TagLostException.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/TechListParcel.aidl (renamed from core/java/android/nfc/TechListParcel.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/TechListParcel.java (renamed from core/java/android/nfc/TechListParcel.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/TransceiveResult.aidl (renamed from core/java/android/nfc/TransceiveResult.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/TransceiveResult.java (renamed from core/java/android/nfc/TransceiveResult.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/cardemulation/AidGroup.aidl (renamed from core/java/android/nfc/cardemulation/AidGroup.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/cardemulation/AidGroup.java (renamed from core/java/android/nfc/cardemulation/AidGroup.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/cardemulation/ApduServiceInfo.aidl (renamed from core/java/android/nfc/cardemulation/ApduServiceInfo.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/cardemulation/ApduServiceInfo.java (renamed from core/java/android/nfc/cardemulation/ApduServiceInfo.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/cardemulation/CardEmulation.java (renamed from core/java/android/nfc/cardemulation/CardEmulation.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/cardemulation/HostApduService.java (renamed from core/java/android/nfc/cardemulation/HostApduService.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/cardemulation/HostNfcFService.java (renamed from core/java/android/nfc/cardemulation/HostNfcFService.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/cardemulation/NfcFCardEmulation.java (renamed from core/java/android/nfc/cardemulation/NfcFCardEmulation.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/cardemulation/NfcFServiceInfo.aidl (renamed from core/java/android/nfc/cardemulation/NfcFServiceInfo.aidl) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/cardemulation/NfcFServiceInfo.java (renamed from core/java/android/nfc/cardemulation/NfcFServiceInfo.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/cardemulation/OWNERS (renamed from core/java/android/nfc/OWNERS) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/cardemulation/OffHostApduService.java (renamed from core/java/android/nfc/cardemulation/OffHostApduService.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/cardemulation/Utils.java (renamed from core/java/android/nfc/cardemulation/Utils.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/dta/NfcDta.java (renamed from core/java/android/nfc/dta/NfcDta.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/dta/OWNERS (renamed from core/java/android/nfc/cardemulation/OWNERS) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/flags.aconfig (renamed from core/java/android/nfc/flags.aconfig) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/package.html (renamed from core/java/android/nfc/package.html) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/tech/BasicTagTechnology.java (renamed from core/java/android/nfc/tech/BasicTagTechnology.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/tech/IsoDep.java (renamed from core/java/android/nfc/tech/IsoDep.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/tech/MifareClassic.java (renamed from core/java/android/nfc/tech/MifareClassic.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/tech/MifareUltralight.java (renamed from core/java/android/nfc/tech/MifareUltralight.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/tech/Ndef.java (renamed from core/java/android/nfc/tech/Ndef.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/tech/NdefFormatable.java (renamed from core/java/android/nfc/tech/NdefFormatable.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/tech/NfcA.java (renamed from core/java/android/nfc/tech/NfcA.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/tech/NfcB.java (renamed from core/java/android/nfc/tech/NfcB.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/tech/NfcBarcode.java (renamed from core/java/android/nfc/tech/NfcBarcode.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/tech/NfcF.java (renamed from core/java/android/nfc/tech/NfcF.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/tech/NfcV.java (renamed from core/java/android/nfc/tech/NfcV.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/tech/OWNERS (renamed from core/java/android/nfc/dta/OWNERS) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/tech/TagTechnology.java (renamed from core/java/android/nfc/tech/TagTechnology.java) | 0 | ||||
-rw-r--r-- | nfc/java/android/nfc/tech/package.html (renamed from core/java/android/nfc/tech/package.html) | 0 | ||||
-rw-r--r-- | nfc/tests/Android.bp (renamed from core/tests/nfctests/Android.bp) | 1 | ||||
-rw-r--r-- | nfc/tests/AndroidManifest.xml (renamed from core/tests/nfctests/AndroidManifest.xml) | 0 | ||||
-rw-r--r-- | nfc/tests/AndroidTest.xml (renamed from core/tests/nfctests/AndroidTest.xml) | 0 | ||||
-rw-r--r-- | nfc/tests/src/android/nfc/NfcControllerAlwaysOnListenerTest.java (renamed from core/tests/nfctests/src/android/nfc/NfcControllerAlwaysOnListenerTest.java) | 0 | ||||
-rw-r--r-- | nfc/tests/src/android/nfc/TechListParcelTest.java (renamed from core/tests/nfctests/src/android/nfc/TechListParcelTest.java) | 0 |
99 files changed, 893 insertions, 556 deletions
diff --git a/AconfigFlags.bp b/AconfigFlags.bp index 9eb41c9274e4..c76be6f43372 100644 --- a/AconfigFlags.bp +++ b/AconfigFlags.bp @@ -146,7 +146,7 @@ java_aconfig_library { aconfig_declarations { name: "android.nfc.flags-aconfig", package: "android.nfc", - srcs: ["core/java/android/nfc/*.aconfig"], + srcs: ["nfc/java/android/nfc/*.aconfig"], } cc_aconfig_library { @@ -164,7 +164,7 @@ cc_aconfig_library { java_aconfig_library { name: "android.nfc.flags-aconfig-java", aconfig_declarations: "android.nfc.flags-aconfig", - min_sdk_version: "VanillaIceCream", + min_sdk_version: "34", apex_available: [ "//apex_available:platform", "com.android.nfcservices", diff --git a/Android.bp b/Android.bp index 2113e4b85248..6f4593b1595d 100644 --- a/Android.bp +++ b/Android.bp @@ -427,7 +427,6 @@ java_library { name: "framework-non-updatable-unbundled-impl-libs", static_libs: [ "framework-location.impl", - "framework-nfc.impl", ], sdk_version: "core_platform", installable: false, diff --git a/api/ApiDocs.bp b/api/ApiDocs.bp index d7e25834905c..62f0b6e9a2e0 100644 --- a/api/ApiDocs.bp +++ b/api/ApiDocs.bp @@ -51,6 +51,7 @@ stubs_defaults { ":framework-graphics-srcs", ":framework-mediaprovider-sources", ":framework-nearby-sources", + ":framework-nfc-updatable-sources", ":framework-ondevicepersonalization-sources", ":framework-permission-sources", ":framework-permission-s-sources", diff --git a/api/StubLibraries.bp b/api/StubLibraries.bp index ec4fc46a76fb..59c01284ab27 100644 --- a/api/StubLibraries.bp +++ b/api/StubLibraries.bp @@ -779,7 +779,6 @@ java_defaults { api_contributions: [ "framework-virtualization.stubs.source.test.api.contribution", "framework-location.stubs.source.test.api.contribution", - "framework-nfc.stubs.source.test.api.contribution", ], } diff --git a/api/api.go b/api/api.go index a632582ce76d..fa2be21db09f 100644 --- a/api/api.go +++ b/api/api.go @@ -31,7 +31,6 @@ const conscrypt = "conscrypt.module.public.api" const i18n = "i18n.module.public.api" const virtualization = "framework-virtualization" const location = "framework-location" -const nfc = "framework-nfc" var core_libraries_modules = []string{art, conscrypt, i18n} @@ -43,7 +42,7 @@ var core_libraries_modules = []string{art, conscrypt, i18n} // APIs. // In addition, the modules in this list are allowed to contribute to test APIs // stubs. -var non_updatable_modules = []string{virtualization, location, nfc} +var non_updatable_modules = []string{virtualization, location} // The intention behind this soong plugin is to generate a number of "merged" // API-related modules that would otherwise require a large amount of very diff --git a/core/api/current.txt b/core/api/current.txt index 038b47057bda..ea1cd21d5aee 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -29047,444 +29047,6 @@ package android.net.vcn { } -package android.nfc { - - public final class AvailableNfcAntenna implements android.os.Parcelable { - ctor public AvailableNfcAntenna(int, int); - method public int describeContents(); - method public int getLocationX(); - method public int getLocationY(); - method public void writeToParcel(@NonNull android.os.Parcel, int); - field @NonNull public static final android.os.Parcelable.Creator<android.nfc.AvailableNfcAntenna> CREATOR; - } - - public class FormatException extends java.lang.Exception { - ctor public FormatException(); - ctor public FormatException(String); - ctor public FormatException(String, Throwable); - } - - public final class NdefMessage implements android.os.Parcelable { - ctor public NdefMessage(byte[]) throws android.nfc.FormatException; - ctor public NdefMessage(android.nfc.NdefRecord, android.nfc.NdefRecord...); - ctor public NdefMessage(android.nfc.NdefRecord[]); - method public int describeContents(); - method public int getByteArrayLength(); - method public android.nfc.NdefRecord[] getRecords(); - method public byte[] toByteArray(); - method public void writeToParcel(android.os.Parcel, int); - field @NonNull public static final android.os.Parcelable.Creator<android.nfc.NdefMessage> CREATOR; - } - - public final class NdefRecord implements android.os.Parcelable { - ctor public NdefRecord(short, byte[], byte[], byte[]); - ctor @Deprecated public NdefRecord(byte[]) throws android.nfc.FormatException; - method public static android.nfc.NdefRecord createApplicationRecord(String); - method public static android.nfc.NdefRecord createExternal(String, String, byte[]); - method public static android.nfc.NdefRecord createMime(String, byte[]); - method public static android.nfc.NdefRecord createTextRecord(String, String); - method public static android.nfc.NdefRecord createUri(android.net.Uri); - method public static android.nfc.NdefRecord createUri(String); - method public int describeContents(); - method public byte[] getId(); - method public byte[] getPayload(); - method public short getTnf(); - method public byte[] getType(); - method @Deprecated public byte[] toByteArray(); - method public String toMimeType(); - method public android.net.Uri toUri(); - method public void writeToParcel(android.os.Parcel, int); - field @NonNull public static final android.os.Parcelable.Creator<android.nfc.NdefRecord> CREATOR; - field public static final byte[] RTD_ALTERNATIVE_CARRIER; - field public static final byte[] RTD_HANDOVER_CARRIER; - field public static final byte[] RTD_HANDOVER_REQUEST; - field public static final byte[] RTD_HANDOVER_SELECT; - field public static final byte[] RTD_SMART_POSTER; - field public static final byte[] RTD_TEXT; - field public static final byte[] RTD_URI; - field public static final short TNF_ABSOLUTE_URI = 3; // 0x3 - field public static final short TNF_EMPTY = 0; // 0x0 - field public static final short TNF_EXTERNAL_TYPE = 4; // 0x4 - field public static final short TNF_MIME_MEDIA = 2; // 0x2 - field public static final short TNF_UNCHANGED = 6; // 0x6 - field public static final short TNF_UNKNOWN = 5; // 0x5 - field public static final short TNF_WELL_KNOWN = 1; // 0x1 - } - - public final class NfcAdapter { - method @FlaggedApi("android.nfc.nfc_observe_mode") public boolean allowTransaction(); - method public void disableForegroundDispatch(android.app.Activity); - method public void disableReaderMode(android.app.Activity); - method @FlaggedApi("android.nfc.nfc_observe_mode") public boolean disallowTransaction(); - method public void enableForegroundDispatch(android.app.Activity, android.app.PendingIntent, android.content.IntentFilter[], String[][]); - method public void enableReaderMode(android.app.Activity, android.nfc.NfcAdapter.ReaderCallback, int, android.os.Bundle); - method public static android.nfc.NfcAdapter getDefaultAdapter(android.content.Context); - method @Nullable public android.nfc.NfcAntennaInfo getNfcAntennaInfo(); - method public boolean ignore(android.nfc.Tag, int, android.nfc.NfcAdapter.OnTagRemovedListener, android.os.Handler); - method public boolean isEnabled(); - method @FlaggedApi("android.nfc.nfc_observe_mode") public boolean isObserveModeSupported(); - method @FlaggedApi("android.nfc.enable_nfc_reader_option") public boolean isReaderOptionEnabled(); - method @FlaggedApi("android.nfc.enable_nfc_reader_option") public boolean isReaderOptionSupported(); - method public boolean isSecureNfcEnabled(); - method public boolean isSecureNfcSupported(); - method @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public void resetDiscoveryTechnology(@NonNull android.app.Activity); - method @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public void setDiscoveryTechnology(@NonNull android.app.Activity, int, int); - field public static final String ACTION_ADAPTER_STATE_CHANGED = "android.nfc.action.ADAPTER_STATE_CHANGED"; - field public static final String ACTION_NDEF_DISCOVERED = "android.nfc.action.NDEF_DISCOVERED"; - field @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public static final String ACTION_PREFERRED_PAYMENT_CHANGED = "android.nfc.action.PREFERRED_PAYMENT_CHANGED"; - field public static final String ACTION_TAG_DISCOVERED = "android.nfc.action.TAG_DISCOVERED"; - field public static final String ACTION_TECH_DISCOVERED = "android.nfc.action.TECH_DISCOVERED"; - field @RequiresPermission(android.Manifest.permission.NFC_TRANSACTION_EVENT) public static final String ACTION_TRANSACTION_DETECTED = "android.nfc.action.TRANSACTION_DETECTED"; - field public static final String EXTRA_ADAPTER_STATE = "android.nfc.extra.ADAPTER_STATE"; - field public static final String EXTRA_AID = "android.nfc.extra.AID"; - field public static final String EXTRA_DATA = "android.nfc.extra.DATA"; - field public static final String EXTRA_ID = "android.nfc.extra.ID"; - field public static final String EXTRA_NDEF_MESSAGES = "android.nfc.extra.NDEF_MESSAGES"; - field public static final String EXTRA_PREFERRED_PAYMENT_CHANGED_REASON = "android.nfc.extra.PREFERRED_PAYMENT_CHANGED_REASON"; - field public static final String EXTRA_READER_PRESENCE_CHECK_DELAY = "presence"; - field public static final String EXTRA_SECURE_ELEMENT_NAME = "android.nfc.extra.SECURE_ELEMENT_NAME"; - field public static final String EXTRA_TAG = "android.nfc.extra.TAG"; - field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_LISTEN_DISABLE = 0; // 0x0 - field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_LISTEN_KEEP = -1; // 0xffffffff - field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_LISTEN_NFC_PASSIVE_A = 1; // 0x1 - field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_LISTEN_NFC_PASSIVE_B = 2; // 0x2 - field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_LISTEN_NFC_PASSIVE_F = 4; // 0x4 - field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_READER_DISABLE = 0; // 0x0 - field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_READER_KEEP = -1; // 0xffffffff - field public static final int FLAG_READER_NFC_A = 1; // 0x1 - field public static final int FLAG_READER_NFC_B = 2; // 0x2 - field public static final int FLAG_READER_NFC_BARCODE = 16; // 0x10 - field public static final int FLAG_READER_NFC_F = 4; // 0x4 - field public static final int FLAG_READER_NFC_V = 8; // 0x8 - field public static final int FLAG_READER_NO_PLATFORM_SOUNDS = 256; // 0x100 - field public static final int FLAG_READER_SKIP_NDEF_CHECK = 128; // 0x80 - field public static final int PREFERRED_PAYMENT_CHANGED = 2; // 0x2 - field public static final int PREFERRED_PAYMENT_LOADED = 1; // 0x1 - field public static final int PREFERRED_PAYMENT_UPDATED = 3; // 0x3 - field public static final int STATE_OFF = 1; // 0x1 - field public static final int STATE_ON = 3; // 0x3 - field public static final int STATE_TURNING_OFF = 4; // 0x4 - field public static final int STATE_TURNING_ON = 2; // 0x2 - } - - @Deprecated public static interface NfcAdapter.CreateBeamUrisCallback { - method @Deprecated public android.net.Uri[] createBeamUris(android.nfc.NfcEvent); - } - - @Deprecated public static interface NfcAdapter.CreateNdefMessageCallback { - method @Deprecated public android.nfc.NdefMessage createNdefMessage(android.nfc.NfcEvent); - } - - @Deprecated public static interface NfcAdapter.OnNdefPushCompleteCallback { - method @Deprecated public void onNdefPushComplete(android.nfc.NfcEvent); - } - - public static interface NfcAdapter.OnTagRemovedListener { - method public void onTagRemoved(); - } - - public static interface NfcAdapter.ReaderCallback { - method public void onTagDiscovered(android.nfc.Tag); - } - - public final class NfcAntennaInfo implements android.os.Parcelable { - ctor public NfcAntennaInfo(int, int, boolean, @NonNull java.util.List<android.nfc.AvailableNfcAntenna>); - method public int describeContents(); - method @NonNull public java.util.List<android.nfc.AvailableNfcAntenna> getAvailableNfcAntennas(); - method public int getDeviceHeight(); - method public int getDeviceWidth(); - method public boolean isDeviceFoldable(); - method public void writeToParcel(@NonNull android.os.Parcel, int); - field @NonNull public static final android.os.Parcelable.Creator<android.nfc.NfcAntennaInfo> CREATOR; - } - - public final class NfcEvent { - field public final android.nfc.NfcAdapter nfcAdapter; - field public final int peerLlcpMajorVersion; - field public final int peerLlcpMinorVersion; - } - - public final class NfcManager { - method public android.nfc.NfcAdapter getDefaultAdapter(); - } - - public final class Tag implements android.os.Parcelable { - method public int describeContents(); - method public byte[] getId(); - method public String[] getTechList(); - method public void writeToParcel(android.os.Parcel, int); - field @NonNull public static final android.os.Parcelable.Creator<android.nfc.Tag> CREATOR; - } - - public class TagLostException extends java.io.IOException { - ctor public TagLostException(); - ctor public TagLostException(String); - } - -} - -package android.nfc.cardemulation { - - public final class CardEmulation { - method public boolean categoryAllowsForegroundPreference(String); - method @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public java.util.List<java.lang.String> getAidsForPreferredPaymentService(); - method public java.util.List<java.lang.String> getAidsForService(android.content.ComponentName, String); - method @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public CharSequence getDescriptionForPreferredPaymentService(); - method public static android.nfc.cardemulation.CardEmulation getInstance(android.nfc.NfcAdapter); - method @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public String getRouteDestinationForPreferredPaymentService(); - method public int getSelectionModeForCategory(String); - method public boolean isDefaultServiceForAid(android.content.ComponentName, String); - method public boolean isDefaultServiceForCategory(android.content.ComponentName, String); - method public boolean registerAidsForService(android.content.ComponentName, String, java.util.List<java.lang.String>); - method public boolean removeAidsForService(android.content.ComponentName, String); - method @NonNull @RequiresPermission(android.Manifest.permission.NFC) public boolean setOffHostForService(@NonNull android.content.ComponentName, @NonNull String); - method public boolean setPreferredService(android.app.Activity, android.content.ComponentName); - method @FlaggedApi("android.nfc.nfc_observe_mode") public boolean setServiceObserveModeDefault(@NonNull android.content.ComponentName, boolean); - method public boolean supportsAidPrefixRegistration(); - method @NonNull @RequiresPermission(android.Manifest.permission.NFC) public boolean unsetOffHostForService(@NonNull android.content.ComponentName); - method public boolean unsetPreferredService(android.app.Activity); - field public static final String ACTION_CHANGE_DEFAULT = "android.nfc.cardemulation.action.ACTION_CHANGE_DEFAULT"; - field public static final String CATEGORY_OTHER = "other"; - field public static final String CATEGORY_PAYMENT = "payment"; - field public static final String EXTRA_CATEGORY = "category"; - field public static final String EXTRA_SERVICE_COMPONENT = "component"; - field public static final int SELECTION_MODE_ALWAYS_ASK = 1; // 0x1 - field public static final int SELECTION_MODE_ASK_IF_CONFLICT = 2; // 0x2 - field public static final int SELECTION_MODE_PREFER_DEFAULT = 0; // 0x0 - } - - public abstract class HostApduService extends android.app.Service { - ctor public HostApduService(); - method public final void notifyUnhandled(); - method public final android.os.IBinder onBind(android.content.Intent); - method public abstract void onDeactivated(int); - method public abstract byte[] processCommandApdu(byte[], android.os.Bundle); - method @FlaggedApi("android.nfc.nfc_read_polling_loop") public void processPollingFrames(@NonNull java.util.List<android.os.Bundle>); - method public final void sendResponseApdu(byte[]); - field public static final int DEACTIVATION_DESELECTED = 1; // 0x1 - field public static final int DEACTIVATION_LINK_LOSS = 0; // 0x0 - field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final String POLLING_LOOP_DATA_KEY = "android.nfc.cardemulation.DATA"; - field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final String POLLING_LOOP_GAIN_KEY = "android.nfc.cardemulation.GAIN"; - field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final String POLLING_LOOP_TIMESTAMP_KEY = "android.nfc.cardemulation.TIMESTAMP"; - field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final char POLLING_LOOP_TYPE_A = 65; // 0x0041 'A' - field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final char POLLING_LOOP_TYPE_B = 66; // 0x0042 'B' - field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final char POLLING_LOOP_TYPE_F = 70; // 0x0046 'F' - field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final String POLLING_LOOP_TYPE_KEY = "android.nfc.cardemulation.TYPE"; - field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final char POLLING_LOOP_TYPE_OFF = 88; // 0x0058 'X' - field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final char POLLING_LOOP_TYPE_ON = 79; // 0x004f 'O' - field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final char POLLING_LOOP_TYPE_UNKNOWN = 85; // 0x0055 'U' - field public static final String SERVICE_INTERFACE = "android.nfc.cardemulation.action.HOST_APDU_SERVICE"; - field public static final String SERVICE_META_DATA = "android.nfc.cardemulation.host_apdu_service"; - } - - public abstract class HostNfcFService extends android.app.Service { - ctor public HostNfcFService(); - method public final android.os.IBinder onBind(android.content.Intent); - method public abstract void onDeactivated(int); - method public abstract byte[] processNfcFPacket(byte[], android.os.Bundle); - method public final void sendResponsePacket(byte[]); - field public static final int DEACTIVATION_LINK_LOSS = 0; // 0x0 - field public static final String SERVICE_INTERFACE = "android.nfc.cardemulation.action.HOST_NFCF_SERVICE"; - field public static final String SERVICE_META_DATA = "android.nfc.cardemulation.host_nfcf_service"; - } - - public final class NfcFCardEmulation { - method public boolean disableService(android.app.Activity) throws java.lang.RuntimeException; - method public boolean enableService(android.app.Activity, android.content.ComponentName) throws java.lang.RuntimeException; - method public static android.nfc.cardemulation.NfcFCardEmulation getInstance(android.nfc.NfcAdapter); - method public String getNfcid2ForService(android.content.ComponentName) throws java.lang.RuntimeException; - method public String getSystemCodeForService(android.content.ComponentName) throws java.lang.RuntimeException; - method public boolean registerSystemCodeForService(android.content.ComponentName, String) throws java.lang.RuntimeException; - method public boolean setNfcid2ForService(android.content.ComponentName, String) throws java.lang.RuntimeException; - method public boolean unregisterSystemCodeForService(android.content.ComponentName) throws java.lang.RuntimeException; - } - - public abstract class OffHostApduService extends android.app.Service { - ctor public OffHostApduService(); - field public static final String SERVICE_INTERFACE = "android.nfc.cardemulation.action.OFF_HOST_APDU_SERVICE"; - field public static final String SERVICE_META_DATA = "android.nfc.cardemulation.off_host_apdu_service"; - } - -} - -package android.nfc.tech { - - public final class IsoDep implements android.nfc.tech.TagTechnology { - method public void close() throws java.io.IOException; - method public void connect() throws java.io.IOException; - method public static android.nfc.tech.IsoDep get(android.nfc.Tag); - method public byte[] getHiLayerResponse(); - method public byte[] getHistoricalBytes(); - method public int getMaxTransceiveLength(); - method public android.nfc.Tag getTag(); - method public int getTimeout(); - method public boolean isConnected(); - method public boolean isExtendedLengthApduSupported(); - method public void setTimeout(int); - method public byte[] transceive(byte[]) throws java.io.IOException; - } - - public final class MifareClassic implements android.nfc.tech.TagTechnology { - method public boolean authenticateSectorWithKeyA(int, byte[]) throws java.io.IOException; - method public boolean authenticateSectorWithKeyB(int, byte[]) throws java.io.IOException; - method public int blockToSector(int); - method public void close() throws java.io.IOException; - method public void connect() throws java.io.IOException; - method public void decrement(int, int) throws java.io.IOException; - method public static android.nfc.tech.MifareClassic get(android.nfc.Tag); - method public int getBlockCount(); - method public int getBlockCountInSector(int); - method public int getMaxTransceiveLength(); - method public int getSectorCount(); - method public int getSize(); - method public android.nfc.Tag getTag(); - method public int getTimeout(); - method public int getType(); - method public void increment(int, int) throws java.io.IOException; - method public boolean isConnected(); - method public byte[] readBlock(int) throws java.io.IOException; - method public void restore(int) throws java.io.IOException; - method public int sectorToBlock(int); - method public void setTimeout(int); - method public byte[] transceive(byte[]) throws java.io.IOException; - method public void transfer(int) throws java.io.IOException; - method public void writeBlock(int, byte[]) throws java.io.IOException; - field public static final int BLOCK_SIZE = 16; // 0x10 - field public static final byte[] KEY_DEFAULT; - field public static final byte[] KEY_MIFARE_APPLICATION_DIRECTORY; - field public static final byte[] KEY_NFC_FORUM; - field public static final int SIZE_1K = 1024; // 0x400 - field public static final int SIZE_2K = 2048; // 0x800 - field public static final int SIZE_4K = 4096; // 0x1000 - field public static final int SIZE_MINI = 320; // 0x140 - field public static final int TYPE_CLASSIC = 0; // 0x0 - field public static final int TYPE_PLUS = 1; // 0x1 - field public static final int TYPE_PRO = 2; // 0x2 - field public static final int TYPE_UNKNOWN = -1; // 0xffffffff - } - - public final class MifareUltralight implements android.nfc.tech.TagTechnology { - method public void close() throws java.io.IOException; - method public void connect() throws java.io.IOException; - method public static android.nfc.tech.MifareUltralight get(android.nfc.Tag); - method public int getMaxTransceiveLength(); - method public android.nfc.Tag getTag(); - method public int getTimeout(); - method public int getType(); - method public boolean isConnected(); - method public byte[] readPages(int) throws java.io.IOException; - method public void setTimeout(int); - method public byte[] transceive(byte[]) throws java.io.IOException; - method public void writePage(int, byte[]) throws java.io.IOException; - field public static final int PAGE_SIZE = 4; // 0x4 - field public static final int TYPE_ULTRALIGHT = 1; // 0x1 - field public static final int TYPE_ULTRALIGHT_C = 2; // 0x2 - field public static final int TYPE_UNKNOWN = -1; // 0xffffffff - } - - public final class Ndef implements android.nfc.tech.TagTechnology { - method public boolean canMakeReadOnly(); - method public void close() throws java.io.IOException; - method public void connect() throws java.io.IOException; - method public static android.nfc.tech.Ndef get(android.nfc.Tag); - method public android.nfc.NdefMessage getCachedNdefMessage(); - method public int getMaxSize(); - method public android.nfc.NdefMessage getNdefMessage() throws android.nfc.FormatException, java.io.IOException; - method public android.nfc.Tag getTag(); - method public String getType(); - method public boolean isConnected(); - method public boolean isWritable(); - method public boolean makeReadOnly() throws java.io.IOException; - method public void writeNdefMessage(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException; - field public static final String MIFARE_CLASSIC = "com.nxp.ndef.mifareclassic"; - field public static final String NFC_FORUM_TYPE_1 = "org.nfcforum.ndef.type1"; - field public static final String NFC_FORUM_TYPE_2 = "org.nfcforum.ndef.type2"; - field public static final String NFC_FORUM_TYPE_3 = "org.nfcforum.ndef.type3"; - field public static final String NFC_FORUM_TYPE_4 = "org.nfcforum.ndef.type4"; - } - - public final class NdefFormatable implements android.nfc.tech.TagTechnology { - method public void close() throws java.io.IOException; - method public void connect() throws java.io.IOException; - method public void format(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException; - method public void formatReadOnly(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException; - method public static android.nfc.tech.NdefFormatable get(android.nfc.Tag); - method public android.nfc.Tag getTag(); - method public boolean isConnected(); - } - - public final class NfcA implements android.nfc.tech.TagTechnology { - method public void close() throws java.io.IOException; - method public void connect() throws java.io.IOException; - method public static android.nfc.tech.NfcA get(android.nfc.Tag); - method public byte[] getAtqa(); - method public int getMaxTransceiveLength(); - method public short getSak(); - method public android.nfc.Tag getTag(); - method public int getTimeout(); - method public boolean isConnected(); - method public void setTimeout(int); - method public byte[] transceive(byte[]) throws java.io.IOException; - } - - public final class NfcB implements android.nfc.tech.TagTechnology { - method public void close() throws java.io.IOException; - method public void connect() throws java.io.IOException; - method public static android.nfc.tech.NfcB get(android.nfc.Tag); - method public byte[] getApplicationData(); - method public int getMaxTransceiveLength(); - method public byte[] getProtocolInfo(); - method public android.nfc.Tag getTag(); - method public boolean isConnected(); - method public byte[] transceive(byte[]) throws java.io.IOException; - } - - public final class NfcBarcode implements android.nfc.tech.TagTechnology { - method public void close() throws java.io.IOException; - method public void connect() throws java.io.IOException; - method public static android.nfc.tech.NfcBarcode get(android.nfc.Tag); - method public byte[] getBarcode(); - method public android.nfc.Tag getTag(); - method public int getType(); - method public boolean isConnected(); - field public static final int TYPE_KOVIO = 1; // 0x1 - field public static final int TYPE_UNKNOWN = -1; // 0xffffffff - } - - public final class NfcF implements android.nfc.tech.TagTechnology { - method public void close() throws java.io.IOException; - method public void connect() throws java.io.IOException; - method public static android.nfc.tech.NfcF get(android.nfc.Tag); - method public byte[] getManufacturer(); - method public int getMaxTransceiveLength(); - method public byte[] getSystemCode(); - method public android.nfc.Tag getTag(); - method public int getTimeout(); - method public boolean isConnected(); - method public void setTimeout(int); - method public byte[] transceive(byte[]) throws java.io.IOException; - } - - public final class NfcV implements android.nfc.tech.TagTechnology { - method public void close() throws java.io.IOException; - method public void connect() throws java.io.IOException; - method public static android.nfc.tech.NfcV get(android.nfc.Tag); - method public byte getDsfId(); - method public int getMaxTransceiveLength(); - method public byte getResponseFlags(); - method public android.nfc.Tag getTag(); - method public boolean isConnected(); - method public byte[] transceive(byte[]) throws java.io.IOException; - } - - public interface TagTechnology extends java.io.Closeable { - method public void connect() throws java.io.IOException; - method public android.nfc.Tag getTag(); - method public boolean isConnected(); - } - -} - package android.opengl { public class EGL14 { diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt index 91c082a1692d..2940ca10e55b 100644 --- a/core/api/module-lib-current.txt +++ b/core/api/module-lib-current.txt @@ -356,11 +356,6 @@ package android.net.wifi { package android.nfc { - public class NfcFrameworkInitializer { - method public static void registerServiceWrappers(); - method public static void setNfcServiceManager(@NonNull android.nfc.NfcServiceManager); - } - public class NfcServiceManager { method @NonNull public android.nfc.NfcServiceManager.ServiceRegisterer getNfcManagerServiceRegisterer(); } diff --git a/core/api/removed.txt b/core/api/removed.txt index 8b3696a1e6d9..1fa1e89fb46e 100644 --- a/core/api/removed.txt +++ b/core/api/removed.txt @@ -252,22 +252,6 @@ package android.net { } -package android.nfc { - - public final class NfcAdapter { - method @Deprecated public void disableForegroundNdefPush(android.app.Activity); - method @Deprecated public void enableForegroundNdefPush(android.app.Activity, android.nfc.NdefMessage); - method @Deprecated public boolean invokeBeam(android.app.Activity); - method @Deprecated public boolean isNdefPushEnabled(); - method @Deprecated public void setBeamPushUris(android.net.Uri[], android.app.Activity); - method @Deprecated public void setBeamPushUrisCallback(android.nfc.NfcAdapter.CreateBeamUrisCallback, android.app.Activity); - method @Deprecated public void setNdefPushMessage(android.nfc.NdefMessage, android.app.Activity, android.app.Activity...); - method @Deprecated public void setNdefPushMessageCallback(android.nfc.NfcAdapter.CreateNdefMessageCallback, android.app.Activity, android.app.Activity...); - method @Deprecated public void setOnNdefPushCompleteCallback(android.nfc.NfcAdapter.OnNdefPushCompleteCallback, android.app.Activity, android.app.Activity...); - } - -} - package android.os { public class BatteryManager { diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 8eca0fe4b775..34c620f4a13c 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -10236,42 +10236,6 @@ package android.net.wifi.sharedconnectivity.service { } -package android.nfc { - - public final class NfcAdapter { - method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean addNfcUnlockHandler(android.nfc.NfcAdapter.NfcUnlockHandler, String[]); - method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean disable(); - method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean disable(boolean); - method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enable(); - method @FlaggedApi("android.nfc.enable_nfc_reader_option") @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enableReaderOption(boolean); - method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enableSecureNfc(boolean); - method @FlaggedApi("android.nfc.enable_nfc_mainline") public int getAdapterState(); - method @NonNull @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public java.util.Map<java.lang.String,java.lang.Boolean> getTagIntentAppPreferenceForUser(int); - method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public boolean isControllerAlwaysOn(); - method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public boolean isControllerAlwaysOnSupported(); - method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean isTagIntentAppPreferenceSupported(); - method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public void registerControllerAlwaysOnListener(@NonNull java.util.concurrent.Executor, @NonNull android.nfc.NfcAdapter.ControllerAlwaysOnListener); - method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean removeNfcUnlockHandler(android.nfc.NfcAdapter.NfcUnlockHandler); - method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public boolean setControllerAlwaysOn(boolean); - method @FlaggedApi("android.nfc.enable_nfc_mainline") @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public void setReaderMode(boolean); - method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public int setTagIntentAppPreferenceForUser(int, @NonNull String, boolean); - method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public void unregisterControllerAlwaysOnListener(@NonNull android.nfc.NfcAdapter.ControllerAlwaysOnListener); - field @FlaggedApi("android.nfc.enable_nfc_mainline") public static final String ACTION_REQUIRE_UNLOCK_FOR_NFC = "android.nfc.action.REQUIRE_UNLOCK_FOR_NFC"; - field public static final int TAG_INTENT_APP_PREF_RESULT_PACKAGE_NOT_FOUND = -1; // 0xffffffff - field public static final int TAG_INTENT_APP_PREF_RESULT_SUCCESS = 0; // 0x0 - field public static final int TAG_INTENT_APP_PREF_RESULT_UNAVAILABLE = -2; // 0xfffffffe - } - - public static interface NfcAdapter.ControllerAlwaysOnListener { - method public void onControllerAlwaysOnChanged(boolean); - } - - public static interface NfcAdapter.NfcUnlockHandler { - method public boolean onUnlockAttempted(android.nfc.Tag); - } - -} - package android.nfc.cardemulation { @FlaggedApi("android.nfc.enable_nfc_mainline") public final class AidGroup implements android.os.Parcelable { @@ -10320,10 +10284,6 @@ package android.nfc.cardemulation { field @FlaggedApi("android.nfc.enable_nfc_mainline") @NonNull public static final android.os.Parcelable.Creator<android.nfc.cardemulation.ApduServiceInfo> CREATOR; } - public final class CardEmulation { - method @FlaggedApi("android.nfc.enable_nfc_mainline") @NonNull public java.util.List<android.nfc.cardemulation.ApduServiceInfo> getServices(@NonNull String, int); - } - @FlaggedApi("android.nfc.enable_nfc_mainline") public final class NfcFServiceInfo implements android.os.Parcelable { ctor @FlaggedApi("android.nfc.enable_nfc_mainline") public NfcFServiceInfo(@NonNull android.content.pm.PackageManager, @NonNull android.content.pm.ResolveInfo) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method @FlaggedApi("android.nfc.enable_nfc_mainline") public int describeContents(); diff --git a/core/api/system-lint-baseline.txt b/core/api/system-lint-baseline.txt index 1e9e9be881d3..9eddab5423e5 100644 --- a/core/api/system-lint-baseline.txt +++ b/core/api/system-lint-baseline.txt @@ -173,16 +173,6 @@ SamShouldBeLast: android.media.session.MediaSessionManager#addOnActiveSessionsCh SAM-compatible parameters (such as parameter 1, "sessionListener", in android.media.session.MediaSessionManager.addOnActiveSessionsChangedListener) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions SamShouldBeLast: android.media.session.MediaSessionManager#addOnSession2TokensChangedListener(android.media.session.MediaSessionManager.OnSession2TokensChangedListener, android.os.Handler): SAM-compatible parameters (such as parameter 1, "listener", in android.media.session.MediaSessionManager.addOnSession2TokensChangedListener) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions -SamShouldBeLast: android.nfc.NfcAdapter#enableReaderMode(android.app.Activity, android.nfc.NfcAdapter.ReaderCallback, int, android.os.Bundle): - SAM-compatible parameters (such as parameter 2, "callback", in android.nfc.NfcAdapter.enableReaderMode) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions -SamShouldBeLast: android.nfc.NfcAdapter#ignore(android.nfc.Tag, int, android.nfc.NfcAdapter.OnTagRemovedListener, android.os.Handler): - SAM-compatible parameters (such as parameter 3, "tagRemovedListener", in android.nfc.NfcAdapter.ignore) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions -SamShouldBeLast: android.nfc.NfcAdapter#setBeamPushUrisCallback(android.nfc.NfcAdapter.CreateBeamUrisCallback, android.app.Activity): - SAM-compatible parameters (such as parameter 1, "callback", in android.nfc.NfcAdapter.setBeamPushUrisCallback) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions -SamShouldBeLast: android.nfc.NfcAdapter#setNdefPushMessageCallback(android.nfc.NfcAdapter.CreateNdefMessageCallback, android.app.Activity, android.app.Activity...): - SAM-compatible parameters (such as parameter 1, "callback", in android.nfc.NfcAdapter.setNdefPushMessageCallback) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions -SamShouldBeLast: android.nfc.NfcAdapter#setOnNdefPushCompleteCallback(android.nfc.NfcAdapter.OnNdefPushCompleteCallback, android.app.Activity, android.app.Activity...): - SAM-compatible parameters (such as parameter 1, "callback", in android.nfc.NfcAdapter.setOnNdefPushCompleteCallback) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions SamShouldBeLast: android.os.Binder#attachInterface(android.os.IInterface, String): SAM-compatible parameters (such as parameter 1, "owner", in android.os.Binder.attachInterface) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions SamShouldBeLast: android.os.Binder#linkToDeath(android.os.IBinder.DeathRecipient, int): diff --git a/core/api/system-removed.txt b/core/api/system-removed.txt index 1c10356c6b03..2c5acf182d51 100644 --- a/core/api/system-removed.txt +++ b/core/api/system-removed.txt @@ -140,17 +140,6 @@ package android.media.tv { } -package android.nfc { - - public final class NfcAdapter { - method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean disableNdefPush(); - method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enableNdefPush(); - method public void setNdefPushMessage(android.nfc.NdefMessage, android.app.Activity, int); - field public static final int FLAG_NDEF_PUSH_NO_CONFIRM = 1; // 0x1 - } - -} - package android.os { public class Build { diff --git a/core/java/Android.bp b/core/java/Android.bp index d0b958ec6da5..0ad621d300ce 100644 --- a/core/java/Android.bp +++ b/core/java/Android.bp @@ -14,20 +14,12 @@ aidl_library { hdrs: ["android/hardware/HardwareBuffer.aidl"], } -// TODO (b/303286040): Remove this once |ENABLE_NFC_MAINLINE_FLAG| is rolled out -filegroup { - name: "framework-core-nfc-infcadapter-sources", - srcs: [ - "android/nfc/INfcAdapter.aidl", - ], - visibility: ["//frameworks/base/services/core"], -} - filegroup { name: "framework-core-sources", srcs: [ "**/*.java", "**/*.aidl", + ":framework-nfc-non-updatable-sources", ], visibility: ["//frameworks/base"], } diff --git a/core/java/android/nfc/TEST_MAPPING b/core/java/android/nfc/TEST_MAPPING deleted file mode 100644 index 5b5ea3790010..000000000000 --- a/core/java/android/nfc/TEST_MAPPING +++ /dev/null @@ -1,10 +0,0 @@ -{ - "presubmit": [ - { - "name": "NfcManagerTests" - }, - { - "name": "CtsNfcTestCases" - } - ] -} diff --git a/core/java/android/nfc/tech/OWNERS b/core/java/android/nfc/tech/OWNERS deleted file mode 100644 index 35e9713f5715..000000000000 --- a/core/java/android/nfc/tech/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -# Bug component: 48448 -include platform/packages/apps/Nfc:/OWNERS diff --git a/core/tests/nfctests/OWNERS b/core/tests/nfctests/OWNERS deleted file mode 100644 index 34b095c7fda0..000000000000 --- a/core/tests/nfctests/OWNERS +++ /dev/null @@ -1 +0,0 @@ -include /core/java/android/nfc/OWNERS diff --git a/nfc-extras/Android.bp b/nfc-extras/Android.bp index cb9ac6fd1d33..1f187e8eab74 100644 --- a/nfc-extras/Android.bp +++ b/nfc-extras/Android.bp @@ -23,9 +23,13 @@ package { default_applicable_licenses: ["frameworks_base_license"], } +// TODO(b/303286040): Deprecate this API surface since this is no longer supported (see ag/443092) java_sdk_library { name: "com.android.nfc_extras", srcs: ["java/**/*.java"], + libs: [ + "framework-nfc.impl" + ], api_packages: ["com.android.nfc_extras"], dist_group: "android", } diff --git a/nfc/Android.bp b/nfc/Android.bp index bf9f47ceb0a7..2090d3397dfe 100644 --- a/nfc/Android.bp +++ b/nfc/Android.bp @@ -10,7 +10,15 @@ package { filegroup { name: "framework-nfc-non-updatable-sources", path: "java", - srcs: [], + srcs: [ + "java/android/nfc/NfcServiceManager.java", + "java/android/nfc/cardemulation/ApduServiceInfo.aidl", + "java/android/nfc/cardemulation/ApduServiceInfo.java", + "java/android/nfc/cardemulation/NfcFServiceInfo.aidl", + "java/android/nfc/cardemulation/NfcFServiceInfo.java", + "java/android/nfc/cardemulation/AidGroup.aidl", + "java/android/nfc/cardemulation/AidGroup.java", + ], } filegroup { @@ -30,10 +38,21 @@ java_sdk_library { libs: [ "unsupportedappusage", // for android.compat.annotation.UnsupportedAppUsage ], + static_libs: [ + "android.nfc.flags-aconfig-java", + ], srcs: [ ":framework-nfc-updatable-sources", + ":framework-nfc-javastream-protos", ], - defaults: ["framework-non-updatable-unbundled-defaults"], + defaults: ["framework-module-defaults"], + sdk_version: "module_current", + min_sdk_version: "34", // should be 35 (making it 34 for compiling for `-next`) + installable: true, + optimize: { + enabled: false, + }, + hostdex: true, // for hiddenapi check permitted_packages: [ "android.nfc", "com.android.nfc", @@ -41,11 +60,18 @@ java_sdk_library { hidden_api_packages: [ "com.android.nfc", ], - aidl: { - include_dirs: [ - // TODO (b/303286040): Remove these when we change to |framework-module-defaults| - "frameworks/base/nfc/java", - "frameworks/base/core/java", - ], + impl_library_visibility: [ + "//frameworks/base:__subpackages__", + "//cts/tests/tests/nfc", + "//packages/apps/Nfc:__subpackages__", + ], + jarjar_rules: ":nfc-jarjar-rules", + lint: { + strict_updatability_linting: true, }, } + +filegroup { + name: "nfc-jarjar-rules", + srcs: ["jarjar-rules.txt"], +} diff --git a/nfc/api/current.txt b/nfc/api/current.txt index d802177e249b..91e460324289 100644 --- a/nfc/api/current.txt +++ b/nfc/api/current.txt @@ -1 +1,439 @@ // Signature format: 2.0 +package android.nfc { + + public final class AvailableNfcAntenna implements android.os.Parcelable { + ctor public AvailableNfcAntenna(int, int); + method public int describeContents(); + method public int getLocationX(); + method public int getLocationY(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.nfc.AvailableNfcAntenna> CREATOR; + } + + public class FormatException extends java.lang.Exception { + ctor public FormatException(); + ctor public FormatException(String); + ctor public FormatException(String, Throwable); + } + + public final class NdefMessage implements android.os.Parcelable { + ctor public NdefMessage(byte[]) throws android.nfc.FormatException; + ctor public NdefMessage(android.nfc.NdefRecord, android.nfc.NdefRecord...); + ctor public NdefMessage(android.nfc.NdefRecord[]); + method public int describeContents(); + method public int getByteArrayLength(); + method public android.nfc.NdefRecord[] getRecords(); + method public byte[] toByteArray(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.nfc.NdefMessage> CREATOR; + } + + public final class NdefRecord implements android.os.Parcelable { + ctor public NdefRecord(short, byte[], byte[], byte[]); + ctor @Deprecated public NdefRecord(byte[]) throws android.nfc.FormatException; + method public static android.nfc.NdefRecord createApplicationRecord(String); + method public static android.nfc.NdefRecord createExternal(String, String, byte[]); + method public static android.nfc.NdefRecord createMime(String, byte[]); + method public static android.nfc.NdefRecord createTextRecord(String, String); + method public static android.nfc.NdefRecord createUri(android.net.Uri); + method public static android.nfc.NdefRecord createUri(String); + method public int describeContents(); + method public byte[] getId(); + method public byte[] getPayload(); + method public short getTnf(); + method public byte[] getType(); + method @Deprecated public byte[] toByteArray(); + method public String toMimeType(); + method public android.net.Uri toUri(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.nfc.NdefRecord> CREATOR; + field public static final byte[] RTD_ALTERNATIVE_CARRIER; + field public static final byte[] RTD_HANDOVER_CARRIER; + field public static final byte[] RTD_HANDOVER_REQUEST; + field public static final byte[] RTD_HANDOVER_SELECT; + field public static final byte[] RTD_SMART_POSTER; + field public static final byte[] RTD_TEXT; + field public static final byte[] RTD_URI; + field public static final short TNF_ABSOLUTE_URI = 3; // 0x3 + field public static final short TNF_EMPTY = 0; // 0x0 + field public static final short TNF_EXTERNAL_TYPE = 4; // 0x4 + field public static final short TNF_MIME_MEDIA = 2; // 0x2 + field public static final short TNF_UNCHANGED = 6; // 0x6 + field public static final short TNF_UNKNOWN = 5; // 0x5 + field public static final short TNF_WELL_KNOWN = 1; // 0x1 + } + + public final class NfcAdapter { + method @FlaggedApi("android.nfc.nfc_observe_mode") public boolean allowTransaction(); + method public void disableForegroundDispatch(android.app.Activity); + method public void disableReaderMode(android.app.Activity); + method @FlaggedApi("android.nfc.nfc_observe_mode") public boolean disallowTransaction(); + method public void enableForegroundDispatch(android.app.Activity, android.app.PendingIntent, android.content.IntentFilter[], String[][]); + method public void enableReaderMode(android.app.Activity, android.nfc.NfcAdapter.ReaderCallback, int, android.os.Bundle); + method public static android.nfc.NfcAdapter getDefaultAdapter(android.content.Context); + method @Nullable public android.nfc.NfcAntennaInfo getNfcAntennaInfo(); + method public boolean ignore(android.nfc.Tag, int, android.nfc.NfcAdapter.OnTagRemovedListener, android.os.Handler); + method public boolean isEnabled(); + method @FlaggedApi("android.nfc.nfc_observe_mode") public boolean isObserveModeSupported(); + method @FlaggedApi("android.nfc.enable_nfc_reader_option") public boolean isReaderOptionEnabled(); + method @FlaggedApi("android.nfc.enable_nfc_reader_option") public boolean isReaderOptionSupported(); + method public boolean isSecureNfcEnabled(); + method public boolean isSecureNfcSupported(); + method @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public void resetDiscoveryTechnology(@NonNull android.app.Activity); + method @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public void setDiscoveryTechnology(@NonNull android.app.Activity, int, int); + field public static final String ACTION_ADAPTER_STATE_CHANGED = "android.nfc.action.ADAPTER_STATE_CHANGED"; + field public static final String ACTION_NDEF_DISCOVERED = "android.nfc.action.NDEF_DISCOVERED"; + field @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public static final String ACTION_PREFERRED_PAYMENT_CHANGED = "android.nfc.action.PREFERRED_PAYMENT_CHANGED"; + field public static final String ACTION_TAG_DISCOVERED = "android.nfc.action.TAG_DISCOVERED"; + field public static final String ACTION_TECH_DISCOVERED = "android.nfc.action.TECH_DISCOVERED"; + field @RequiresPermission(android.Manifest.permission.NFC_TRANSACTION_EVENT) public static final String ACTION_TRANSACTION_DETECTED = "android.nfc.action.TRANSACTION_DETECTED"; + field public static final String EXTRA_ADAPTER_STATE = "android.nfc.extra.ADAPTER_STATE"; + field public static final String EXTRA_AID = "android.nfc.extra.AID"; + field public static final String EXTRA_DATA = "android.nfc.extra.DATA"; + field public static final String EXTRA_ID = "android.nfc.extra.ID"; + field public static final String EXTRA_NDEF_MESSAGES = "android.nfc.extra.NDEF_MESSAGES"; + field public static final String EXTRA_PREFERRED_PAYMENT_CHANGED_REASON = "android.nfc.extra.PREFERRED_PAYMENT_CHANGED_REASON"; + field public static final String EXTRA_READER_PRESENCE_CHECK_DELAY = "presence"; + field public static final String EXTRA_SECURE_ELEMENT_NAME = "android.nfc.extra.SECURE_ELEMENT_NAME"; + field public static final String EXTRA_TAG = "android.nfc.extra.TAG"; + field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_LISTEN_DISABLE = 0; // 0x0 + field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_LISTEN_KEEP = -1; // 0xffffffff + field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_LISTEN_NFC_PASSIVE_A = 1; // 0x1 + field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_LISTEN_NFC_PASSIVE_B = 2; // 0x2 + field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_LISTEN_NFC_PASSIVE_F = 4; // 0x4 + field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_READER_DISABLE = 0; // 0x0 + field @FlaggedApi("android.nfc.enable_nfc_set_discovery_tech") public static final int FLAG_READER_KEEP = -1; // 0xffffffff + field public static final int FLAG_READER_NFC_A = 1; // 0x1 + field public static final int FLAG_READER_NFC_B = 2; // 0x2 + field public static final int FLAG_READER_NFC_BARCODE = 16; // 0x10 + field public static final int FLAG_READER_NFC_F = 4; // 0x4 + field public static final int FLAG_READER_NFC_V = 8; // 0x8 + field public static final int FLAG_READER_NO_PLATFORM_SOUNDS = 256; // 0x100 + field public static final int FLAG_READER_SKIP_NDEF_CHECK = 128; // 0x80 + field public static final int PREFERRED_PAYMENT_CHANGED = 2; // 0x2 + field public static final int PREFERRED_PAYMENT_LOADED = 1; // 0x1 + field public static final int PREFERRED_PAYMENT_UPDATED = 3; // 0x3 + field public static final int STATE_OFF = 1; // 0x1 + field public static final int STATE_ON = 3; // 0x3 + field public static final int STATE_TURNING_OFF = 4; // 0x4 + field public static final int STATE_TURNING_ON = 2; // 0x2 + } + + @Deprecated public static interface NfcAdapter.CreateBeamUrisCallback { + method @Deprecated public android.net.Uri[] createBeamUris(android.nfc.NfcEvent); + } + + @Deprecated public static interface NfcAdapter.CreateNdefMessageCallback { + method @Deprecated public android.nfc.NdefMessage createNdefMessage(android.nfc.NfcEvent); + } + + @Deprecated public static interface NfcAdapter.OnNdefPushCompleteCallback { + method @Deprecated public void onNdefPushComplete(android.nfc.NfcEvent); + } + + public static interface NfcAdapter.OnTagRemovedListener { + method public void onTagRemoved(); + } + + public static interface NfcAdapter.ReaderCallback { + method public void onTagDiscovered(android.nfc.Tag); + } + + public final class NfcAntennaInfo implements android.os.Parcelable { + ctor public NfcAntennaInfo(int, int, boolean, @NonNull java.util.List<android.nfc.AvailableNfcAntenna>); + method public int describeContents(); + method @NonNull public java.util.List<android.nfc.AvailableNfcAntenna> getAvailableNfcAntennas(); + method public int getDeviceHeight(); + method public int getDeviceWidth(); + method public boolean isDeviceFoldable(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.nfc.NfcAntennaInfo> CREATOR; + } + + public final class NfcEvent { + field public final android.nfc.NfcAdapter nfcAdapter; + field public final int peerLlcpMajorVersion; + field public final int peerLlcpMinorVersion; + } + + public final class NfcManager { + method public android.nfc.NfcAdapter getDefaultAdapter(); + } + + public final class Tag implements android.os.Parcelable { + method public int describeContents(); + method public byte[] getId(); + method public String[] getTechList(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.nfc.Tag> CREATOR; + } + + public class TagLostException extends java.io.IOException { + ctor public TagLostException(); + ctor public TagLostException(String); + } + +} + +package android.nfc.cardemulation { + + public final class CardEmulation { + method public boolean categoryAllowsForegroundPreference(String); + method @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public java.util.List<java.lang.String> getAidsForPreferredPaymentService(); + method public java.util.List<java.lang.String> getAidsForService(android.content.ComponentName, String); + method @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public CharSequence getDescriptionForPreferredPaymentService(); + method public static android.nfc.cardemulation.CardEmulation getInstance(android.nfc.NfcAdapter); + method @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public String getRouteDestinationForPreferredPaymentService(); + method public int getSelectionModeForCategory(String); + method public boolean isDefaultServiceForAid(android.content.ComponentName, String); + method public boolean isDefaultServiceForCategory(android.content.ComponentName, String); + method public boolean registerAidsForService(android.content.ComponentName, String, java.util.List<java.lang.String>); + method public boolean removeAidsForService(android.content.ComponentName, String); + method @NonNull @RequiresPermission(android.Manifest.permission.NFC) public boolean setOffHostForService(@NonNull android.content.ComponentName, @NonNull String); + method public boolean setPreferredService(android.app.Activity, android.content.ComponentName); + method @FlaggedApi("android.nfc.nfc_observe_mode") public boolean setServiceObserveModeDefault(@NonNull android.content.ComponentName, boolean); + method public boolean supportsAidPrefixRegistration(); + method @NonNull @RequiresPermission(android.Manifest.permission.NFC) public boolean unsetOffHostForService(@NonNull android.content.ComponentName); + method public boolean unsetPreferredService(android.app.Activity); + field public static final String ACTION_CHANGE_DEFAULT = "android.nfc.cardemulation.action.ACTION_CHANGE_DEFAULT"; + field public static final String CATEGORY_OTHER = "other"; + field public static final String CATEGORY_PAYMENT = "payment"; + field public static final String EXTRA_CATEGORY = "category"; + field public static final String EXTRA_SERVICE_COMPONENT = "component"; + field public static final int SELECTION_MODE_ALWAYS_ASK = 1; // 0x1 + field public static final int SELECTION_MODE_ASK_IF_CONFLICT = 2; // 0x2 + field public static final int SELECTION_MODE_PREFER_DEFAULT = 0; // 0x0 + } + + public abstract class HostApduService extends android.app.Service { + ctor public HostApduService(); + method public final void notifyUnhandled(); + method public final android.os.IBinder onBind(android.content.Intent); + method public abstract void onDeactivated(int); + method public abstract byte[] processCommandApdu(byte[], android.os.Bundle); + method @FlaggedApi("android.nfc.nfc_read_polling_loop") public void processPollingFrames(@NonNull java.util.List<android.os.Bundle>); + method public final void sendResponseApdu(byte[]); + field public static final int DEACTIVATION_DESELECTED = 1; // 0x1 + field public static final int DEACTIVATION_LINK_LOSS = 0; // 0x0 + field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final String POLLING_LOOP_DATA_KEY = "android.nfc.cardemulation.DATA"; + field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final String POLLING_LOOP_GAIN_KEY = "android.nfc.cardemulation.GAIN"; + field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final String POLLING_LOOP_TIMESTAMP_KEY = "android.nfc.cardemulation.TIMESTAMP"; + field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final char POLLING_LOOP_TYPE_A = 65; // 0x0041 'A' + field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final char POLLING_LOOP_TYPE_B = 66; // 0x0042 'B' + field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final char POLLING_LOOP_TYPE_F = 70; // 0x0046 'F' + field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final String POLLING_LOOP_TYPE_KEY = "android.nfc.cardemulation.TYPE"; + field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final char POLLING_LOOP_TYPE_OFF = 88; // 0x0058 'X' + field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final char POLLING_LOOP_TYPE_ON = 79; // 0x004f 'O' + field @FlaggedApi("android.nfc.nfc_read_polling_loop") public static final char POLLING_LOOP_TYPE_UNKNOWN = 85; // 0x0055 'U' + field public static final String SERVICE_INTERFACE = "android.nfc.cardemulation.action.HOST_APDU_SERVICE"; + field public static final String SERVICE_META_DATA = "android.nfc.cardemulation.host_apdu_service"; + } + + public abstract class HostNfcFService extends android.app.Service { + ctor public HostNfcFService(); + method public final android.os.IBinder onBind(android.content.Intent); + method public abstract void onDeactivated(int); + method public abstract byte[] processNfcFPacket(byte[], android.os.Bundle); + method public final void sendResponsePacket(byte[]); + field public static final int DEACTIVATION_LINK_LOSS = 0; // 0x0 + field public static final String SERVICE_INTERFACE = "android.nfc.cardemulation.action.HOST_NFCF_SERVICE"; + field public static final String SERVICE_META_DATA = "android.nfc.cardemulation.host_nfcf_service"; + } + + public final class NfcFCardEmulation { + method public boolean disableService(android.app.Activity) throws java.lang.RuntimeException; + method public boolean enableService(android.app.Activity, android.content.ComponentName) throws java.lang.RuntimeException; + method public static android.nfc.cardemulation.NfcFCardEmulation getInstance(android.nfc.NfcAdapter); + method public String getNfcid2ForService(android.content.ComponentName) throws java.lang.RuntimeException; + method public String getSystemCodeForService(android.content.ComponentName) throws java.lang.RuntimeException; + method public boolean registerSystemCodeForService(android.content.ComponentName, String) throws java.lang.RuntimeException; + method public boolean setNfcid2ForService(android.content.ComponentName, String) throws java.lang.RuntimeException; + method public boolean unregisterSystemCodeForService(android.content.ComponentName) throws java.lang.RuntimeException; + } + + public abstract class OffHostApduService extends android.app.Service { + ctor public OffHostApduService(); + field public static final String SERVICE_INTERFACE = "android.nfc.cardemulation.action.OFF_HOST_APDU_SERVICE"; + field public static final String SERVICE_META_DATA = "android.nfc.cardemulation.off_host_apdu_service"; + } + +} + +package android.nfc.tech { + + public final class IsoDep implements android.nfc.tech.TagTechnology { + method public void close() throws java.io.IOException; + method public void connect() throws java.io.IOException; + method public static android.nfc.tech.IsoDep get(android.nfc.Tag); + method public byte[] getHiLayerResponse(); + method public byte[] getHistoricalBytes(); + method public int getMaxTransceiveLength(); + method public android.nfc.Tag getTag(); + method public int getTimeout(); + method public boolean isConnected(); + method public boolean isExtendedLengthApduSupported(); + method public void setTimeout(int); + method public byte[] transceive(byte[]) throws java.io.IOException; + } + + public final class MifareClassic implements android.nfc.tech.TagTechnology { + method public boolean authenticateSectorWithKeyA(int, byte[]) throws java.io.IOException; + method public boolean authenticateSectorWithKeyB(int, byte[]) throws java.io.IOException; + method public int blockToSector(int); + method public void close() throws java.io.IOException; + method public void connect() throws java.io.IOException; + method public void decrement(int, int) throws java.io.IOException; + method public static android.nfc.tech.MifareClassic get(android.nfc.Tag); + method public int getBlockCount(); + method public int getBlockCountInSector(int); + method public int getMaxTransceiveLength(); + method public int getSectorCount(); + method public int getSize(); + method public android.nfc.Tag getTag(); + method public int getTimeout(); + method public int getType(); + method public void increment(int, int) throws java.io.IOException; + method public boolean isConnected(); + method public byte[] readBlock(int) throws java.io.IOException; + method public void restore(int) throws java.io.IOException; + method public int sectorToBlock(int); + method public void setTimeout(int); + method public byte[] transceive(byte[]) throws java.io.IOException; + method public void transfer(int) throws java.io.IOException; + method public void writeBlock(int, byte[]) throws java.io.IOException; + field public static final int BLOCK_SIZE = 16; // 0x10 + field public static final byte[] KEY_DEFAULT; + field public static final byte[] KEY_MIFARE_APPLICATION_DIRECTORY; + field public static final byte[] KEY_NFC_FORUM; + field public static final int SIZE_1K = 1024; // 0x400 + field public static final int SIZE_2K = 2048; // 0x800 + field public static final int SIZE_4K = 4096; // 0x1000 + field public static final int SIZE_MINI = 320; // 0x140 + field public static final int TYPE_CLASSIC = 0; // 0x0 + field public static final int TYPE_PLUS = 1; // 0x1 + field public static final int TYPE_PRO = 2; // 0x2 + field public static final int TYPE_UNKNOWN = -1; // 0xffffffff + } + + public final class MifareUltralight implements android.nfc.tech.TagTechnology { + method public void close() throws java.io.IOException; + method public void connect() throws java.io.IOException; + method public static android.nfc.tech.MifareUltralight get(android.nfc.Tag); + method public int getMaxTransceiveLength(); + method public android.nfc.Tag getTag(); + method public int getTimeout(); + method public int getType(); + method public boolean isConnected(); + method public byte[] readPages(int) throws java.io.IOException; + method public void setTimeout(int); + method public byte[] transceive(byte[]) throws java.io.IOException; + method public void writePage(int, byte[]) throws java.io.IOException; + field public static final int PAGE_SIZE = 4; // 0x4 + field public static final int TYPE_ULTRALIGHT = 1; // 0x1 + field public static final int TYPE_ULTRALIGHT_C = 2; // 0x2 + field public static final int TYPE_UNKNOWN = -1; // 0xffffffff + } + + public final class Ndef implements android.nfc.tech.TagTechnology { + method public boolean canMakeReadOnly(); + method public void close() throws java.io.IOException; + method public void connect() throws java.io.IOException; + method public static android.nfc.tech.Ndef get(android.nfc.Tag); + method public android.nfc.NdefMessage getCachedNdefMessage(); + method public int getMaxSize(); + method public android.nfc.NdefMessage getNdefMessage() throws android.nfc.FormatException, java.io.IOException; + method public android.nfc.Tag getTag(); + method public String getType(); + method public boolean isConnected(); + method public boolean isWritable(); + method public boolean makeReadOnly() throws java.io.IOException; + method public void writeNdefMessage(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException; + field public static final String MIFARE_CLASSIC = "com.nxp.ndef.mifareclassic"; + field public static final String NFC_FORUM_TYPE_1 = "org.nfcforum.ndef.type1"; + field public static final String NFC_FORUM_TYPE_2 = "org.nfcforum.ndef.type2"; + field public static final String NFC_FORUM_TYPE_3 = "org.nfcforum.ndef.type3"; + field public static final String NFC_FORUM_TYPE_4 = "org.nfcforum.ndef.type4"; + } + + public final class NdefFormatable implements android.nfc.tech.TagTechnology { + method public void close() throws java.io.IOException; + method public void connect() throws java.io.IOException; + method public void format(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException; + method public void formatReadOnly(android.nfc.NdefMessage) throws android.nfc.FormatException, java.io.IOException; + method public static android.nfc.tech.NdefFormatable get(android.nfc.Tag); + method public android.nfc.Tag getTag(); + method public boolean isConnected(); + } + + public final class NfcA implements android.nfc.tech.TagTechnology { + method public void close() throws java.io.IOException; + method public void connect() throws java.io.IOException; + method public static android.nfc.tech.NfcA get(android.nfc.Tag); + method public byte[] getAtqa(); + method public int getMaxTransceiveLength(); + method public short getSak(); + method public android.nfc.Tag getTag(); + method public int getTimeout(); + method public boolean isConnected(); + method public void setTimeout(int); + method public byte[] transceive(byte[]) throws java.io.IOException; + } + + public final class NfcB implements android.nfc.tech.TagTechnology { + method public void close() throws java.io.IOException; + method public void connect() throws java.io.IOException; + method public static android.nfc.tech.NfcB get(android.nfc.Tag); + method public byte[] getApplicationData(); + method public int getMaxTransceiveLength(); + method public byte[] getProtocolInfo(); + method public android.nfc.Tag getTag(); + method public boolean isConnected(); + method public byte[] transceive(byte[]) throws java.io.IOException; + } + + public final class NfcBarcode implements android.nfc.tech.TagTechnology { + method public void close() throws java.io.IOException; + method public void connect() throws java.io.IOException; + method public static android.nfc.tech.NfcBarcode get(android.nfc.Tag); + method public byte[] getBarcode(); + method public android.nfc.Tag getTag(); + method public int getType(); + method public boolean isConnected(); + field public static final int TYPE_KOVIO = 1; // 0x1 + field public static final int TYPE_UNKNOWN = -1; // 0xffffffff + } + + public final class NfcF implements android.nfc.tech.TagTechnology { + method public void close() throws java.io.IOException; + method public void connect() throws java.io.IOException; + method public static android.nfc.tech.NfcF get(android.nfc.Tag); + method public byte[] getManufacturer(); + method public int getMaxTransceiveLength(); + method public byte[] getSystemCode(); + method public android.nfc.Tag getTag(); + method public int getTimeout(); + method public boolean isConnected(); + method public void setTimeout(int); + method public byte[] transceive(byte[]) throws java.io.IOException; + } + + public final class NfcV implements android.nfc.tech.TagTechnology { + method public void close() throws java.io.IOException; + method public void connect() throws java.io.IOException; + method public static android.nfc.tech.NfcV get(android.nfc.Tag); + method public byte getDsfId(); + method public int getMaxTransceiveLength(); + method public byte getResponseFlags(); + method public android.nfc.Tag getTag(); + method public boolean isConnected(); + method public byte[] transceive(byte[]) throws java.io.IOException; + } + + public interface TagTechnology extends java.io.Closeable { + method public void connect() throws java.io.IOException; + method public android.nfc.Tag getTag(); + method public boolean isConnected(); + } + +} + diff --git a/nfc/api/lint-baseline.txt b/nfc/api/lint-baseline.txt new file mode 100644 index 000000000000..ef9aab6e7641 --- /dev/null +++ b/nfc/api/lint-baseline.txt @@ -0,0 +1,95 @@ +// Baseline format: 1.0 +BroadcastBehavior: android.nfc.NfcAdapter#ACTION_ADAPTER_STATE_CHANGED: + Field 'ACTION_ADAPTER_STATE_CHANGED' is missing @BroadcastBehavior +BroadcastBehavior: android.nfc.NfcAdapter#ACTION_PREFERRED_PAYMENT_CHANGED: + Field 'ACTION_PREFERRED_PAYMENT_CHANGED' is missing @BroadcastBehavior +BroadcastBehavior: android.nfc.NfcAdapter#ACTION_TRANSACTION_DETECTED: + Field 'ACTION_TRANSACTION_DETECTED' is missing @BroadcastBehavior + + +MissingNullability: android.nfc.cardemulation.OffHostApduService#onBind(android.content.Intent): + Missing nullability on method `onBind` return +MissingNullability: android.nfc.cardemulation.OffHostApduService#onBind(android.content.Intent) parameter #0: + Missing nullability on parameter `intent` in method `onBind` + + +RequiresPermission: android.nfc.NfcAdapter#disableForegroundDispatch(android.app.Activity): + Method 'disableForegroundDispatch' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.NfcAdapter#enableForegroundDispatch(android.app.Activity, android.app.PendingIntent, android.content.IntentFilter[], String[][]): + Method 'enableForegroundDispatch' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.cardemulation.CardEmulation#isDefaultServiceForAid(android.content.ComponentName, String): + Method 'isDefaultServiceForAid' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.cardemulation.CardEmulation#isDefaultServiceForCategory(android.content.ComponentName, String): + Method 'isDefaultServiceForCategory' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.cardemulation.CardEmulation#setOffHostForService(android.content.ComponentName, String): + Method 'setOffHostForService' documentation mentions permissions already declared by @RequiresPermission +RequiresPermission: android.nfc.tech.IsoDep#getTimeout(): + Method 'getTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.IsoDep#setTimeout(int): + Method 'setTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.IsoDep#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#authenticateSectorWithKeyA(int, byte[]): + Method 'authenticateSectorWithKeyA' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#authenticateSectorWithKeyB(int, byte[]): + Method 'authenticateSectorWithKeyB' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#decrement(int, int): + Method 'decrement' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#getTimeout(): + Method 'getTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#increment(int, int): + Method 'increment' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#readBlock(int): + Method 'readBlock' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#restore(int): + Method 'restore' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#setTimeout(int): + Method 'setTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#transfer(int): + Method 'transfer' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#writeBlock(int, byte[]): + Method 'writeBlock' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareUltralight#getTimeout(): + Method 'getTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareUltralight#readPages(int): + Method 'readPages' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareUltralight#setTimeout(int): + Method 'setTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareUltralight#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareUltralight#writePage(int, byte[]): + Method 'writePage' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.Ndef#getNdefMessage(): + Method 'getNdefMessage' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.Ndef#isWritable(): + Method 'isWritable' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.Ndef#makeReadOnly(): + Method 'makeReadOnly' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.Ndef#writeNdefMessage(android.nfc.NdefMessage): + Method 'writeNdefMessage' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NdefFormatable#format(android.nfc.NdefMessage): + Method 'format' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NdefFormatable#formatReadOnly(android.nfc.NdefMessage): + Method 'formatReadOnly' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcA#getTimeout(): + Method 'getTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcA#setTimeout(int): + Method 'setTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcA#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcB#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcF#getTimeout(): + Method 'getTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcF#setTimeout(int): + Method 'setTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcF#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcV#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.TagTechnology#close(): + Method 'close' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.TagTechnology#connect(): + Method 'connect' documentation mentions permissions without declaring @RequiresPermission diff --git a/nfc/api/module-lib-current.txt b/nfc/api/module-lib-current.txt index d802177e249b..5ebe91111ec0 100644 --- a/nfc/api/module-lib-current.txt +++ b/nfc/api/module-lib-current.txt @@ -1 +1,10 @@ // Signature format: 2.0 +package android.nfc { + + public class NfcFrameworkInitializer { + method public static void registerServiceWrappers(); + method public static void setNfcServiceManager(@NonNull android.nfc.NfcServiceManager); + } + +} + diff --git a/nfc/api/module-lib-lint-baseline.txt b/nfc/api/module-lib-lint-baseline.txt new file mode 100644 index 000000000000..f7f8ee3ddda5 --- /dev/null +++ b/nfc/api/module-lib-lint-baseline.txt @@ -0,0 +1,93 @@ +// Baseline format: 1.0 +BroadcastBehavior: android.nfc.NfcAdapter#ACTION_ADAPTER_STATE_CHANGED: + Field 'ACTION_ADAPTER_STATE_CHANGED' is missing @BroadcastBehavior +BroadcastBehavior: android.nfc.NfcAdapter#ACTION_PREFERRED_PAYMENT_CHANGED: + Field 'ACTION_PREFERRED_PAYMENT_CHANGED' is missing @BroadcastBehavior +BroadcastBehavior: android.nfc.NfcAdapter#ACTION_REQUIRE_UNLOCK_FOR_NFC: + Field 'ACTION_REQUIRE_UNLOCK_FOR_NFC' is missing @BroadcastBehavior +BroadcastBehavior: android.nfc.NfcAdapter#ACTION_TRANSACTION_DETECTED: + Field 'ACTION_TRANSACTION_DETECTED' is missing @BroadcastBehavior + +RequiresPermission: android.nfc.NfcAdapter#disableForegroundDispatch(android.app.Activity): + Method 'disableForegroundDispatch' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.NfcAdapter#enableForegroundDispatch(android.app.Activity, android.app.PendingIntent, android.content.IntentFilter[], String[][]): + Method 'enableForegroundDispatch' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.cardemulation.CardEmulation#isDefaultServiceForAid(android.content.ComponentName, String): + Method 'isDefaultServiceForAid' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.cardemulation.CardEmulation#isDefaultServiceForCategory(android.content.ComponentName, String): + Method 'isDefaultServiceForCategory' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.cardemulation.CardEmulation#setOffHostForService(android.content.ComponentName, String): + Method 'setOffHostForService' documentation mentions permissions already declared by @RequiresPermission +RequiresPermission: android.nfc.tech.IsoDep#getTimeout(): + Method 'getTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.IsoDep#setTimeout(int): + Method 'setTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.IsoDep#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#authenticateSectorWithKeyA(int, byte[]): + Method 'authenticateSectorWithKeyA' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#authenticateSectorWithKeyB(int, byte[]): + Method 'authenticateSectorWithKeyB' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#decrement(int, int): + Method 'decrement' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#getTimeout(): + Method 'getTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#increment(int, int): + Method 'increment' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#readBlock(int): + Method 'readBlock' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#restore(int): + Method 'restore' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#setTimeout(int): + Method 'setTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#transfer(int): + Method 'transfer' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#writeBlock(int, byte[]): + Method 'writeBlock' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareUltralight#getTimeout(): + Method 'getTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareUltralight#readPages(int): + Method 'readPages' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareUltralight#setTimeout(int): + Method 'setTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareUltralight#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareUltralight#writePage(int, byte[]): + Method 'writePage' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.Ndef#getNdefMessage(): + Method 'getNdefMessage' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.Ndef#isWritable(): + Method 'isWritable' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.Ndef#makeReadOnly(): + Method 'makeReadOnly' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.Ndef#writeNdefMessage(android.nfc.NdefMessage): + Method 'writeNdefMessage' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NdefFormatable#format(android.nfc.NdefMessage): + Method 'format' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NdefFormatable#formatReadOnly(android.nfc.NdefMessage): + Method 'formatReadOnly' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcA#getTimeout(): + Method 'getTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcA#setTimeout(int): + Method 'setTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcA#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcB#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcF#getTimeout(): + Method 'getTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcF#setTimeout(int): + Method 'setTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcF#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcV#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.TagTechnology#close(): + Method 'close' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.TagTechnology#connect(): + Method 'connect' documentation mentions permissions without declaring @RequiresPermission + +SdkConstant: android.nfc.NfcAdapter#ACTION_REQUIRE_UNLOCK_FOR_NFC: + Field 'ACTION_REQUIRE_UNLOCK_FOR_NFC' is missing @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) diff --git a/nfc/api/removed.txt b/nfc/api/removed.txt index d802177e249b..fb82b5ddbb21 100644 --- a/nfc/api/removed.txt +++ b/nfc/api/removed.txt @@ -1 +1,17 @@ // Signature format: 2.0 +package android.nfc { + + public final class NfcAdapter { + method @Deprecated @android.compat.annotation.UnsupportedAppUsage public void disableForegroundNdefPush(android.app.Activity); + method @Deprecated @android.compat.annotation.UnsupportedAppUsage public void enableForegroundNdefPush(android.app.Activity, android.nfc.NdefMessage); + method @Deprecated @android.compat.annotation.UnsupportedAppUsage public boolean invokeBeam(android.app.Activity); + method @Deprecated @android.compat.annotation.UnsupportedAppUsage public boolean isNdefPushEnabled(); + method @Deprecated @android.compat.annotation.UnsupportedAppUsage public void setBeamPushUris(android.net.Uri[], android.app.Activity); + method @Deprecated @android.compat.annotation.UnsupportedAppUsage public void setBeamPushUrisCallback(android.nfc.NfcAdapter.CreateBeamUrisCallback, android.app.Activity); + method @Deprecated @android.compat.annotation.UnsupportedAppUsage public void setNdefPushMessage(android.nfc.NdefMessage, android.app.Activity, android.app.Activity...); + method @Deprecated @android.compat.annotation.UnsupportedAppUsage public void setNdefPushMessageCallback(android.nfc.NfcAdapter.CreateNdefMessageCallback, android.app.Activity, android.app.Activity...); + method @Deprecated @android.compat.annotation.UnsupportedAppUsage public void setOnNdefPushCompleteCallback(android.nfc.NfcAdapter.OnNdefPushCompleteCallback, android.app.Activity, android.app.Activity...); + } + +} + diff --git a/nfc/api/system-current.txt b/nfc/api/system-current.txt index d802177e249b..d5b3c7df59d4 100644 --- a/nfc/api/system-current.txt +++ b/nfc/api/system-current.txt @@ -1 +1,45 @@ // Signature format: 2.0 +package android.nfc { + + public final class NfcAdapter { + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean addNfcUnlockHandler(android.nfc.NfcAdapter.NfcUnlockHandler, String[]); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean disable(); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean disable(boolean); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enable(); + method @FlaggedApi("android.nfc.enable_nfc_reader_option") @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enableReaderOption(boolean); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enableSecureNfc(boolean); + method @FlaggedApi("android.nfc.enable_nfc_mainline") public int getAdapterState(); + method @NonNull @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public java.util.Map<java.lang.String,java.lang.Boolean> getTagIntentAppPreferenceForUser(int); + method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public boolean isControllerAlwaysOn(); + method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public boolean isControllerAlwaysOnSupported(); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean isTagIntentAppPreferenceSupported(); + method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public void registerControllerAlwaysOnListener(@NonNull java.util.concurrent.Executor, @NonNull android.nfc.NfcAdapter.ControllerAlwaysOnListener); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean removeNfcUnlockHandler(android.nfc.NfcAdapter.NfcUnlockHandler); + method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public boolean setControllerAlwaysOn(boolean); + method @FlaggedApi("android.nfc.enable_nfc_mainline") @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public void setReaderMode(boolean); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public int setTagIntentAppPreferenceForUser(int, @NonNull String, boolean); + method @RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON) public void unregisterControllerAlwaysOnListener(@NonNull android.nfc.NfcAdapter.ControllerAlwaysOnListener); + field @FlaggedApi("android.nfc.enable_nfc_mainline") public static final String ACTION_REQUIRE_UNLOCK_FOR_NFC = "android.nfc.action.REQUIRE_UNLOCK_FOR_NFC"; + field public static final int TAG_INTENT_APP_PREF_RESULT_PACKAGE_NOT_FOUND = -1; // 0xffffffff + field public static final int TAG_INTENT_APP_PREF_RESULT_SUCCESS = 0; // 0x0 + field public static final int TAG_INTENT_APP_PREF_RESULT_UNAVAILABLE = -2; // 0xfffffffe + } + + public static interface NfcAdapter.ControllerAlwaysOnListener { + method public void onControllerAlwaysOnChanged(boolean); + } + + public static interface NfcAdapter.NfcUnlockHandler { + method public boolean onUnlockAttempted(android.nfc.Tag); + } + +} + +package android.nfc.cardemulation { + + public final class CardEmulation { + method @FlaggedApi("android.nfc.enable_nfc_mainline") @NonNull public java.util.List<android.nfc.cardemulation.ApduServiceInfo> getServices(@NonNull String, int); + } + +} + diff --git a/nfc/api/system-lint-baseline.txt b/nfc/api/system-lint-baseline.txt new file mode 100644 index 000000000000..761c8e63df81 --- /dev/null +++ b/nfc/api/system-lint-baseline.txt @@ -0,0 +1,105 @@ +// Baseline format: 1.0 +BroadcastBehavior: android.nfc.NfcAdapter#ACTION_ADAPTER_STATE_CHANGED: + Field 'ACTION_ADAPTER_STATE_CHANGED' is missing @BroadcastBehavior +BroadcastBehavior: android.nfc.NfcAdapter#ACTION_PREFERRED_PAYMENT_CHANGED: + Field 'ACTION_PREFERRED_PAYMENT_CHANGED' is missing @BroadcastBehavior +BroadcastBehavior: android.nfc.NfcAdapter#ACTION_REQUIRE_UNLOCK_FOR_NFC: + Field 'ACTION_REQUIRE_UNLOCK_FOR_NFC' is missing @BroadcastBehavior +BroadcastBehavior: android.nfc.NfcAdapter#ACTION_TRANSACTION_DETECTED: + Field 'ACTION_TRANSACTION_DETECTED' is missing @BroadcastBehavior + + +MissingNullability: android.nfc.cardemulation.OffHostApduService#onBind(android.content.Intent): + Missing nullability on method `onBind` return +MissingNullability: android.nfc.cardemulation.OffHostApduService#onBind(android.content.Intent) parameter #0: + Missing nullability on parameter `intent` in method `onBind` + + +RequiresPermission: android.nfc.NfcAdapter#disableForegroundDispatch(android.app.Activity): + Method 'disableForegroundDispatch' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.NfcAdapter#enableForegroundDispatch(android.app.Activity, android.app.PendingIntent, android.content.IntentFilter[], String[][]): + Method 'enableForegroundDispatch' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.cardemulation.CardEmulation#isDefaultServiceForAid(android.content.ComponentName, String): + Method 'isDefaultServiceForAid' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.cardemulation.CardEmulation#isDefaultServiceForCategory(android.content.ComponentName, String): + Method 'isDefaultServiceForCategory' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.cardemulation.CardEmulation#setOffHostForService(android.content.ComponentName, String): + Method 'setOffHostForService' documentation mentions permissions already declared by @RequiresPermission +RequiresPermission: android.nfc.tech.IsoDep#getTimeout(): + Method 'getTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.IsoDep#setTimeout(int): + Method 'setTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.IsoDep#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#authenticateSectorWithKeyA(int, byte[]): + Method 'authenticateSectorWithKeyA' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#authenticateSectorWithKeyB(int, byte[]): + Method 'authenticateSectorWithKeyB' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#decrement(int, int): + Method 'decrement' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#getTimeout(): + Method 'getTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#increment(int, int): + Method 'increment' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#readBlock(int): + Method 'readBlock' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#restore(int): + Method 'restore' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#setTimeout(int): + Method 'setTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#transfer(int): + Method 'transfer' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareClassic#writeBlock(int, byte[]): + Method 'writeBlock' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareUltralight#getTimeout(): + Method 'getTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareUltralight#readPages(int): + Method 'readPages' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareUltralight#setTimeout(int): + Method 'setTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareUltralight#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.MifareUltralight#writePage(int, byte[]): + Method 'writePage' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.Ndef#getNdefMessage(): + Method 'getNdefMessage' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.Ndef#isWritable(): + Method 'isWritable' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.Ndef#makeReadOnly(): + Method 'makeReadOnly' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.Ndef#writeNdefMessage(android.nfc.NdefMessage): + Method 'writeNdefMessage' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NdefFormatable#format(android.nfc.NdefMessage): + Method 'format' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NdefFormatable#formatReadOnly(android.nfc.NdefMessage): + Method 'formatReadOnly' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcA#getTimeout(): + Method 'getTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcA#setTimeout(int): + Method 'setTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcA#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcB#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcF#getTimeout(): + Method 'getTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcF#setTimeout(int): + Method 'setTimeout' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcF#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.NfcV#transceive(byte[]): + Method 'transceive' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.TagTechnology#close(): + Method 'close' documentation mentions permissions without declaring @RequiresPermission +RequiresPermission: android.nfc.tech.TagTechnology#connect(): + Method 'connect' documentation mentions permissions without declaring @RequiresPermission + +SamShouldBeLast: android.nfc.NfcAdapter#enableReaderMode(android.app.Activity, android.nfc.NfcAdapter.ReaderCallback, int, android.os.Bundle): + SAM-compatible parameters (such as parameter 2, "callback", in android.nfc.NfcAdapter.enableReaderMode) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions +SamShouldBeLast: android.nfc.NfcAdapter#ignore(android.nfc.Tag, int, android.nfc.NfcAdapter.OnTagRemovedListener, android.os.Handler): + SAM-compatible parameters (such as parameter 3, "tagRemovedListener", in android.nfc.NfcAdapter.ignore) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions + +SdkConstant: android.nfc.NfcAdapter#ACTION_REQUIRE_UNLOCK_FOR_NFC: + Field 'ACTION_REQUIRE_UNLOCK_FOR_NFC' is missing @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) diff --git a/nfc/api/system-removed.txt b/nfc/api/system-removed.txt index d802177e249b..c6eaa57b6b06 100644 --- a/nfc/api/system-removed.txt +++ b/nfc/api/system-removed.txt @@ -1 +1,12 @@ // Signature format: 2.0 +package android.nfc { + + public final class NfcAdapter { + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean disableNdefPush(); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enableNdefPush(); + method public void setNdefPushMessage(android.nfc.NdefMessage, android.app.Activity, int); + field public static final int FLAG_NDEF_PUSH_NO_CONFIRM = 1; // 0x1 + } + +} + diff --git a/nfc/jarjar-rules.txt b/nfc/jarjar-rules.txt new file mode 100644 index 000000000000..4cd652d6af7f --- /dev/null +++ b/nfc/jarjar-rules.txt @@ -0,0 +1,38 @@ +# Used by framework-nfc for proto debug dumping +rule android.app.PendingIntentProto* com.android.nfc.x.@0 +rule android.content.ComponentNameProto* com.android.nfc.x.@0 +rule android.content.IntentProto* com.android.nfc.x.@0 +rule android.content.IntentFilterProto* com.android.nfc.x.@0 +rule android.content.AuthorityEntryProto* com.android.nfc.x.@0 +rule android.nfc.cardemulation.AidGroupProto* com.android.nfc.x.@0 +rule android.nfc.cardemulation.ApduServiceInfoProto* com.android.nfc.x.@0 +rule android.nfc.cardemulation.NfcFServiceInfoProto* com.android.nfc.x.@0 +rule android.nfc.NdefMessageProto* com.android.nfc.x.@0 +rule android.nfc.NdefRecordProto* com.android.nfc.x.@0 +rule com.android.nfc.cardemulation.CardEmulationManagerProto* com.android.nfc.x.@0 +rule com.android.nfc.cardemulation.RegisteredServicesCacheProto* com.android.nfc.x.@0 +rule com.android.nfc.cardemulation.RegisteredNfcFServicesCacheProto* com.android.nfc.x.@0 +rule com.android.nfc.cardemulation.PreferredServicesProto* com.android.nfc.x.@0 +rule com.android.nfc.cardemulation.EnabledNfcFServicesProto* com.android.nfc.x.@0 +rule com.android.nfc.cardemulation.RegisteredAidCacheProto* com.android.nfc.x.@0 +rule com.android.nfc.cardemulation.AidRoutingManagerProto* com.android.nfc.x.@0 +rule com.android.nfc.cardemulation.RegisteredT3tIdentifiersCacheProto* com.android.nfc.x.@0 +rule com.android.nfc.cardemulation.SystemCodeRoutingManagerProto* com.android.nfc.x.@0 +rule com.android.nfc.cardemulation.HostEmulationManagerProto* com.android.nfc.x.@0 +rule com.android.nfc.cardemulation.HostNfcFEmulationManagerProto* com.android.nfc.x.@0 +rule com.android.nfc.NfcServiceDumpProto* com.android.nfc.x.@0 +rule com.android.nfc.DiscoveryParamsProto* com.android.nfc.x.@0 +rule com.android.nfc.NfcDispatcherProto* com.android.nfc.x.@0 +rule android.os.PersistableBundleProto* com.android.nfc.x.@0 + +# Used by framework-nfc for reading trunk stable flags +rule android.nfc.FakeFeatureFlagsImpl* com.android.nfc.x.@0 +rule android.nfc.FeatureFlags* com.android.nfc.x.@0 +rule android.nfc.Flags* com.android.nfc.x.@0 +rule android.permission.flags.** com.android.nfc.x.@0 + +# Used by framework-nfc for misc utilities +rule android.os.PatternMatcher* com.android.nfc.x.@0 + +rule com.android.incident.Privacy* com.android.nfc.x.@0 +rule com.android.incident.PrivacyFlags* com.android.nfc.x.@0 diff --git a/core/java/android/nfc/ApduList.aidl b/nfc/java/android/nfc/ApduList.aidl index f6236b2bfb3b..f6236b2bfb3b 100644 --- a/core/java/android/nfc/ApduList.aidl +++ b/nfc/java/android/nfc/ApduList.aidl diff --git a/core/java/android/nfc/ApduList.java b/nfc/java/android/nfc/ApduList.java index 027141d99c30..027141d99c30 100644 --- a/core/java/android/nfc/ApduList.java +++ b/nfc/java/android/nfc/ApduList.java diff --git a/core/java/android/nfc/AvailableNfcAntenna.aidl b/nfc/java/android/nfc/AvailableNfcAntenna.aidl index 9d06e2d7d5eb..9d06e2d7d5eb 100644 --- a/core/java/android/nfc/AvailableNfcAntenna.aidl +++ b/nfc/java/android/nfc/AvailableNfcAntenna.aidl diff --git a/core/java/android/nfc/AvailableNfcAntenna.java b/nfc/java/android/nfc/AvailableNfcAntenna.java index 6e6512a04971..6e6512a04971 100644 --- a/core/java/android/nfc/AvailableNfcAntenna.java +++ b/nfc/java/android/nfc/AvailableNfcAntenna.java diff --git a/core/java/android/nfc/Constants.java b/nfc/java/android/nfc/Constants.java index f76833063605..f76833063605 100644 --- a/core/java/android/nfc/Constants.java +++ b/nfc/java/android/nfc/Constants.java diff --git a/core/java/android/nfc/ErrorCodes.java b/nfc/java/android/nfc/ErrorCodes.java index d2c81cd27d90..d2c81cd27d90 100644 --- a/core/java/android/nfc/ErrorCodes.java +++ b/nfc/java/android/nfc/ErrorCodes.java diff --git a/core/java/android/nfc/FormatException.java b/nfc/java/android/nfc/FormatException.java index a57de1e0e21a..a57de1e0e21a 100644 --- a/core/java/android/nfc/FormatException.java +++ b/nfc/java/android/nfc/FormatException.java diff --git a/core/java/android/nfc/IAppCallback.aidl b/nfc/java/android/nfc/IAppCallback.aidl index b06bf06d5197..b06bf06d5197 100644 --- a/core/java/android/nfc/IAppCallback.aidl +++ b/nfc/java/android/nfc/IAppCallback.aidl diff --git a/core/java/android/nfc/INfcAdapter.aidl b/nfc/java/android/nfc/INfcAdapter.aidl index 85879ac56194..85879ac56194 100644 --- a/core/java/android/nfc/INfcAdapter.aidl +++ b/nfc/java/android/nfc/INfcAdapter.aidl diff --git a/core/java/android/nfc/INfcAdapterExtras.aidl b/nfc/java/android/nfc/INfcAdapterExtras.aidl index cde57c58ca1f..cde57c58ca1f 100644 --- a/core/java/android/nfc/INfcAdapterExtras.aidl +++ b/nfc/java/android/nfc/INfcAdapterExtras.aidl diff --git a/core/java/android/nfc/INfcCardEmulation.aidl b/nfc/java/android/nfc/INfcCardEmulation.aidl index f4b46046bc3e..f4b46046bc3e 100644 --- a/core/java/android/nfc/INfcCardEmulation.aidl +++ b/nfc/java/android/nfc/INfcCardEmulation.aidl diff --git a/core/java/android/nfc/INfcControllerAlwaysOnListener.aidl b/nfc/java/android/nfc/INfcControllerAlwaysOnListener.aidl index 1bb7680d2fed..1bb7680d2fed 100644 --- a/core/java/android/nfc/INfcControllerAlwaysOnListener.aidl +++ b/nfc/java/android/nfc/INfcControllerAlwaysOnListener.aidl diff --git a/core/java/android/nfc/INfcDta.aidl b/nfc/java/android/nfc/INfcDta.aidl index 4cc59271362b..4cc59271362b 100644 --- a/core/java/android/nfc/INfcDta.aidl +++ b/nfc/java/android/nfc/INfcDta.aidl diff --git a/core/java/android/nfc/INfcFCardEmulation.aidl b/nfc/java/android/nfc/INfcFCardEmulation.aidl index 124bfac4f0d0..124bfac4f0d0 100644 --- a/core/java/android/nfc/INfcFCardEmulation.aidl +++ b/nfc/java/android/nfc/INfcFCardEmulation.aidl diff --git a/core/java/android/nfc/INfcTag.aidl b/nfc/java/android/nfc/INfcTag.aidl index 170df71385bb..170df71385bb 100644 --- a/core/java/android/nfc/INfcTag.aidl +++ b/nfc/java/android/nfc/INfcTag.aidl diff --git a/core/java/android/nfc/INfcUnlockHandler.aidl b/nfc/java/android/nfc/INfcUnlockHandler.aidl index e1cace987dc3..e1cace987dc3 100644 --- a/core/java/android/nfc/INfcUnlockHandler.aidl +++ b/nfc/java/android/nfc/INfcUnlockHandler.aidl diff --git a/core/java/android/nfc/ITagRemovedCallback.aidl b/nfc/java/android/nfc/ITagRemovedCallback.aidl index 2a06ff314b22..2a06ff314b22 100644 --- a/core/java/android/nfc/ITagRemovedCallback.aidl +++ b/nfc/java/android/nfc/ITagRemovedCallback.aidl diff --git a/core/java/android/nfc/NdefMessage.aidl b/nfc/java/android/nfc/NdefMessage.aidl index 378b9d05b385..378b9d05b385 100644 --- a/core/java/android/nfc/NdefMessage.aidl +++ b/nfc/java/android/nfc/NdefMessage.aidl diff --git a/core/java/android/nfc/NdefMessage.java b/nfc/java/android/nfc/NdefMessage.java index 553f6c01b016..553f6c01b016 100644 --- a/core/java/android/nfc/NdefMessage.java +++ b/nfc/java/android/nfc/NdefMessage.java diff --git a/core/java/android/nfc/NdefRecord.aidl b/nfc/java/android/nfc/NdefRecord.aidl index 10f89d0936e4..10f89d0936e4 100644 --- a/core/java/android/nfc/NdefRecord.aidl +++ b/nfc/java/android/nfc/NdefRecord.aidl diff --git a/core/java/android/nfc/NdefRecord.java b/nfc/java/android/nfc/NdefRecord.java index 7bf4355d5b35..7bf4355d5b35 100644 --- a/core/java/android/nfc/NdefRecord.java +++ b/nfc/java/android/nfc/NdefRecord.java diff --git a/core/java/android/nfc/NfcActivityManager.java b/nfc/java/android/nfc/NfcActivityManager.java index f03fc0af86b3..f03fc0af86b3 100644 --- a/core/java/android/nfc/NfcActivityManager.java +++ b/nfc/java/android/nfc/NfcActivityManager.java diff --git a/core/java/android/nfc/NfcAdapter.java b/nfc/java/android/nfc/NfcAdapter.java index 979855e5e25c..979855e5e25c 100644 --- a/core/java/android/nfc/NfcAdapter.java +++ b/nfc/java/android/nfc/NfcAdapter.java diff --git a/core/java/android/nfc/NfcAntennaInfo.aidl b/nfc/java/android/nfc/NfcAntennaInfo.aidl index d5e79fc37282..d5e79fc37282 100644 --- a/core/java/android/nfc/NfcAntennaInfo.aidl +++ b/nfc/java/android/nfc/NfcAntennaInfo.aidl diff --git a/core/java/android/nfc/NfcAntennaInfo.java b/nfc/java/android/nfc/NfcAntennaInfo.java index b002ca21e8e3..b002ca21e8e3 100644 --- a/core/java/android/nfc/NfcAntennaInfo.java +++ b/nfc/java/android/nfc/NfcAntennaInfo.java diff --git a/core/java/android/nfc/NfcControllerAlwaysOnListener.java b/nfc/java/android/nfc/NfcControllerAlwaysOnListener.java index 6ae58fd38cbe..6ae58fd38cbe 100644 --- a/core/java/android/nfc/NfcControllerAlwaysOnListener.java +++ b/nfc/java/android/nfc/NfcControllerAlwaysOnListener.java diff --git a/core/java/android/nfc/NfcEvent.java b/nfc/java/android/nfc/NfcEvent.java index aff4f52f2bab..aff4f52f2bab 100644 --- a/core/java/android/nfc/NfcEvent.java +++ b/nfc/java/android/nfc/NfcEvent.java diff --git a/core/java/android/nfc/NfcFrameworkInitializer.java b/nfc/java/android/nfc/NfcFrameworkInitializer.java index 1ab8a1ebd72c..1ab8a1ebd72c 100644 --- a/core/java/android/nfc/NfcFrameworkInitializer.java +++ b/nfc/java/android/nfc/NfcFrameworkInitializer.java diff --git a/core/java/android/nfc/NfcManager.java b/nfc/java/android/nfc/NfcManager.java index 644e3122774b..644e3122774b 100644 --- a/core/java/android/nfc/NfcManager.java +++ b/nfc/java/android/nfc/NfcManager.java diff --git a/core/java/android/nfc/NfcServiceManager.java b/nfc/java/android/nfc/NfcServiceManager.java index 5582f1154cad..5582f1154cad 100644 --- a/core/java/android/nfc/NfcServiceManager.java +++ b/nfc/java/android/nfc/NfcServiceManager.java diff --git a/core/java/android/nfc/Tag.aidl b/nfc/java/android/nfc/Tag.aidl index 312261ebe76d..312261ebe76d 100644 --- a/core/java/android/nfc/Tag.aidl +++ b/nfc/java/android/nfc/Tag.aidl diff --git a/core/java/android/nfc/Tag.java b/nfc/java/android/nfc/Tag.java index 500038f14d9d..500038f14d9d 100644 --- a/core/java/android/nfc/Tag.java +++ b/nfc/java/android/nfc/Tag.java diff --git a/core/java/android/nfc/TagLostException.java b/nfc/java/android/nfc/TagLostException.java index 1981d7c0c6e0..1981d7c0c6e0 100644 --- a/core/java/android/nfc/TagLostException.java +++ b/nfc/java/android/nfc/TagLostException.java diff --git a/core/java/android/nfc/TechListParcel.aidl b/nfc/java/android/nfc/TechListParcel.aidl index 92e646f220f0..92e646f220f0 100644 --- a/core/java/android/nfc/TechListParcel.aidl +++ b/nfc/java/android/nfc/TechListParcel.aidl diff --git a/core/java/android/nfc/TechListParcel.java b/nfc/java/android/nfc/TechListParcel.java index 9f01559bd344..9f01559bd344 100644 --- a/core/java/android/nfc/TechListParcel.java +++ b/nfc/java/android/nfc/TechListParcel.java diff --git a/core/java/android/nfc/TransceiveResult.aidl b/nfc/java/android/nfc/TransceiveResult.aidl index 98f92ee03eef..98f92ee03eef 100644 --- a/core/java/android/nfc/TransceiveResult.aidl +++ b/nfc/java/android/nfc/TransceiveResult.aidl diff --git a/core/java/android/nfc/TransceiveResult.java b/nfc/java/android/nfc/TransceiveResult.java index 7992094e6ba1..7992094e6ba1 100644 --- a/core/java/android/nfc/TransceiveResult.java +++ b/nfc/java/android/nfc/TransceiveResult.java diff --git a/core/java/android/nfc/cardemulation/AidGroup.aidl b/nfc/java/android/nfc/cardemulation/AidGroup.aidl index 56d6fa559677..56d6fa559677 100644 --- a/core/java/android/nfc/cardemulation/AidGroup.aidl +++ b/nfc/java/android/nfc/cardemulation/AidGroup.aidl diff --git a/core/java/android/nfc/cardemulation/AidGroup.java b/nfc/java/android/nfc/cardemulation/AidGroup.java index ae3e333051d7..ae3e333051d7 100644 --- a/core/java/android/nfc/cardemulation/AidGroup.java +++ b/nfc/java/android/nfc/cardemulation/AidGroup.java diff --git a/core/java/android/nfc/cardemulation/ApduServiceInfo.aidl b/nfc/java/android/nfc/cardemulation/ApduServiceInfo.aidl index a62fdd6a6c5c..a62fdd6a6c5c 100644 --- a/core/java/android/nfc/cardemulation/ApduServiceInfo.aidl +++ b/nfc/java/android/nfc/cardemulation/ApduServiceInfo.aidl diff --git a/core/java/android/nfc/cardemulation/ApduServiceInfo.java b/nfc/java/android/nfc/cardemulation/ApduServiceInfo.java index 41dee3ab035c..41dee3ab035c 100644 --- a/core/java/android/nfc/cardemulation/ApduServiceInfo.java +++ b/nfc/java/android/nfc/cardemulation/ApduServiceInfo.java diff --git a/core/java/android/nfc/cardemulation/CardEmulation.java b/nfc/java/android/nfc/cardemulation/CardEmulation.java index ad86d70db967..ad86d70db967 100644 --- a/core/java/android/nfc/cardemulation/CardEmulation.java +++ b/nfc/java/android/nfc/cardemulation/CardEmulation.java diff --git a/core/java/android/nfc/cardemulation/HostApduService.java b/nfc/java/android/nfc/cardemulation/HostApduService.java index 7cd2533a7dbf..7cd2533a7dbf 100644 --- a/core/java/android/nfc/cardemulation/HostApduService.java +++ b/nfc/java/android/nfc/cardemulation/HostApduService.java diff --git a/core/java/android/nfc/cardemulation/HostNfcFService.java b/nfc/java/android/nfc/cardemulation/HostNfcFService.java index 65b5ca77de62..65b5ca77de62 100644 --- a/core/java/android/nfc/cardemulation/HostNfcFService.java +++ b/nfc/java/android/nfc/cardemulation/HostNfcFService.java diff --git a/core/java/android/nfc/cardemulation/NfcFCardEmulation.java b/nfc/java/android/nfc/cardemulation/NfcFCardEmulation.java index 48bbf5b61052..48bbf5b61052 100644 --- a/core/java/android/nfc/cardemulation/NfcFCardEmulation.java +++ b/nfc/java/android/nfc/cardemulation/NfcFCardEmulation.java diff --git a/core/java/android/nfc/cardemulation/NfcFServiceInfo.aidl b/nfc/java/android/nfc/cardemulation/NfcFServiceInfo.aidl index 56b98ebd90fa..56b98ebd90fa 100644 --- a/core/java/android/nfc/cardemulation/NfcFServiceInfo.aidl +++ b/nfc/java/android/nfc/cardemulation/NfcFServiceInfo.aidl diff --git a/core/java/android/nfc/cardemulation/NfcFServiceInfo.java b/nfc/java/android/nfc/cardemulation/NfcFServiceInfo.java index 33bc16978721..33bc16978721 100644 --- a/core/java/android/nfc/cardemulation/NfcFServiceInfo.java +++ b/nfc/java/android/nfc/cardemulation/NfcFServiceInfo.java diff --git a/core/java/android/nfc/OWNERS b/nfc/java/android/nfc/cardemulation/OWNERS index 35e9713f5715..35e9713f5715 100644 --- a/core/java/android/nfc/OWNERS +++ b/nfc/java/android/nfc/cardemulation/OWNERS diff --git a/core/java/android/nfc/cardemulation/OffHostApduService.java b/nfc/java/android/nfc/cardemulation/OffHostApduService.java index 2286e8476d94..2286e8476d94 100644 --- a/core/java/android/nfc/cardemulation/OffHostApduService.java +++ b/nfc/java/android/nfc/cardemulation/OffHostApduService.java diff --git a/core/java/android/nfc/cardemulation/Utils.java b/nfc/java/android/nfc/cardemulation/Utils.java index 202e1cfb48f6..202e1cfb48f6 100644 --- a/core/java/android/nfc/cardemulation/Utils.java +++ b/nfc/java/android/nfc/cardemulation/Utils.java diff --git a/core/java/android/nfc/dta/NfcDta.java b/nfc/java/android/nfc/dta/NfcDta.java index 88016623434d..88016623434d 100644 --- a/core/java/android/nfc/dta/NfcDta.java +++ b/nfc/java/android/nfc/dta/NfcDta.java diff --git a/core/java/android/nfc/cardemulation/OWNERS b/nfc/java/android/nfc/dta/OWNERS index 35e9713f5715..35e9713f5715 100644 --- a/core/java/android/nfc/cardemulation/OWNERS +++ b/nfc/java/android/nfc/dta/OWNERS diff --git a/core/java/android/nfc/flags.aconfig b/nfc/java/android/nfc/flags.aconfig index 11be905c41ca..11be905c41ca 100644 --- a/core/java/android/nfc/flags.aconfig +++ b/nfc/java/android/nfc/flags.aconfig diff --git a/core/java/android/nfc/package.html b/nfc/java/android/nfc/package.html index 55c1d1650aa9..55c1d1650aa9 100644 --- a/core/java/android/nfc/package.html +++ b/nfc/java/android/nfc/package.html diff --git a/core/java/android/nfc/tech/BasicTagTechnology.java b/nfc/java/android/nfc/tech/BasicTagTechnology.java index ae468fead7a2..ae468fead7a2 100644 --- a/core/java/android/nfc/tech/BasicTagTechnology.java +++ b/nfc/java/android/nfc/tech/BasicTagTechnology.java diff --git a/core/java/android/nfc/tech/IsoDep.java b/nfc/java/android/nfc/tech/IsoDep.java index 0ba0c5a8d13b..0ba0c5a8d13b 100644 --- a/core/java/android/nfc/tech/IsoDep.java +++ b/nfc/java/android/nfc/tech/IsoDep.java diff --git a/core/java/android/nfc/tech/MifareClassic.java b/nfc/java/android/nfc/tech/MifareClassic.java index 26f54e692289..26f54e692289 100644 --- a/core/java/android/nfc/tech/MifareClassic.java +++ b/nfc/java/android/nfc/tech/MifareClassic.java diff --git a/core/java/android/nfc/tech/MifareUltralight.java b/nfc/java/android/nfc/tech/MifareUltralight.java index c0416a39ba76..c0416a39ba76 100644 --- a/core/java/android/nfc/tech/MifareUltralight.java +++ b/nfc/java/android/nfc/tech/MifareUltralight.java diff --git a/core/java/android/nfc/tech/Ndef.java b/nfc/java/android/nfc/tech/Ndef.java index 7d83f157a314..7d83f157a314 100644 --- a/core/java/android/nfc/tech/Ndef.java +++ b/nfc/java/android/nfc/tech/Ndef.java diff --git a/core/java/android/nfc/tech/NdefFormatable.java b/nfc/java/android/nfc/tech/NdefFormatable.java index 2240fe7f7d3b..2240fe7f7d3b 100644 --- a/core/java/android/nfc/tech/NdefFormatable.java +++ b/nfc/java/android/nfc/tech/NdefFormatable.java diff --git a/core/java/android/nfc/tech/NfcA.java b/nfc/java/android/nfc/tech/NfcA.java index 7e6648361670..7e6648361670 100644 --- a/core/java/android/nfc/tech/NfcA.java +++ b/nfc/java/android/nfc/tech/NfcA.java diff --git a/core/java/android/nfc/tech/NfcB.java b/nfc/java/android/nfc/tech/NfcB.java index 3ebd47f610c0..3ebd47f610c0 100644 --- a/core/java/android/nfc/tech/NfcB.java +++ b/nfc/java/android/nfc/tech/NfcB.java diff --git a/core/java/android/nfc/tech/NfcBarcode.java b/nfc/java/android/nfc/tech/NfcBarcode.java index 421ba7827cb1..421ba7827cb1 100644 --- a/core/java/android/nfc/tech/NfcBarcode.java +++ b/nfc/java/android/nfc/tech/NfcBarcode.java diff --git a/core/java/android/nfc/tech/NfcF.java b/nfc/java/android/nfc/tech/NfcF.java index 2ccd38875f07..2ccd38875f07 100644 --- a/core/java/android/nfc/tech/NfcF.java +++ b/nfc/java/android/nfc/tech/NfcF.java diff --git a/core/java/android/nfc/tech/NfcV.java b/nfc/java/android/nfc/tech/NfcV.java index 186c63bf07fd..186c63bf07fd 100644 --- a/core/java/android/nfc/tech/NfcV.java +++ b/nfc/java/android/nfc/tech/NfcV.java diff --git a/core/java/android/nfc/dta/OWNERS b/nfc/java/android/nfc/tech/OWNERS index 35e9713f5715..35e9713f5715 100644 --- a/core/java/android/nfc/dta/OWNERS +++ b/nfc/java/android/nfc/tech/OWNERS diff --git a/core/java/android/nfc/tech/TagTechnology.java b/nfc/java/android/nfc/tech/TagTechnology.java index 839fe429b338..839fe429b338 100644 --- a/core/java/android/nfc/tech/TagTechnology.java +++ b/nfc/java/android/nfc/tech/TagTechnology.java diff --git a/core/java/android/nfc/tech/package.html b/nfc/java/android/nfc/tech/package.html index a99828f90c5b..a99828f90c5b 100644 --- a/core/java/android/nfc/tech/package.html +++ b/nfc/java/android/nfc/tech/package.html diff --git a/core/tests/nfctests/Android.bp b/nfc/tests/Android.bp index f81be494ad18..62566ee89fb8 100644 --- a/core/tests/nfctests/Android.bp +++ b/nfc/tests/Android.bp @@ -30,6 +30,7 @@ android_test { "truth", ], libs: [ + "framework-nfc.impl", "android.test.runner", ], srcs: ["src/**/*.java"], diff --git a/core/tests/nfctests/AndroidManifest.xml b/nfc/tests/AndroidManifest.xml index 99e2c34c656b..99e2c34c656b 100644 --- a/core/tests/nfctests/AndroidManifest.xml +++ b/nfc/tests/AndroidManifest.xml diff --git a/core/tests/nfctests/AndroidTest.xml b/nfc/tests/AndroidTest.xml index 490d6f5df197..490d6f5df197 100644 --- a/core/tests/nfctests/AndroidTest.xml +++ b/nfc/tests/AndroidTest.xml diff --git a/core/tests/nfctests/src/android/nfc/NfcControllerAlwaysOnListenerTest.java b/nfc/tests/src/android/nfc/NfcControllerAlwaysOnListenerTest.java index 48f4288d401e..48f4288d401e 100644 --- a/core/tests/nfctests/src/android/nfc/NfcControllerAlwaysOnListenerTest.java +++ b/nfc/tests/src/android/nfc/NfcControllerAlwaysOnListenerTest.java diff --git a/core/tests/nfctests/src/android/nfc/TechListParcelTest.java b/nfc/tests/src/android/nfc/TechListParcelTest.java index a12bbbc6884b..a12bbbc6884b 100644 --- a/core/tests/nfctests/src/android/nfc/TechListParcelTest.java +++ b/nfc/tests/src/android/nfc/TechListParcelTest.java |