blob: ad1406c73c2fdac142947bb2b5db098933774963 [file] [log] [blame]
Bob Badour8a6a2bc2021-02-12 17:07:05 -08001package {
2 // See: http://go/android-license-faq
3 // A large-scale-change added 'default_applicable_licenses' to import
4 // all of the 'license_kinds' from "frameworks_base_license"
5 // to get the below license kinds:
6 // SPDX-license-identifier-Apache-2.0
7 default_applicable_licenses: ["frameworks_base_license"],
8}
9
Anton Hanssone3d44e82021-04-12 18:14:30 +010010// Defaults for platform code that runs inside system_server
11java_defaults {
12 name: "platform_service_defaults",
13 plugins: ["error_prone_android_framework"],
14 errorprone: {
15 javacflags: [
16 // "-Xep:AndroidFrameworkBinderIdentity:ERROR",
17 "-Xep:AndroidFrameworkCompatChange:ERROR",
18 // "-Xep:AndroidFrameworkUid:ERROR",
19 // NOTE: only enable to generate local patchfiles
20 // "-XepPatchChecks:refaster:frameworks/base/errorprone/refaster/EfficientXml.java.refaster",
21 // "-XepPatchLocation:/tmp/refaster/",
22 ],
23 },
24}
25
Jiyong Parkbae2e902019-11-17 13:11:19 +090026filegroup {
27 name: "services-main-sources",
Colin Cross33b78ef2021-03-26 10:31:25 -070028 srcs: [
29 "java/**/*.java",
30 "java/**/package.html",
31 ],
Jiyong Parkbae2e902019-11-17 13:11:19 +090032 path: "java",
33 visibility: ["//visibility:private"],
34}
35
36filegroup {
Andrei Onea43114702021-02-10 20:53:12 +000037 name: "services-non-updatable-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090038 srcs: [
39 ":services.core-sources",
Hongwei Wangcdcb68d2020-11-23 12:48:05 -080040 ":services.core-sources-am-wm",
Colin Cross33b78ef2021-03-26 10:31:25 -070041 "core/java/com/android/server/am/package.html",
Jiyong Parkbae2e902019-11-17 13:11:19 +090042 ":services.accessibility-sources",
43 ":services.appprediction-sources",
44 ":services.appwidget-sources",
45 ":services.autofill-sources",
46 ":services.backup-sources",
Jiyong Parkabc72e42019-11-17 15:17:53 +090047 ":backuplib-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090048 ":services.companion-sources",
49 ":services.contentcapture-sources",
50 ":services.contentsuggestions-sources",
51 ":services.coverage-sources",
52 ":services.devicepolicy-sources",
53 ":services.midi-sources",
Nick Moukhinecf47bdd2020-08-19 16:29:18 +020054 ":services.musicsearch-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090055 ":services.net-sources",
56 ":services.print-sources",
Yi Kong86f85932020-06-29 20:03:55 +080057 ":services.profcollect-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090058 ":services.restrictions-sources",
Hyunyoung Song21e60a92020-11-20 20:27:54 -080059 ":services.searchui-sources",
Shashwat Razdand33e8c32021-01-29 13:02:19 -080060 ":services.smartspace-sources",
Eugenio Marchioric3c0a1e2020-12-23 10:44:55 +000061 ":services.speech-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090062 ":services.startop.iorap-sources",
63 ":services.systemcaptions-sources",
Adam He2653f232020-11-30 18:23:20 -080064 ":services.translation-sources",
Alex Agranovich50c987f2021-02-18 09:19:33 +000065 ":services.texttospeech-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090066 ":services.usage-sources",
67 ":services.usb-sources",
68 ":services.voiceinteraction-sources",
Roshan Piusea33fb92020-02-20 12:49:45 -080069 ":services.wifi-sources",
Andrei Onea43114702021-02-10 20:53:12 +000070 ],
71 visibility: ["//visibility:private"],
72}
73
74filegroup {
75 name: "services-all-sources",
76 srcs: [
77 ":services-non-updatable-sources",
78 ":service-media-s-sources",
Hai Zhang76f0def2020-01-16 01:42:58 -080079 ":service-permission-sources",
Muhammad Qureshi8ea733e2020-02-07 09:30:28 -080080 ":service-statsd-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090081 ],
82 visibility: ["//visibility:private"],
83}
84
Felipe Lemefec71a72021-04-01 23:32:53 -070085java_library {
86 name: "Slogf",
87 srcs: ["core/java/com/android/server/utils/Slogf.java"],
88}
89
Colin Crosseb652a42017-12-05 09:46:29 -080090// merge all required services into one jar
91// ============================================================
92java_library {
93 name: "services",
Colin Crossa12c0f52018-06-27 11:00:11 -070094 installable: true,
Colin Crosseb652a42017-12-05 09:46:29 -080095
96 dex_preopt: {
97 app_image: true,
98 profile: "art-profile",
99 },
100
Jiyong Parkbae2e902019-11-17 13:11:19 +0900101 srcs: [":services-main-sources"],
Colin Crosseb652a42017-12-05 09:46:29 -0800102
103 // The convention is to name each service module 'services.$(module_name)'
104 static_libs: [
Colin Cross4c0b06b2017-12-12 19:43:04 -0800105 "services.core",
Colin Crosseb652a42017-12-05 09:46:29 -0800106 "services.accessibility",
Sunny Goyal54e91342018-11-14 11:59:02 -0800107 "services.appprediction",
Colin Crosseb652a42017-12-05 09:46:29 -0800108 "services.appwidget",
109 "services.autofill",
110 "services.backup",
111 "services.companion",
Felipe Leme749b8892018-12-03 16:30:30 -0800112 "services.contentcapture",
Winson Chung3fb0f252019-01-08 17:41:55 -0800113 "services.contentsuggestions",
Colin Crosseb652a42017-12-05 09:46:29 -0800114 "services.coverage",
115 "services.devicepolicy",
116 "services.midi",
Nick Moukhinecf47bdd2020-08-19 16:29:18 +0200117 "services.musicsearch",
Colin Crosseb652a42017-12-05 09:46:29 -0800118 "services.net",
Danning Chen20b32ed2019-12-18 16:52:03 -0800119 "services.people",
Colin Crosseb652a42017-12-05 09:46:29 -0800120 "services.print",
Yi Kong86f85932020-06-29 20:03:55 +0800121 "services.profcollect",
Colin Crosseb652a42017-12-05 09:46:29 -0800122 "services.restrictions",
Hyunyoung Song21e60a92020-11-20 20:27:54 -0800123 "services.searchui",
Shashwat Razdand33e8c32021-01-29 13:02:19 -0800124 "services.smartspace",
Eugenio Marchioric3c0a1e2020-12-23 10:44:55 +0000125 "services.speech",
Igor Murashkin4de1e162018-11-26 10:33:17 -0800126 "services.startop",
Robert Berrye14120e2019-03-18 16:33:42 -0400127 "services.systemcaptions",
Adam He2653f232020-11-30 18:23:20 -0800128 "services.translation",
Alex Agranovich50c987f2021-02-18 09:19:33 +0000129 "services.texttospeech",
Colin Crosseb652a42017-12-05 09:46:29 -0800130 "services.usage",
131 "services.usb",
132 "services.voiceinteraction",
Roshan Piusea33fb92020-02-20 12:49:45 -0800133 "services.wifi",
Dmitri Plotnikov4eaac3a2020-05-04 17:00:16 -0700134 "service-blobstore",
135 "service-jobscheduler",
Colin Crosseb652a42017-12-05 09:46:29 -0800136 "android.hidl.base-V1.0-java",
137 ],
138
139 libs: [
140 "android.hidl.manager-V1.0-java",
Paul Duffinabebc6a2020-05-31 11:35:50 +0100141 "framework-tethering.stubs.module_lib",
Chris Wailes09724a72021-02-08 10:00:13 -0800142 "service-art.stubs.system_server",
Colin Crosseb652a42017-12-05 09:46:29 -0800143 ],
144
145 // Uncomment to enable output of certain warnings (deprecated, unchecked)
146 //javacflags: ["-Xlint"],
Colin Crosseb652a42017-12-05 09:46:29 -0800147}
148
Colin Cross3a7d8992017-12-05 17:33:58 -0800149// native library
150// =============================================================
151
152cc_library_shared {
153 name: "libandroid_servers",
154 defaults: ["libservices.core-libs"],
155 whole_static_libs: ["libservices.core"],
156}
atrost86895aa2019-08-19 16:51:15 +0100157
158platform_compat_config {
159 name: "services-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100160 src: ":services",
161}
Ulya Trafimovich0d1b063d62019-12-03 11:59:51 +0000162
163filegroup {
164 name: "art-profile",
165 srcs: ["art-profile"],
166}
Jiyong Parkabc72e42019-11-17 15:17:53 +0900167
168// API stub
169// =============================================================
170
Andrei Onea43114702021-02-10 20:53:12 +0000171stubs_defaults {
172 name: "services-stubs-default",
Jiyong Parkabc72e42019-11-17 15:17:53 +0900173 installable: false,
Makoto Onukiaf97aef2020-02-03 10:32:52 -0800174 args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.SYSTEM_SERVER\\)" +
Jiyong Parkabc72e42019-11-17 15:17:53 +0900175 " --hide-annotation android.annotation.Hide" +
Anton Hanssonf74130f2020-02-19 18:29:12 +0000176 " --hide InternalClasses" + // com.android.* classes are okay in this interface
177 // TODO: remove the --hide options below
Jiyong Parkabc72e42019-11-17 15:17:53 +0900178 " --hide-package com.google.android.startop.iorap" +
Jiyong Parkabc72e42019-11-17 15:17:53 +0900179 " --hide DeprecationMismatch" +
180 " --hide HiddenTypedefConstant",
Jiyong Parkabc72e42019-11-17 15:17:53 +0900181 visibility: ["//visibility:private"],
Felipe Lemed3895b62021-03-24 16:55:27 -0700182 filter_packages: ["com.android."],
Andrei Onea43114702021-02-10 20:53:12 +0000183}
184
185droidstubs {
186 name: "services-stubs.sources",
187 srcs: [":services-all-sources"],
188 defaults: ["services-stubs-default"],
Jiyong Park13c923d2019-12-20 16:29:45 +0900189 check_api: {
190 current: {
191 api_file: "api/current.txt",
192 removed_api_file: "api/removed.txt",
193 },
Anton Hanssondaa9d882020-02-19 11:35:09 +0000194 last_released: {
Anton Hansson48ee95e2020-05-02 17:49:26 +0100195 api_file: ":android.api.system-server.latest",
Anton Hansson960c6752020-05-02 18:00:30 +0100196 removed_api_file: ":removed.api.system-server.latest",
Felipe Lemed3895b62021-03-24 16:55:27 -0700197 baseline_file: ":android-incompatibilities.api.system-server.latest",
Anton Hanssondaa9d882020-02-19 11:35:09 +0000198 },
199 api_lint: {
200 enabled: true,
Anton Hansson48ee95e2020-05-02 17:49:26 +0100201 new_since: ":android.api.system-server.latest",
Anton Hanssondaa9d882020-02-19 11:35:09 +0000202 baseline_file: "api/lint-baseline.txt",
203 },
Jiyong Park13c923d2019-12-20 16:29:45 +0900204 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000205 dists: [
206 {
Felipe Lemed3895b62021-03-24 16:55:27 -0700207 targets: [
208 "sdk",
209 "win_sdk",
210 ],
Anton Hansson85785fe2021-01-20 20:23:34 +0000211 dir: "apistubs/android/system-server/api",
212 dest: "android.txt",
Felipe Lemed3895b62021-03-24 16:55:27 -0700213 tag: ".api.txt",
Anton Hansson85785fe2021-01-20 20:23:34 +0000214 },
215 {
Felipe Lemed3895b62021-03-24 16:55:27 -0700216 targets: [
217 "sdk",
218 "win_sdk",
219 ],
Anton Hansson85785fe2021-01-20 20:23:34 +0000220 dir: "apistubs/android/system-server/api",
221 dest: "removed.txt",
222 tag: ".removed-api.txt",
223 },
Felipe Lemed3895b62021-03-24 16:55:27 -0700224 ],
Jiyong Parkabc72e42019-11-17 15:17:53 +0900225}
226
227java_library {
Anton Hanssona49fb992020-03-19 15:23:32 +0000228 name: "android_system_server_stubs_current",
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000229 defaults: ["android_stubs_dists_default"],
Jiyong Parkabc72e42019-11-17 15:17:53 +0900230 srcs: [":services-stubs.sources"],
231 installable: false,
Anton Hanssona49fb992020-03-19 15:23:32 +0000232 static_libs: ["android_module_lib_stubs_current"],
Anton Hansson4304e602020-07-21 12:55:48 +0100233 sdk_version: "none",
234 system_modules: "none",
235 java_version: "1.8",
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000236 dist: {
237 dir: "apistubs/android/system-server",
238 },
Jiyong Parkabc72e42019-11-17 15:17:53 +0900239}
Andrei Onea43114702021-02-10 20:53:12 +0000240
241droidstubs {
242 name: "services-non-updatable-stubs.sources",
243 srcs: [":services-non-updatable-sources"],
244 defaults: ["services-stubs-default"],
245 check_api: {
246 current: {
247 api_file: "api/non-updatable-current.txt",
248 removed_api_file: "api/non-updatable-removed.txt",
249 },
250 api_lint: {
251 enabled: true,
252 new_since: ":android-non-updatable.api.system-server.latest",
253 baseline_file: "api/non-updatable-lint-baseline.txt",
254 },
255 },
256 dists: [
257 {
Felipe Lemed3895b62021-03-24 16:55:27 -0700258 targets: [
259 "sdk",
260 "win_sdk",
261 ],
Andrei Onea43114702021-02-10 20:53:12 +0000262 dir: "apistubs/android/system-server/api",
263 dest: "android-non-updatable.txt",
Felipe Lemed3895b62021-03-24 16:55:27 -0700264 tag: ".api.txt",
Andrei Onea43114702021-02-10 20:53:12 +0000265 },
266 {
Felipe Lemed3895b62021-03-24 16:55:27 -0700267 targets: [
268 "sdk",
269 "win_sdk",
270 ],
Andrei Onea43114702021-02-10 20:53:12 +0000271 dir: "apistubs/android/system-server/api",
272 dest: "android-non-updatable-removed.txt",
273 tag: ".removed-api.txt",
274 },
Felipe Lemed3895b62021-03-24 16:55:27 -0700275 ],
276}