• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
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
10filegroup {
11    name: "services.core-sources-am-wm",
12    srcs: [
13        "java/com/android/server/am/**/*.java",
14        "java/com/android/server/wm/**/*.java",
15    ],
16    path: "java",
17    visibility: ["//frameworks/base/services"],
18}
19
20filegroup {
21    name: "services.core-sources",
22    srcs: ["java/**/*.java"],
23    exclude_srcs: [
24        ":services.core-sources-am-wm",
25    ],
26    path: "java",
27    visibility: [
28        "//frameworks/base/services",
29        "//frameworks/base/core/java/com/android/internal/protolog",
30    ],
31}
32
33genrule {
34    name: "services.core.protologsrc",
35    srcs: [
36        ":protolog-groups",
37        ":services.core-sources-am-wm",
38    ],
39    tools: ["protologtool"],
40    cmd: "$(location protologtool) transform-protolog-calls " +
41        "--protolog-class com.android.internal.protolog.common.ProtoLog " +
42        "--protolog-impl-class com.android.internal.protolog.ProtoLogImpl " +
43        "--protolog-cache-class 'com.android.server.wm.ProtoLogCache' " +
44        "--loggroups-class com.android.internal.protolog.ProtoLogGroup " +
45        "--loggroups-jar $(location :protolog-groups) " +
46        "--output-srcjar $(out) " +
47        "$(locations :services.core-sources-am-wm)",
48    out: ["services.core.protolog.srcjar"],
49}
50
51genrule {
52    name: "generate-protolog.json",
53    srcs: [
54        ":protolog-groups",
55        ":services.core-sources-am-wm",
56    ],
57    tools: ["protologtool"],
58    cmd: "$(location protologtool) generate-viewer-config " +
59        "--protolog-class com.android.internal.protolog.common.ProtoLog " +
60        "--loggroups-class com.android.internal.protolog.ProtoLogGroup " +
61        "--loggroups-jar $(location :protolog-groups) " +
62        "--viewer-conf $(out) " +
63        "$(locations :services.core-sources-am-wm)",
64    out: ["services.core.protolog.json"],
65}
66
67genrule {
68    name: "checked-protolog.json",
69    srcs: [
70        ":generate-protolog.json",
71        ":services.core.protolog.json",
72    ],
73    cmd: "cp $(location :generate-protolog.json) $(out) && " +
74        "{ ! (diff $(out) $(location :services.core.protolog.json) | grep -q '^<') || " +
75        "{ echo -e '\\n\\n################################################################\\n#\\n" +
76        "#  ERROR: ProtoLog viewer config is stale.  To update it, run:\\n#\\n" +
77        "#  cp $(location :generate-protolog.json) " +
78        "$(location :services.core.protolog.json)\\n#\\n" +
79        "################################################################\\n\\n' >&2 && false; } }",
80    out: ["services.core.protolog.json"],
81}
82
83genrule {
84    name: "statslog-art-java-gen",
85    tools: ["stats-log-api-gen"],
86    cmd: "$(location stats-log-api-gen) --java $(out) --module art" +
87        " --javaPackage com.android.internal.art --javaClass ArtStatsLog --worksource",
88    out: ["com/android/internal/art/ArtStatsLog.java"],
89}
90
91genrule {
92    name: "statslog-contexthub-java-gen",
93    tools: ["stats-log-api-gen"],
94    cmd: "$(location stats-log-api-gen) --java $(out) --module contexthub" +
95        " --javaPackage com.android.server.location.contexthub --javaClass ContextHubStatsLog",
96    out: ["com/android/server/location/contexthub/ContextHubStatsLog.java"],
97}
98
99java_library_static {
100    name: "services.core.unboosted",
101    defaults: ["platform_service_defaults"],
102    srcs: [
103        ":android.hardware.biometrics.face-V3-java-source",
104        ":android.hardware.tv.hdmi.connection-V1-java-source",
105        ":android.hardware.tv.hdmi.earc-V1-java-source",
106        ":statslog-art-java-gen",
107        ":statslog-contexthub-java-gen",
108        ":services.core-sources",
109        ":services.core.protologsrc",
110        ":dumpstate_aidl",
111        ":framework_native_aidl",
112        ":gsiservice_aidl",
113        ":installd_aidl",
114        ":storaged_aidl",
115        ":vold_aidl",
116        ":platform-compat-config",
117        ":platform-compat-overrides",
118        ":display-device-config",
119        ":display-layout-config",
120        ":device-state-config",
121        "java/com/android/server/EventLogTags.logtags",
122        "java/com/android/server/am/EventLogTags.logtags",
123        "java/com/android/server/wm/EventLogTags.logtags",
124        "java/com/android/server/policy/EventLogTags.logtags",
125    ],
126
127    libs: [
128        "services.net",
129        "android.hardware.common-V2-java",
130        "android.hardware.light-V2.0-java",
131        "android.hardware.gnss-V2-java",
132        "android.hardware.vibrator-V2-java",
133        "app-compat-annotations",
134        "framework-tethering.stubs.module_lib",
135        "service-art.stubs.system_server",
136        "service-permission.stubs.system_server",
137        "service-rkp.stubs.system_server",
138        "service-sdksandbox.stubs.system_server",
139    ],
140    plugins: ["ImmutabilityAnnotationProcessor"],
141
142    required: [
143        "default_television.xml",
144        "gps_debug.conf",
145        "protolog.conf.json.gz",
146    ],
147
148    static_libs: [
149        "android.frameworks.location.altitude-V1-java", // AIDL
150        "android.hardware.authsecret-V1.0-java",
151        "android.hardware.authsecret-V1-java",
152        "android.hardware.boot-V1.0-java", // HIDL
153        "android.hardware.boot-V1.1-java", // HIDL
154        "android.hardware.boot-V1.2-java", // HIDL
155        "android.hardware.boot-V1-java",   // AIDL
156        "android.hardware.broadcastradio-V2.0-java", // HIDL
157        "android.hardware.broadcastradio-V1-java", // AIDL
158        "android.hardware.health-V1.0-java", // HIDL
159        "android.hardware.health-V2.0-java", // HIDL
160        "android.hardware.health-V2.1-java", // HIDL
161        "android.hardware.health-V2-java", // AIDL
162        "android.hardware.health-translate-java",
163        "android.hardware.light-V1-java",
164        "android.hardware.security.rkp-V3-java",
165        "android.hardware.tv.cec-V1.1-java",
166        "android.hardware.tv.hdmi.cec-V1-java",
167        "android.hardware.tv.hdmi.connection-V1-java",
168        "android.hardware.tv.hdmi.earc-V1-java",
169        "android.hardware.weaver-V1.0-java",
170        "android.hardware.weaver-V2-java",
171        "android.hardware.biometrics.face-V1.0-java",
172        "android.hardware.biometrics.fingerprint-V2.3-java",
173        "android.hardware.oemlock-V1.0-java",
174        "android.hardware.oemlock-V1-java",
175        "android.hardware.configstore-V1.1-java",
176        "android.hardware.ir-V1-java",
177        "android.hardware.rebootescrow-V1-java",
178        "android.hardware.power.stats-V2-java",
179        "android.hardware.power-V4-java",
180        "android.hidl.manager-V1.2-java",
181        "cbor-java",
182        "icu4j_calendar_astronomer",
183        "netd-client",
184        "overlayable_policy_aidl-java",
185        "SurfaceFlingerProperties",
186        "com.android.sysprop.watchdog",
187        "ImmutabilityAnnotation",
188        "securebox",
189    ],
190    javac_shard_size: 50,
191    javacflags: [
192        "-J--add-modules=jdk.compiler",
193        "-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
194        "-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED",
195        "-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
196        "-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
197    ],
198}
199
200java_genrule {
201    name: "services.core.priorityboosted",
202    srcs: [":services.core.unboosted"],
203    tools: ["lockedregioncodeinjection"],
204    cmd: "$(location lockedregioncodeinjection) " +
205        "  --targets \"Lcom/android/server/am/ActivityManagerService;,Lcom/android/server/am/ActivityManagerGlobalLock;,Lcom/android/server/wm/WindowManagerGlobalLock;\" " +
206        "  --pre \"com/android/server/am/ActivityManagerService.boostPriorityForLockedSection,com/android/server/am/ActivityManagerService.boostPriorityForProcLockedSection,com/android/server/wm/WindowManagerService.boostPriorityForLockedSection\" " +
207        "  --post \"com/android/server/am/ActivityManagerService.resetPriorityAfterLockedSection,com/android/server/am/ActivityManagerService.resetPriorityAfterProcLockedSection,com/android/server/wm/WindowManagerService.resetPriorityAfterLockedSection\" " +
208        "  -o $(out) " +
209        "  -i $(in)",
210    out: ["services.core.priorityboosted.jar"],
211}
212
213java_library {
214    name: "services.core",
215    static_libs: ["services.core.priorityboosted"],
216}
217
218java_library_host {
219    name: "core_cts_test_resources",
220    srcs: ["java/com/android/server/notification/SmallHash.java"],
221}
222
223prebuilt_etc {
224    name: "gps_debug.conf",
225    src: "java/com/android/server/location/gnss/gps_debug.conf",
226}
227
228genrule {
229    name: "services.core.json.gz",
230    srcs: [":checked-protolog.json"],
231    out: ["services.core.protolog.json.gz"],
232    cmd: "$(location minigzip) -c < $(in) > $(out)",
233    tools: ["minigzip"],
234}
235
236prebuilt_etc {
237    name: "protolog.conf.json.gz",
238    src: ":services.core.json.gz",
239}
240