-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathAndroid.bp
143 lines (135 loc) · 3.89 KB
/
Android.bp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
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: "current",
sdk_version: "module_current",
}
java_defaults {
name: "NfcNciDefaults",
static_libs: [
"android.se.omapi-V1-java",
"androidx.annotation_annotation",
"androidx.appcompat_appcompat",
"bluetooth-protos-nfc-enums-java-gen",
"com.google.android.material_material",
"modules-utils-fastxmlserializer",
"modules-utils-shell-command-handler",
"PlatformProperties",
"nfc-event-log-proto",
"nfc_flags_lib",
],
flags_packages: [
"nfc_aconfig_flags",
],
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: "current",
sdk_version: "module_current",
certificate: "nfc",
srcs: [
":nfc-sources",
"shim_src/apex/**/*.java",
],
libs: [
"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",
"android.nfc.flags-aconfig-java",
"android.permission.flags-aconfig-java",
"android.service.chooser.flags-aconfig-java",
"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/apps/Nfc/tests/unit",
],
}
filegroup {
name: "privapp_allowlist_com.android.nfc.xml",
srcs: ["com.android.nfc.xml"],
}