| package { |
| // See: http://go/android-license-faq |
| // A large-scale-change added 'default_applicable_licenses' to import |
| // all of the 'license_kinds' from "frameworks_base_license" |
| // to get the below license kinds: |
| // SPDX-license-identifier-Apache-2.0 |
| default_applicable_licenses: ["frameworks_base_license"], |
| } |
| |
| filegroup { |
| name: "services.core-sources-am-wm", |
| srcs: [ |
| "java/com/android/server/am/**/*.java", |
| "java/com/android/server/wm/**/*.java", |
| ], |
| path: "java", |
| visibility: ["//frameworks/base/services"], |
| } |
| |
| filegroup { |
| name: "services.core-sources", |
| srcs: ["java/**/*.java"], |
| exclude_srcs: [ |
| ":services.core-sources-am-wm", |
| ], |
| path: "java", |
| visibility: [ |
| "//frameworks/base/services", |
| "//frameworks/base/core/java/com/android/internal/protolog", |
| ], |
| } |
| |
| genrule { |
| name: "services.core.protologsrc", |
| srcs: [ |
| ":protolog-groups", |
| ":services.core-sources-am-wm", |
| ], |
| tools: ["protologtool"], |
| cmd: "$(location protologtool) transform-protolog-calls " + |
| "--protolog-class com.android.internal.protolog.common.ProtoLog " + |
| "--protolog-impl-class com.android.internal.protolog.ProtoLogImpl " + |
| "--protolog-cache-class 'com.android.server.wm.ProtoLogCache' " + |
| "--loggroups-class com.android.internal.protolog.ProtoLogGroup " + |
| "--loggroups-jar $(location :protolog-groups) " + |
| "--output-srcjar $(out) " + |
| "$(locations :services.core-sources-am-wm)", |
| out: ["services.core.protolog.srcjar"], |
| } |
| |
| genrule { |
| name: "generate-protolog.json", |
| srcs: [ |
| ":protolog-groups", |
| ":services.core-sources-am-wm", |
| ], |
| tools: ["protologtool"], |
| cmd: "$(location protologtool) generate-viewer-config " + |
| "--protolog-class com.android.internal.protolog.common.ProtoLog " + |
| "--loggroups-class com.android.internal.protolog.ProtoLogGroup " + |
| "--loggroups-jar $(location :protolog-groups) " + |
| "--viewer-conf $(out) " + |
| "$(locations :services.core-sources-am-wm)", |
| out: ["services.core.protolog.json"], |
| } |
| |
| genrule { |
| name: "checked-protolog.json", |
| srcs: [ |
| ":generate-protolog.json", |
| ":services.core.protolog.json", |
| ], |
| cmd: "cp $(location :generate-protolog.json) $(out) && " + |
| "{ ! (diff $(out) $(location :services.core.protolog.json) | grep -q '^<') || " + |
| "{ echo -e '\\n\\n################################################################\\n#\\n" + |
| "# ERROR: ProtoLog viewer config is stale. To update it, run:\\n#\\n" + |
| "# cp $(location :generate-protolog.json) " + |
| "$(location :services.core.protolog.json)\\n#\\n" + |
| "################################################################\\n\\n' >&2 && false; } }", |
| out: ["services.core.protolog.json"], |
| } |
| |
| genrule { |
| name: "statslog-art-java-gen", |
| tools: ["stats-log-api-gen"], |
| cmd: "$(location stats-log-api-gen) --java $(out) --module art" + |
| " --javaPackage com.android.internal.art --javaClass ArtStatsLog --worksource", |
| out: ["com/android/internal/art/ArtStatsLog.java"], |
| } |
| |
| genrule { |
| name: "statslog-contexthub-java-gen", |
| tools: ["stats-log-api-gen"], |
| cmd: "$(location stats-log-api-gen) --java $(out) --module contexthub" + |
| " --javaPackage com.android.server.location.contexthub --javaClass ContextHubStatsLog", |
| out: ["com/android/server/location/contexthub/ContextHubStatsLog.java"], |
| } |
| |
| java_library_static { |
| name: "services.core.unboosted", |
| defaults: ["platform_service_defaults"], |
| srcs: [ |
| ":android.hardware.biometrics.face-V2-java-source", |
| ":statslog-art-java-gen", |
| ":statslog-contexthub-java-gen", |
| ":services.core-sources", |
| ":services.core.protologsrc", |
| ":dumpstate_aidl", |
| ":framework_native_aidl", |
| ":gsiservice_aidl", |
| ":installd_aidl", |
| ":storaged_aidl", |
| ":vold_aidl", |
| ":platform-compat-config", |
| ":platform-compat-overrides", |
| ":display-device-config", |
| ":display-layout-config", |
| ":device-state-config", |
| "java/com/android/server/EventLogTags.logtags", |
| "java/com/android/server/am/EventLogTags.logtags", |
| "java/com/android/server/wm/EventLogTags.logtags", |
| "java/com/android/server/policy/EventLogTags.logtags", |
| ], |
| |
| libs: [ |
| "services.net", |
| "android.hardware.common-V2-java", |
| "android.hardware.light-V2.0-java", |
| "android.hardware.gnss-V2-java", |
| "android.hardware.vibrator-V2-java", |
| "app-compat-annotations", |
| "framework-tethering.stubs.module_lib", |
| "service-permission.stubs.system_server", |
| "service-rkp.stubs.system_server", |
| "service-sdksandbox.stubs.system_server", |
| ], |
| |
| required: [ |
| "default_television.xml", |
| "gps_debug.conf", |
| "protolog.conf.json.gz", |
| ], |
| |
| static_libs: [ |
| "android.frameworks.location.altitude-V1-java", // AIDL |
| "android.hardware.authsecret-V1.0-java", |
| "android.hardware.boot-V1.0-java", // HIDL |
| "android.hardware.boot-V1.1-java", // HIDL |
| "android.hardware.boot-V1.2-java", // HIDL |
| "android.hardware.boot-V1-java", // AIDL |
| "android.hardware.broadcastradio-V2.0-java", |
| "android.hardware.health-V1.0-java", // HIDL |
| "android.hardware.health-V2.0-java", // HIDL |
| "android.hardware.health-V2.1-java", // HIDL |
| "android.hardware.health-V2-java", // AIDL |
| "android.hardware.health-translate-java", |
| "android.hardware.light-V1-java", |
| "android.hardware.security.rkp-V3-java", |
| "android.hardware.tv.cec-V1.1-java", |
| "android.hardware.tv.hdmi.cec-V1-java", |
| "android.hardware.tv.hdmi.connection-V1-java", |
| "android.hardware.weaver-V1.0-java", |
| "android.hardware.biometrics.face-V1.0-java", |
| "android.hardware.biometrics.fingerprint-V2.3-java", |
| "android.hardware.biometrics.fingerprint-V2-java", |
| "android.hardware.oemlock-V1.0-java", |
| "android.hardware.oemlock-V1-java", |
| "android.hardware.configstore-V1.1-java", |
| "android.hardware.ir-V1-java", |
| "android.hardware.rebootescrow-V1-java", |
| "android.hardware.soundtrigger-V2.3-java", |
| "android.hardware.power.stats-V1-java", |
| "android.hardware.power-V3-java", |
| "android.hidl.manager-V1.2-java", |
| "capture_state_listener-aidl-java", |
| "cbor-java", |
| "icu4j_calendar_astronomer", |
| "netd-client", |
| "overlayable_policy_aidl-java", |
| "SurfaceFlingerProperties", |
| "com.android.sysprop.watchdog", |
| ], |
| javac_shard_size: 50, |
| } |
| |
| java_genrule { |
| name: "services.core.priorityboosted", |
| srcs: [":services.core.unboosted"], |
| tools: ["lockedregioncodeinjection"], |
| cmd: "$(location lockedregioncodeinjection) " + |
| " --targets \"Lcom/android/server/am/ActivityManagerService;,Lcom/android/server/am/ActivityManagerGlobalLock;,Lcom/android/server/wm/WindowManagerGlobalLock;\" " + |
| " --pre \"com/android/server/am/ActivityManagerService.boostPriorityForLockedSection,com/android/server/am/ActivityManagerService.boostPriorityForProcLockedSection,com/android/server/wm/WindowManagerService.boostPriorityForLockedSection\" " + |
| " --post \"com/android/server/am/ActivityManagerService.resetPriorityAfterLockedSection,com/android/server/am/ActivityManagerService.resetPriorityAfterProcLockedSection,com/android/server/wm/WindowManagerService.resetPriorityAfterLockedSection\" " + |
| " -o $(out) " + |
| " -i $(in)", |
| out: ["services.core.priorityboosted.jar"], |
| } |
| |
| java_library { |
| name: "services.core", |
| static_libs: ["services.core.priorityboosted"], |
| } |
| |
| java_library_host { |
| name: "core_cts_test_resources", |
| srcs: ["java/com/android/server/notification/SmallHash.java"], |
| } |
| |
| prebuilt_etc { |
| name: "gps_debug.conf", |
| src: "java/com/android/server/location/gnss/gps_debug.conf", |
| } |
| |
| genrule { |
| name: "services.core.json.gz", |
| srcs: [":checked-protolog.json"], |
| out: ["services.core.protolog.json.gz"], |
| cmd: "gzip -c < $(in) > $(out)", |
| } |
| |
| prebuilt_etc { |
| name: "protolog.conf.json.gz", |
| src: ":services.core.json.gz", |
| } |