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 33java_library_static { 34 name: "services-config-update", 35 srcs: [ 36 "java/**/ConfigUpdateInstallReceiver.java", 37 "java/**/*.logtags", 38 ], 39} 40 41genrule { 42 name: "services.core.protologsrc", 43 srcs: [ 44 ":protolog-impl", 45 ":protolog-groups", 46 ":services.core-sources-am-wm", 47 ], 48 tools: ["protologtool"], 49 cmd: "$(location protologtool) transform-protolog-calls " + 50 "--protolog-class com.android.internal.protolog.common.ProtoLog " + 51 "--loggroups-class com.android.internal.protolog.ProtoLogGroup " + 52 "--loggroups-jar $(location :protolog-groups) " + 53 "--viewer-config-file-path /etc/core.protolog.pb " + 54 "--legacy-viewer-config-file-path /system/etc/protolog.conf.json.gz " + 55 "--legacy-output-file-path /data/misc/wmtrace/wm_log.winscope " + 56 "--output-srcjar $(out) " + 57 "$(locations :services.core-sources-am-wm)", 58 out: ["services.core.protolog.srcjar"], 59} 60 61genrule { 62 name: "generate-protolog.json", 63 srcs: [ 64 ":protolog-groups", 65 ":services.core-sources-am-wm", 66 ], 67 tools: ["protologtool"], 68 cmd: "$(location protologtool) generate-viewer-config " + 69 "--protolog-class com.android.internal.protolog.common.ProtoLog " + 70 "--loggroups-class com.android.internal.protolog.ProtoLogGroup " + 71 "--loggroups-jar $(location :protolog-groups) " + 72 "--viewer-config-type json " + 73 "--viewer-config $(out) " + 74 "$(locations :services.core-sources-am-wm)", 75 out: ["services.core.protolog.json"], 76} 77 78genrule { 79 name: "gen-core.protolog.pb", 80 srcs: [ 81 ":protolog-groups", 82 ":services.core-sources-am-wm", 83 ], 84 tools: ["protologtool"], 85 cmd: "$(location protologtool) generate-viewer-config " + 86 "--protolog-class com.android.internal.protolog.common.ProtoLog " + 87 "--loggroups-class com.android.internal.protolog.ProtoLogGroup " + 88 "--loggroups-jar $(location :protolog-groups) " + 89 "--viewer-config-type proto " + 90 "--viewer-config $(out) " + 91 "$(locations :services.core-sources-am-wm)", 92 out: ["core.protolog.pb"], 93} 94 95genrule { 96 name: "statslog-art-java-gen", 97 tools: ["stats-log-api-gen"], 98 cmd: "$(location stats-log-api-gen) --java $(out) --module art" + 99 " --javaPackage com.android.internal.art --javaClass ArtStatsLog --worksource", 100 out: ["com/android/internal/art/ArtStatsLog.java"], 101} 102 103genrule { 104 name: "statslog-contexthub-java-gen", 105 tools: ["stats-log-api-gen"], 106 cmd: "$(location stats-log-api-gen) --java $(out) --module contexthub" + 107 " --javaPackage com.android.server.location.contexthub --javaClass ContextHubStatsLog", 108 out: ["com/android/server/location/contexthub/ContextHubStatsLog.java"], 109} 110 111java_library_static { 112 name: "services.core.unboosted", 113 defaults: [ 114 "platform_service_defaults", 115 "android.hardware.power-java_shared", 116 "latest_android_hardware_broadcastradio_java_static", 117 ], 118 srcs: [ 119 ":android.hardware.tv.hdmi.connection-V1-java-source", 120 ":android.hardware.tv.hdmi.earc-V1-java-source", 121 ":statslog-art-java-gen", 122 ":statslog-contexthub-java-gen", 123 ":services.core-sources", 124 ":services.core.protologsrc", 125 ":dumpstate_aidl", 126 ":framework_native_aidl", 127 ":gsiservice_aidl", 128 ":installd_aidl", 129 ":storaged_aidl", 130 ":vold_aidl", 131 ":platform-compat-config", 132 ":platform-compat-overrides", 133 ":display-device-config", 134 ":display-layout-config", 135 ":device-state-config", 136 "java/com/android/server/EventLogTags.logtags", 137 "java/com/android/server/am/EventLogTags.logtags", 138 "java/com/android/server/wm/EventLogTags.logtags", 139 "java/com/android/server/policy/EventLogTags.logtags", 140 141 // Java/AIDL sources to be moved out to CrashRecovery module 142 ":services-crashrecovery-sources", 143 ], 144 145 libs: [ 146 "services.net", 147 "android.frameworks.location.altitude-V2-java", 148 "android.hardware.common-V2-java", 149 "android.hardware.light-V2.0-java", 150 "android.hardware.gnss-V2-java", 151 "android.hardware.vibrator-V2-java", 152 "app-compat-annotations", 153 "framework-tethering.stubs.module_lib", 154 "keepanno-annotations", 155 "service-art.stubs.system_server", 156 "service-permission.stubs.system_server", 157 "service-rkp.stubs.system_server", 158 "service-sdksandbox.stubs.system_server", 159 "device_policy_aconfig_flags_lib", 160 ], 161 plugins: ["ImmutabilityAnnotationProcessor"], 162 163 required: [ 164 "default_television.xml", 165 "gps_debug.conf", 166 "protolog.conf.json.gz", 167 "core.protolog.pb", 168 ], 169 170 static_libs: [ 171 "android.frameworks.vibrator-V1-java", // AIDL 172 "android.hardware.authsecret-V1.0-java", 173 "android.hardware.authsecret-V1-java", 174 "android.hardware.boot-V1.0-java", // HIDL 175 "android.hardware.boot-V1.1-java", // HIDL 176 "android.hardware.boot-V1.2-java", // HIDL 177 "android.hardware.boot-V1-java", // AIDL 178 "android.hardware.broadcastradio-V2.0-java", // HIDL 179 "android.hardware.health-V1.0-java", // HIDL 180 "android.hardware.health-V2.0-java", // HIDL 181 "android.hardware.health-V2.1-java", // HIDL 182 "android.hardware.health-V3-java", // AIDL 183 "android.hardware.health-translate-java", 184 "android.hardware.light-V1-java", 185 "android.hardware.security.authgraph-V1-java", 186 "android.hardware.security.rkp-V3-java", 187 "android.hardware.security.secretkeeper-V1-java", 188 "android.hardware.tv.cec-V1.1-java", 189 "android.hardware.tv.hdmi.cec-V1-java", 190 "android.hardware.tv.hdmi.connection-V1-java", 191 "android.hardware.tv.hdmi.earc-V1-java", 192 "android.hardware.weaver-V1.0-java", 193 "android.hardware.weaver-V2-java", 194 "android.hardware.biometrics.face-V1.0-java", 195 "android.hardware.biometrics.fingerprint-V2.3-java", 196 "android.hardware.oemlock-V1.0-java", 197 "android.hardware.oemlock-V1-java", 198 "android.hardware.configstore-V1.1-java", 199 "android.hardware.ir-V1-java", 200 "android.hardware.rebootescrow-V1-java", 201 "android.hardware.power.stats-V2-java", 202 "android.hidl.manager-V1.2-java", 203 "cbor-java", 204 "com.android.media.audio-aconfig-java", 205 "icu4j_calendar_astronomer", 206 "android.security.aaid_aidl-java", 207 "netd-client", 208 "overlayable_policy_aidl-java", 209 "SurfaceFlingerProperties", 210 "com.android.sysprop.watchdog", 211 "securebox", 212 "apache-commons-math", 213 "battery_saver_flag_lib", 214 "notification_flags_lib", 215 "power_hint_flags_lib", 216 "biometrics_flags_lib", 217 "am_flags_lib", 218 "com_android_server_accessibility_flags_lib", 219 "//frameworks/libs/systemui:com_android_systemui_shared_flags_lib", 220 "com_android_wm_shell_flags_lib", 221 "com.android.server.utils_aconfig-java", 222 "service-jobscheduler-deviceidle.flags-aconfig-java", 223 "policy_flags_lib", 224 "net_flags_lib", 225 "stats_flags_lib", 226 "core_os_flags_lib", 227 "connectivity_flags_lib", 228 "dreams_flags_lib", 229 "aconfig_new_storage_flags_lib", 230 "powerstats_flags_lib", 231 ], 232 javac_shard_size: 50, 233 javacflags: [ 234 "-J--add-modules=jdk.compiler", 235 "-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", 236 "-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", 237 "-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", 238 "-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", 239 ], 240 lint: { 241 baseline_filename: "lint-baseline.xml", 242 }, 243} 244 245java_genrule { 246 name: "services.core.priorityboosted", 247 srcs: [":services.core.unboosted"], 248 tools: ["lockedregioncodeinjection"], 249 cmd: "$(location lockedregioncodeinjection) " + 250 " --targets \"Lcom/android/server/am/ActivityManagerService;,Lcom/android/server/am/ActivityManagerGlobalLock;,Lcom/android/server/wm/WindowManagerGlobalLock;,Lcom/android/server/pm/PackageManagerTracedLock;\" " + 251 " --pre \"com/android/server/am/ActivityManagerService.boostPriorityForLockedSection,com/android/server/am/ActivityManagerService.boostPriorityForProcLockedSection,com/android/server/wm/WindowManagerService.boostPriorityForLockedSection,com/android/server/pm/PackageManagerService.boostPriorityForPackageManagerTracedLockedSection\" " + 252 " --post \"com/android/server/am/ActivityManagerService.resetPriorityAfterLockedSection,com/android/server/am/ActivityManagerService.resetPriorityAfterProcLockedSection,com/android/server/wm/WindowManagerService.resetPriorityAfterLockedSection,com/android/server/pm/PackageManagerService.resetPriorityAfterPackageManagerTracedLockedSection\" " + 253 " -o $(out) " + 254 " -i $(in)", 255 out: ["services.core.priorityboosted.jar"], 256} 257 258java_library { 259 name: "services.core", 260 static_libs: ["services.core.priorityboosted"], 261} 262 263java_library_host { 264 name: "core_cts_test_resources", 265 srcs: ["java/com/android/server/notification/SmallHash.java"], 266} 267 268prebuilt_etc { 269 name: "gps_debug.conf", 270 src: "java/com/android/server/location/gnss/gps_debug.conf", 271} 272 273genrule { 274 name: "services.core.json.gz", 275 srcs: [":generate-protolog.json"], 276 out: ["services.core.protolog.json.gz"], 277 cmd: "gzip -c < $(in) > $(out)", 278} 279 280prebuilt_etc { 281 name: "protolog.conf.json.gz", 282 src: ":services.core.json.gz", 283} 284 285prebuilt_etc { 286 name: "core.protolog.pb", 287 src: ":gen-core.protolog.pb", 288} 289