blob: a1956476e49ce365c01a014fd250a8cd08417983 [file] [log] [blame]
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",
srcs: ["java/**/*.java"],
exclude_srcs: [":connectivity-service-srcs"],
path: "java",
visibility: ["//frameworks/base/services"],
}
java_library {
name: "protolog-common",
srcs: [
"java/com/android/server/protolog/common/**/*.java",
],
host_supported: true,
}
java_library {
name: "services.core.wm.protologgroups",
srcs: [
"java/com/android/server/wm/ProtoLogGroup.java",
],
static_libs: ["protolog-common"],
}
genrule {
name: "services.core.protologsrc",
srcs: [
":services.core.wm.protologgroups",
":services.core-sources",
],
tools: ["protologtool"],
cmd: "$(location protologtool) transform-protolog-calls " +
"--protolog-class com.android.server.protolog.common.ProtoLog " +
"--protolog-impl-class com.android.server.protolog.ProtoLogImpl " +
"--protolog-cache-class 'com.android.server.protolog.ProtoLog$$Cache' " +
"--loggroups-class com.android.server.wm.ProtoLogGroup " +
"--loggroups-jar $(location :services.core.wm.protologgroups) " +
"--output-srcjar $(out) " +
"$(locations :services.core-sources)",
out: ["services.core.protolog.srcjar"],
}
genrule {
name: "generate-protolog.json",
srcs: [
":services.core.wm.protologgroups",
":services.core-sources",
],
tools: ["protologtool"],
cmd: "$(location protologtool) generate-viewer-config " +
"--protolog-class com.android.server.protolog.common.ProtoLog " +
"--loggroups-class com.android.server.wm.ProtoLogGroup " +
"--loggroups-jar $(location :services.core.wm.protologgroups) " +
"--viewer-conf $(out) " +
"$(locations :services.core-sources)",
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"],
}
java_library_static {
name: "services.core.unboosted",
srcs: [
":services.core.protologsrc",
":dumpstate_aidl",
":framework_native_aidl",
":gsiservice_aidl",
":idmap2_aidl",
":installd_aidl",
":storaged_aidl",
":vold_aidl",
":platform-compat-config",
":platform-compat-overrides",
":display-device-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.light-V2.0-java",
"android.hardware.power-V1-java",
"android.hardware.power-V1.0-java",
"android.hardware.vibrator-V1-java",
"app-compat-annotations",
"framework-tethering.stubs.module_lib",
"service-permission.stubs.system_server",
],
required: [
"gps_debug.conf",
"protolog.conf.json.gz",
],
static_libs: [
"time_zone_distro",
"time_zone_distro_installer",
"android.hardware.authsecret-V1.0-java",
"android.hardware.boot-V1.0-java",
"android.hardware.boot-V1.1-java",
"android.hardware.boot-V1.2-java",
"android.hardware.broadcastradio-V2.0-java",
"android.hardware.health-V1.0-java",
"android.hardware.health-V2.0-java",
"android.hardware.health-V2.1-java",
"android.hardware.light-V1-java",
"android.hardware.tv.cec-V1.0-java",
"android.hardware.weaver-V1.0-java",
"android.hardware.biometrics.face-V1.0-java",
"android.hardware.biometrics.fingerprint-V2.2-java",
"android.hardware.oemlock-V1.0-java",
"android.hardware.configstore-V1.0-java",
"android.hardware.contexthub-V1.0-java",
"android.hardware.rebootescrow-V1-java",
"android.hardware.soundtrigger-V2.3-java",
"android.hidl.manager-V1.2-java",
"capture_state_listener-aidl-java",
"dnsresolver_aidl_interface-V7-java",
"icu4j_calendar_astronomer",
"netd-client",
"overlayable_policy_aidl-java",
"SurfaceFlingerProperties",
"com.android.sysprop.watchdog",
],
}
java_genrule {
name: "services.core.priorityboosted",
srcs: [":services.core.unboosted"],
tools: ["lockedregioncodeinjection"],
cmd: "$(location lockedregioncodeinjection) " +
" --targets \"Lcom/android/server/am/ActivityManagerService;,Lcom/android/server/wm/WindowManagerGlobalLock;\" " +
" --pre \"com/android/server/am/ActivityManagerService.boostPriorityForLockedSection,com/android/server/wm/WindowManagerService.boostPriorityForLockedSection\" " +
" --post \"com/android/server/am/ActivityManagerService.resetPriorityAfterLockedSection,com/android/server/wm/WindowManagerService.resetPriorityAfterLockedSection\" " +
" -o $(out) " +
" -i $(in)",
out: ["services.core.priorityboosted.jar"],
}
java_library {
name: "services.core",
defaults: ["services_defaults"],
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/gps_debug.conf",
}
genrule {
name: "services.core.json.gz",
srcs: [":checked-protolog.json"],
out: ["services.core.protolog.json.gz"],
cmd: "$(location minigzip) -c < $(in) > $(out)",
tools: ["minigzip"],
}
prebuilt_etc {
name: "protolog.conf.json.gz",
src: ":services.core.json.gz",
}
// TODO: Move connectivity service sources to independent directory.
filegroup {
name: "connectivity-service-srcs",
srcs: [
"java/com/android/server/ConnectivityService.java",
"java/com/android/server/ConnectivityServiceInitializer.java",
"java/com/android/server/TestNetworkService.java",
"java/com/android/server/connectivity/AutodestructReference.java",
"java/com/android/server/connectivity/ConnectivityConstants.java",
"java/com/android/server/connectivity/DataConnectionStats.java",
"java/com/android/server/connectivity/DnsManager.java",
"java/com/android/server/connectivity/KeepaliveTracker.java",
"java/com/android/server/connectivity/LingerMonitor.java",
"java/com/android/server/connectivity/MockableSystemProperties.java",
"java/com/android/server/connectivity/Nat464Xlat.java",
"java/com/android/server/connectivity/NetworkAgentInfo.java",
"java/com/android/server/connectivity/NetworkDiagnostics.java",
"java/com/android/server/connectivity/NetworkNotificationManager.java",
"java/com/android/server/connectivity/NetworkRanker.java",
"java/com/android/server/connectivity/PermissionMonitor.java",
"java/com/android/server/connectivity/ProxyTracker.java",
"java/com/android/server/connectivity/QosCallbackAgentConnection.java",
"java/com/android/server/connectivity/QosCallbackTracker.java",
"java/com/android/server/connectivity/TcpKeepaliveController.java",
],
}