| package { |
| default_team: "trendy_team_fwk_nfc", |
| default_applicable_licenses: ["Android-Apache-2.0"], |
| } |
| |
| genrule { |
| name: "statslog-Nfc-java-gen", |
| tools: ["stats-log-api-gen"], |
| cmd: "$(location stats-log-api-gen) --java $(out) --module nfc --javaPackage com.android.nfc" + |
| " --javaClass NfcStatsLog", |
| out: ["com/android/nfc/NfcStatsLog.java"], |
| } |
| |
| java_library { |
| name: "bluetooth-protos-nfc-enums-java-gen", |
| installable: false, |
| proto: { |
| type: "stream", |
| }, |
| srcs: [ |
| ":srcs_bluetooth_protos_nfc", |
| ], |
| apex_available: [ |
| "//apex_available:platform", |
| "com.android.nfcservices", |
| ], |
| min_sdk_version: "35", // Make it 36 once available. |
| sdk_version: "module_current", |
| } |
| |
| java_defaults { |
| name: "NfcNciDefaults", |
| static_libs: [ |
| "android.app.flags-aconfig-java", |
| "android.service.chooser.flags-aconfig-java", |
| "android.se.omapi-V1-java", |
| "androidx.annotation_annotation", |
| "androidx.appcompat_appcompat", |
| "app-compat-annotations", |
| "bluetooth-protos-nfc-enums-java-gen", |
| "com.google.android.material_material", |
| "modules-utils-fastxmlserializer", |
| "modules-utils-shell-command-handler", |
| "PlatformProperties", |
| "nfc-event-log-proto", |
| "com.android.nfc.flags-aconfig-java", |
| "com.android.nfc.module.flags-aconfig-java", |
| ], |
| flags_packages: [ |
| "com.android.nfc.flags-aconfig", |
| "com.android.nfc.module.flags-aconfig", |
| ], |
| privileged: true, |
| optimize: { |
| proguard_flags_files: ["proguard.flags"], |
| }, |
| jarjar_rules: "jarjar-rules.txt", |
| privapp_allowlist: ":privapp_allowlist_com.android.nfc.xml", |
| } |
| |
| // NCI Configuration used without NFC apex |
| // This version compiles against platform. |
| android_app { |
| name: "NfcNci", |
| defaults: ["NfcNciDefaults"], |
| certificate: "platform", |
| sdk_version: "core_platform", |
| srcs: [ |
| ":nfc-sources", |
| "shim_src/non_apex/**/*.java", |
| ], |
| libs: [ |
| // order matters: classes in framework-nfc are resolved before framework, meaning |
| // @hide APIs in framework-nfc are resolved before @SystemApi stubs in framework |
| "framework-nfc.impl", |
| "framework", |
| |
| // if sdk_version="" this gets automatically included, but here we need to add manually. |
| "framework-res", |
| ], |
| jni_libs: ["libnfc_nci_jni"], |
| required: [ |
| // Provide a default libnfc-nci.conf in /system/etc for devices that |
| // does not ship one in /product |
| "libnfc-nci.conf-default", |
| ], |
| lint: { |
| baseline_filename: "lint-baseline-nfcnci.xml", |
| warning_checks: [ |
| "FlaggedApi", |
| ], |
| }, |
| } |
| |
| // NCI Configuration embedded in NFC apex. |
| // This version compiles against SDK API's. |
| android_app { |
| name: "NfcNciApex", |
| defaults: ["NfcNciDefaults"], |
| min_sdk_version: "35", // Make it 36 once available. |
| updatable: true, |
| sdk_version: "module_current", |
| certificate: "nfc", |
| srcs: [ |
| ":nfc-sources", |
| "shim_src/apex/**/*.java", |
| ], |
| libs: [ |
| "android.nfc.flags-aconfig-java", |
| "android.permission.flags-aconfig-java", |
| "framework-annotations-lib", |
| "framework-bluetooth.stubs.module_lib", |
| "framework-configinfrastructure.stubs.module_lib", |
| "framework-nfc.impl", |
| "framework-permission-s.stubs.module_lib", |
| "framework-permission.stubs.module_lib", |
| "framework-statsd.stubs.module_lib", |
| "framework-wifi.stubs.module_lib", |
| "unsupportedappusage", |
| ], |
| // prevent NfcNciApex from using product-specific resources |
| aaptflags: ["--product default"], |
| apex_available: [ |
| "//apex_available:platform", |
| "com.android.nfcservices", |
| ], |
| lint: { |
| baseline_filename: "lint-baseline.xml", |
| }, |
| } |
| |
| filegroup { |
| name: "nfc-sources", |
| srcs: [ |
| "src/**/*.java", |
| "nci/**/*.java", |
| ":framework-nfc-javastream-protos", |
| ":statslog-Nfc-java-gen", |
| ], |
| visibility: [ |
| "//packages/modules/Nfc/NfcNci/tests/unit", |
| "//packages/modules/Nfc:__subpackages__", |
| ], |
| } |
| |
| filegroup { |
| name: "privapp_allowlist_com.android.nfc.xml", |
| srcs: ["com.android.nfc.xml"], |
| } |