blob: 20b89de7f2a60fc278849f36d73cc4f816445bc8 [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",
Roshan Pius27e1a872021-03-31 12:07:17 -070068 ":services.uwb-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090069 ":services.voiceinteraction-sources",
Roshan Piusea33fb92020-02-20 12:49:45 -080070 ":services.wifi-sources",
Andrei Onea43114702021-02-10 20:53:12 +000071 ],
72 visibility: ["//visibility:private"],
73}
74
75filegroup {
76 name: "services-all-sources",
77 srcs: [
78 ":services-non-updatable-sources",
79 ":service-media-s-sources",
Hai Zhang76f0def2020-01-16 01:42:58 -080080 ":service-permission-sources",
Muhammad Qureshi8ea733e2020-02-07 09:30:28 -080081 ":service-statsd-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090082 ],
83 visibility: ["//visibility:private"],
84}
85
Felipe Lemefec71a72021-04-01 23:32:53 -070086java_library {
87 name: "Slogf",
88 srcs: ["core/java/com/android/server/utils/Slogf.java"],
89}
90
Colin Crosseb652a42017-12-05 09:46:29 -080091// merge all required services into one jar
92// ============================================================
93java_library {
94 name: "services",
Colin Crossa12c0f52018-06-27 11:00:11 -070095 installable: true,
Colin Crosseb652a42017-12-05 09:46:29 -080096
97 dex_preopt: {
98 app_image: true,
99 profile: "art-profile",
100 },
101
Jiyong Parkbae2e902019-11-17 13:11:19 +0900102 srcs: [":services-main-sources"],
Colin Crosseb652a42017-12-05 09:46:29 -0800103
104 // The convention is to name each service module 'services.$(module_name)'
105 static_libs: [
Colin Cross4c0b06b2017-12-12 19:43:04 -0800106 "services.core",
Colin Crosseb652a42017-12-05 09:46:29 -0800107 "services.accessibility",
Sunny Goyal54e91342018-11-14 11:59:02 -0800108 "services.appprediction",
Colin Crosseb652a42017-12-05 09:46:29 -0800109 "services.appwidget",
110 "services.autofill",
111 "services.backup",
112 "services.companion",
Felipe Leme749b8892018-12-03 16:30:30 -0800113 "services.contentcapture",
Winson Chung3fb0f252019-01-08 17:41:55 -0800114 "services.contentsuggestions",
Colin Crosseb652a42017-12-05 09:46:29 -0800115 "services.coverage",
116 "services.devicepolicy",
117 "services.midi",
Nick Moukhinecf47bdd2020-08-19 16:29:18 +0200118 "services.musicsearch",
Colin Crosseb652a42017-12-05 09:46:29 -0800119 "services.net",
Danning Chen20b32ed2019-12-18 16:52:03 -0800120 "services.people",
Colin Crosseb652a42017-12-05 09:46:29 -0800121 "services.print",
Yi Kong86f85932020-06-29 20:03:55 +0800122 "services.profcollect",
Colin Crosseb652a42017-12-05 09:46:29 -0800123 "services.restrictions",
Hyunyoung Song21e60a92020-11-20 20:27:54 -0800124 "services.searchui",
Shashwat Razdand33e8c32021-01-29 13:02:19 -0800125 "services.smartspace",
Eugenio Marchioric3c0a1e2020-12-23 10:44:55 +0000126 "services.speech",
Igor Murashkin4de1e162018-11-26 10:33:17 -0800127 "services.startop",
Robert Berrye14120e2019-03-18 16:33:42 -0400128 "services.systemcaptions",
Adam He2653f232020-11-30 18:23:20 -0800129 "services.translation",
Alex Agranovich50c987f2021-02-18 09:19:33 +0000130 "services.texttospeech",
Colin Crosseb652a42017-12-05 09:46:29 -0800131 "services.usage",
132 "services.usb",
Roshan Pius27e1a872021-03-31 12:07:17 -0700133 "services.uwb",
Colin Crosseb652a42017-12-05 09:46:29 -0800134 "services.voiceinteraction",
Roshan Piusea33fb92020-02-20 12:49:45 -0800135 "services.wifi",
Dmitri Plotnikov4eaac3a2020-05-04 17:00:16 -0700136 "service-blobstore",
137 "service-jobscheduler",
Colin Crosseb652a42017-12-05 09:46:29 -0800138 "android.hidl.base-V1.0-java",
139 ],
140
141 libs: [
142 "android.hidl.manager-V1.0-java",
Paul Duffinabebc6a2020-05-31 11:35:50 +0100143 "framework-tethering.stubs.module_lib",
Chris Wailes09724a72021-02-08 10:00:13 -0800144 "service-art.stubs.system_server",
Colin Crosseb652a42017-12-05 09:46:29 -0800145 ],
146
147 // Uncomment to enable output of certain warnings (deprecated, unchecked)
148 //javacflags: ["-Xlint"],
Colin Crosseb652a42017-12-05 09:46:29 -0800149}
150
Colin Cross3a7d8992017-12-05 17:33:58 -0800151// native library
152// =============================================================
153
154cc_library_shared {
155 name: "libandroid_servers",
156 defaults: ["libservices.core-libs"],
157 whole_static_libs: ["libservices.core"],
158}
atrost86895aa2019-08-19 16:51:15 +0100159
160platform_compat_config {
161 name: "services-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100162 src: ":services",
163}
Ulya Trafimovich0d1b063d62019-12-03 11:59:51 +0000164
165filegroup {
166 name: "art-profile",
167 srcs: ["art-profile"],
168}
Jiyong Parkabc72e42019-11-17 15:17:53 +0900169
170// API stub
171// =============================================================
172
Andrei Onea43114702021-02-10 20:53:12 +0000173stubs_defaults {
174 name: "services-stubs-default",
Jiyong Parkabc72e42019-11-17 15:17:53 +0900175 installable: false,
Makoto Onukiaf97aef2020-02-03 10:32:52 -0800176 args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.SYSTEM_SERVER\\)" +
Jiyong Parkabc72e42019-11-17 15:17:53 +0900177 " --hide-annotation android.annotation.Hide" +
Anton Hanssonf74130f2020-02-19 18:29:12 +0000178 " --hide InternalClasses" + // com.android.* classes are okay in this interface
179 // TODO: remove the --hide options below
Jiyong Parkabc72e42019-11-17 15:17:53 +0900180 " --hide-package com.google.android.startop.iorap" +
Jiyong Parkabc72e42019-11-17 15:17:53 +0900181 " --hide DeprecationMismatch" +
182 " --hide HiddenTypedefConstant",
Jiyong Parkabc72e42019-11-17 15:17:53 +0900183 visibility: ["//visibility:private"],
Felipe Lemed3895b62021-03-24 16:55:27 -0700184 filter_packages: ["com.android."],
Andrei Onea43114702021-02-10 20:53:12 +0000185}
186
187droidstubs {
188 name: "services-stubs.sources",
189 srcs: [":services-all-sources"],
190 defaults: ["services-stubs-default"],
Jiyong Park13c923d2019-12-20 16:29:45 +0900191 check_api: {
192 current: {
193 api_file: "api/current.txt",
194 removed_api_file: "api/removed.txt",
195 },
Anton Hanssondaa9d882020-02-19 11:35:09 +0000196 last_released: {
Anton Hansson48ee95e2020-05-02 17:49:26 +0100197 api_file: ":android.api.system-server.latest",
Anton Hansson960c6752020-05-02 18:00:30 +0100198 removed_api_file: ":removed.api.system-server.latest",
Felipe Lemed3895b62021-03-24 16:55:27 -0700199 baseline_file: ":android-incompatibilities.api.system-server.latest",
Anton Hanssondaa9d882020-02-19 11:35:09 +0000200 },
201 api_lint: {
202 enabled: true,
Anton Hansson48ee95e2020-05-02 17:49:26 +0100203 new_since: ":android.api.system-server.latest",
Anton Hanssondaa9d882020-02-19 11:35:09 +0000204 baseline_file: "api/lint-baseline.txt",
205 },
Jiyong Park13c923d2019-12-20 16:29:45 +0900206 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000207 dists: [
208 {
Felipe Lemed3895b62021-03-24 16:55:27 -0700209 targets: [
210 "sdk",
211 "win_sdk",
212 ],
Anton Hansson85785fe2021-01-20 20:23:34 +0000213 dir: "apistubs/android/system-server/api",
214 dest: "android.txt",
Felipe Lemed3895b62021-03-24 16:55:27 -0700215 tag: ".api.txt",
Anton Hansson85785fe2021-01-20 20:23:34 +0000216 },
217 {
Felipe Lemed3895b62021-03-24 16:55:27 -0700218 targets: [
219 "sdk",
220 "win_sdk",
221 ],
Anton Hansson85785fe2021-01-20 20:23:34 +0000222 dir: "apistubs/android/system-server/api",
223 dest: "removed.txt",
224 tag: ".removed-api.txt",
225 },
Felipe Lemed3895b62021-03-24 16:55:27 -0700226 ],
Jiyong Parkabc72e42019-11-17 15:17:53 +0900227}
228
229java_library {
Anton Hanssona49fb992020-03-19 15:23:32 +0000230 name: "android_system_server_stubs_current",
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000231 defaults: ["android_stubs_dists_default"],
Jiyong Parkabc72e42019-11-17 15:17:53 +0900232 srcs: [":services-stubs.sources"],
233 installable: false,
Anton Hanssona49fb992020-03-19 15:23:32 +0000234 static_libs: ["android_module_lib_stubs_current"],
Anton Hansson4304e602020-07-21 12:55:48 +0100235 sdk_version: "none",
236 system_modules: "none",
237 java_version: "1.8",
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000238 dist: {
239 dir: "apistubs/android/system-server",
240 },
Jiyong Parkabc72e42019-11-17 15:17:53 +0900241}
Andrei Onea43114702021-02-10 20:53:12 +0000242
243droidstubs {
244 name: "services-non-updatable-stubs.sources",
245 srcs: [":services-non-updatable-sources"],
246 defaults: ["services-stubs-default"],
247 check_api: {
248 current: {
249 api_file: "api/non-updatable-current.txt",
250 removed_api_file: "api/non-updatable-removed.txt",
251 },
252 api_lint: {
253 enabled: true,
254 new_since: ":android-non-updatable.api.system-server.latest",
255 baseline_file: "api/non-updatable-lint-baseline.txt",
256 },
257 },
258 dists: [
259 {
Felipe Lemed3895b62021-03-24 16:55:27 -0700260 targets: [
261 "sdk",
262 "win_sdk",
263 ],
Andrei Onea43114702021-02-10 20:53:12 +0000264 dir: "apistubs/android/system-server/api",
265 dest: "android-non-updatable.txt",
Felipe Lemed3895b62021-03-24 16:55:27 -0700266 tag: ".api.txt",
Andrei Onea43114702021-02-10 20:53:12 +0000267 },
268 {
Felipe Lemed3895b62021-03-24 16:55:27 -0700269 targets: [
270 "sdk",
271 "win_sdk",
272 ],
Andrei Onea43114702021-02-10 20:53:12 +0000273 dir: "apistubs/android/system-server/api",
274 dest: "android-non-updatable-removed.txt",
275 tag: ".removed-api.txt",
276 },
Felipe Lemed3895b62021-03-24 16:55:27 -0700277 ],
278}