| 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", |
| ], |
| } |
| |
| java_library_static { |
| name: "services-config-update", |
| srcs: [ |
| "java/**/ConfigUpdateInstallReceiver.java", |
| "java/**/*.logtags", |
| ], |
| } |
| |
| genrule { |
| name: "services.core.protologsrc", |
| srcs: [ |
| ":protolog-impl", |
| ":protolog-groups", |
| ":services.core-sources-am-wm", |
| ], |
| tools: ["protologtool"], |
| cmd: "$(location protologtool) transform-protolog-calls " + |
| "--protolog-class com.android.internal.protolog.common.ProtoLog " + |
| "--loggroups-class com.android.internal.protolog.ProtoLogGroup " + |
| "--loggroups-jar $(location :protolog-groups) " + |
| "--viewer-config-file-path /etc/core.protolog.pb " + |
| "--legacy-viewer-config-file-path /system/etc/protolog.conf.json.gz " + |
| "--legacy-output-file-path /data/misc/wmtrace/wm_log.winscope " + |
| "--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-config-type json " + |
| "--viewer-config $(out) " + |
| "$(locations :services.core-sources-am-wm)", |
| out: ["services.core.protolog.json"], |
| } |
| |
| genrule { |
| name: "gen-core.protolog.pb", |
| 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-config-type proto " + |
| "--viewer-config $(out) " + |
| "$(locations :services.core-sources-am-wm)", |
| out: ["core.protolog.pb"], |
| } |
| |
| 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 $${ANDROID_BUILD_TOP}/$(location :generate-protolog.json) " + |
| "$${ANDROID_BUILD_TOP}/$(location :services.core.protolog.json)\\n#\\n" + |
| "################################################################\\n\\n' >&2 && false; } }", |
| out: ["services.core.protolog.json"], |
| } |
| |
| genrule { |
| name: "checked-core.protolog.pb", |
| srcs: [ |
| ":gen-core.protolog.pb", |
| ":file-core.protolog.pb", |
| ], |
| cmd: "cp $(location :gen-core.protolog.pb) $(out) && " + |
| "{ ! (diff $(out) $(location :file-core.protolog.pb) | grep -q '^<') || " + |
| "{ echo -e '\\n\\n################################################################\\n#\\n" + |
| "# ERROR: ProtoLog viewer config is stale. To update it, run:\\n#\\n" + |
| "# cp $${ANDROID_BUILD_TOP}/$(location :gen-core.protolog.pb) " + |
| "$${ANDROID_BUILD_TOP}/$(location :file-core.protolog.pb)\\n#\\n" + |
| "################################################################\\n\\n' >&2 && false; } }", |
| out: ["core.protolog.pb"], |
| } |
| |
| 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", |
| "android.hardware.power-java_shared", |
| ], |
| srcs: [ |
| ":android.hardware.tv.hdmi.connection-V1-java-source", |
| ":android.hardware.tv.hdmi.earc-V1-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", |
| |
| // Java/AIDL sources to be moved out to CrashRecovery module |
| ":services-crashrecovery-sources", |
| ], |
| |
| libs: [ |
| "services.net", |
| "android.frameworks.location.altitude-V2-java", |
| "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-art.stubs.system_server", |
| "service-permission.stubs.system_server", |
| "service-rkp.stubs.system_server", |
| "service-sdksandbox.stubs.system_server", |
| "device_policy_aconfig_flags_lib", |
| ], |
| plugins: ["ImmutabilityAnnotationProcessor"], |
| |
| required: [ |
| "default_television.xml", |
| "gps_debug.conf", |
| "protolog.conf.json.gz", |
| "core.protolog.pb", |
| ], |
| |
| static_libs: [ |
| "android.frameworks.vibrator-V1-java", // AIDL |
| "android.hardware.authsecret-V1.0-java", |
| "android.hardware.authsecret-V1-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", // HIDL |
| "android.hardware.broadcastradio-V2-java", // AIDL |
| "android.hardware.health-V1.0-java", // HIDL |
| "android.hardware.health-V2.0-java", // HIDL |
| "android.hardware.health-V2.1-java", // HIDL |
| "android.hardware.health-V3-java", // AIDL |
| "android.hardware.health-translate-java", |
| "android.hardware.light-V1-java", |
| "android.hardware.security.authgraph-V1-java", |
| "android.hardware.security.rkp-V3-java", |
| "android.hardware.security.secretkeeper-V1-java", |
| "android.hardware.tv.cec-V1.1-java", |
| "android.hardware.tv.hdmi.cec-V1-java", |
| "android.hardware.tv.hdmi.connection-V1-java", |
| "android.hardware.tv.hdmi.earc-V1-java", |
| "android.hardware.weaver-V1.0-java", |
| "android.hardware.weaver-V2-java", |
| "android.hardware.biometrics.face-V1.0-java", |
| "android.hardware.biometrics.fingerprint-V2.3-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.power.stats-V2-java", |
| "android.hidl.manager-V1.2-java", |
| "cbor-java", |
| "com.android.media.audio-aconfig-java", |
| "dropbox_flags_lib", |
| "icu4j_calendar_astronomer", |
| "android.security.aaid_aidl-java", |
| "netd-client", |
| "overlayable_policy_aidl-java", |
| "SurfaceFlingerProperties", |
| "com.android.sysprop.watchdog", |
| "securebox", |
| "apache-commons-math", |
| "backstage_power_flags_lib", |
| "notification_flags_lib", |
| "biometrics_flags_lib", |
| "am_flags_lib", |
| "com_android_server_accessibility_flags_lib", |
| "com_android_systemui_shared_flags_lib", |
| "com_android_wm_shell_flags_lib", |
| "com.android.server.utils_aconfig-java", |
| "service-jobscheduler-deviceidle.flags-aconfig-java", |
| "policy_flags_lib", |
| "net_flags_lib", |
| "stats_flags_lib", |
| "core_os_flags_lib", |
| ], |
| javac_shard_size: 50, |
| javacflags: [ |
| "-J--add-modules=jdk.compiler", |
| "-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", |
| "-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", |
| "-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", |
| "-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", |
| ], |
| lint: { |
| baseline_filename: "lint-baseline.xml", |
| }, |
| } |
| |
| 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;,Lcom/android/server/pm/PackageManagerTracedLock;\" " + |
| " --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\" " + |
| " --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\" " + |
| " -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", |
| } |
| |
| prebuilt_etc { |
| name: "core.protolog.pb", |
| src: ":checked-core.protolog.pb", |
| } |