1package { 2 default_team: "trendy_team_fwk_nfc", 3 default_applicable_licenses: ["Android-Apache-2.0"], 4} 5 6genrule { 7 name: "statslog-Nfc-java-gen", 8 tools: ["stats-log-api-gen"], 9 cmd: "$(location stats-log-api-gen) --java $(out) --module nfc --javaPackage com.android.nfc" + 10 " --javaClass NfcStatsLog", 11 out: ["com/android/nfc/NfcStatsLog.java"], 12} 13 14java_library { 15 name: "bluetooth-protos-nfc-enums-java-gen", 16 installable: false, 17 proto: { 18 type: "stream", 19 }, 20 srcs: [ 21 ":srcs_bluetooth_protos_nfc", 22 ], 23 apex_available: [ 24 "//apex_available:platform", 25 "com.android.nfcservices", 26 ], 27 min_sdk_version: "36", 28 sdk_version: "module_current", 29} 30 31java_defaults { 32 name: "NfcNciDefaults", 33 static_libs: [ 34 "android.app.flags-aconfig-java", 35 "android.service.chooser.flags-aconfig-java", 36 "android.se.omapi-V1-java", 37 "androidx.annotation_annotation", 38 "androidx.appcompat_appcompat", 39 "app-compat-annotations", 40 "bluetooth-protos-nfc-enums-java-gen", 41 "com.google.android.material_material", 42 "modules-utils-fastxmlserializer", 43 "modules-utils-shell-command-handler", 44 "PlatformProperties", 45 "nfc-event-log-proto", 46 "com.android.nfc.flags-aconfig-java", 47 "com.android.nfc.module.flags-aconfig-java", 48 "com.android.permission.flags-aconfig-java-export", 49 ], 50 flags_packages: [ 51 "com.android.nfc.flags-aconfig", 52 "com.android.nfc.module.flags-aconfig", 53 ], 54 privileged: true, 55 optimize: { 56 proguard_flags_files: ["proguard.flags"], 57 }, 58 jarjar_rules: "jarjar-rules.txt", 59 privapp_allowlist: ":privapp_allowlist_com.android.nfc.xml", 60} 61 62// NCI Configuration used without NFC apex 63// This version compiles against platform. 64android_app { 65 name: "NfcNci", 66 defaults: ["NfcNciDefaults"], 67 certificate: "platform", 68 sdk_version: "core_platform", 69 srcs: [ 70 ":nfc-sources", 71 "shim_src/non_apex/**/*.java", 72 ], 73 libs: [ 74 // order matters: classes in framework-nfc are resolved before framework, meaning 75 // @hide APIs in framework-nfc are resolved before @SystemApi stubs in framework 76 "framework-nfc.impl", 77 "framework", 78 79 // if sdk_version="" this gets automatically included, but here we need to add manually. 80 "framework-res", 81 ], 82 jni_libs: ["libnfc_nci_jni"], 83 required: [ 84 // Provide a default libnfc-nci.conf in /system/etc for devices that 85 // does not ship one in /product 86 "libnfc-nci.conf-default", 87 ], 88 lint: { 89 baseline_filename: "lint-baseline-nfcnci.xml", 90 warning_checks: [ 91 "FlaggedApi", 92 ], 93 }, 94} 95 96// NCI Configuration embedded in NFC apex. 97// This version compiles against SDK API's. 98android_app { 99 name: "NfcNciApex", 100 defaults: ["NfcNciDefaults"], 101 min_sdk_version: "36", 102 updatable: true, 103 sdk_version: "module_current", 104 certificate: "nfc", 105 srcs: [ 106 ":nfc-sources", 107 "shim_src/apex/**/*.java", 108 ], 109 libs: [ 110 "android.nfc.flags-aconfig-java", 111 "android.permission.flags-aconfig-java", 112 "display_flags_lib", 113 "framework-annotations-lib", 114 "framework-bluetooth.stubs.module_lib", 115 "framework-configinfrastructure.stubs.module_lib", 116 "framework-nfc.impl", 117 "framework-permission-s.stubs.module_lib", 118 "framework-permission.stubs.module_lib", 119 "framework-statsd.stubs.module_lib", 120 "framework-wifi.stubs.module_lib", 121 "unsupportedappusage", 122 ], 123 // prevent NfcNciApex from using product-specific resources 124 aaptflags: ["--product default"], 125 apex_available: [ 126 "//apex_available:platform", 127 "com.android.nfcservices", 128 ], 129 lint: { 130 baseline_filename: "lint-baseline.xml", 131 }, 132} 133 134filegroup { 135 name: "nfc-sources", 136 srcs: [ 137 "src/**/*.java", 138 "nci/**/*.java", 139 ":framework-nfc-javastream-protos", 140 ":statslog-Nfc-java-gen", 141 ], 142 visibility: [ 143 "//packages/modules/Nfc/NfcNci/tests/unit", 144 "//packages/modules/Nfc:__subpackages__", 145 ], 146} 147 148filegroup { 149 name: "privapp_allowlist_com.android.nfc.xml", 150 srcs: ["com.android.nfc.xml"], 151} 152