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-V2-java-source", 104 ":statslog-art-java-gen", 105 ":statslog-contexthub-java-gen", 106 ":services.core-sources", 107 ":services.core.protologsrc", 108 ":dumpstate_aidl", 109 ":framework_native_aidl", 110 ":gsiservice_aidl", 111 ":installd_aidl", 112 ":storaged_aidl", 113 ":vold_aidl", 114 ":platform-compat-config", 115 ":platform-compat-overrides", 116 ":display-device-config", 117 ":display-layout-config", 118 ":device-state-config", 119 "java/com/android/server/EventLogTags.logtags", 120 "java/com/android/server/am/EventLogTags.logtags", 121 "java/com/android/server/wm/EventLogTags.logtags", 122 "java/com/android/server/policy/EventLogTags.logtags", 123 ], 124 125 libs: [ 126 "services.net", 127 "android.hardware.common-V2-java", 128 "android.hardware.light-V2.0-java", 129 "android.hardware.gnss-V2-java", 130 "android.hardware.vibrator-V2-java", 131 "app-compat-annotations", 132 "framework-tethering.stubs.module_lib", 133 "service-permission.stubs.system_server", 134 "service-sdksandbox.stubs.system_server", 135 ], 136 137 required: [ 138 "default_television.xml", 139 "gps_debug.conf", 140 "protolog.conf.json.gz", 141 ], 142 143 static_libs: [ 144 "time_zone_distro", 145 "time_zone_distro_installer", 146 "android.hardware.authsecret-V1.0-java", 147 "android.hardware.boot-V1.0-java", 148 "android.hardware.boot-V1.1-java", 149 "android.hardware.boot-V1.2-java", 150 "android.hardware.broadcastradio-V2.0-java", 151 "android.hardware.health-V1.0-java", // HIDL 152 "android.hardware.health-V2.0-java", // HIDL 153 "android.hardware.health-V2.1-java", // HIDL 154 "android.hardware.health-V1-java", // AIDL 155 "android.hardware.health-translate-java", 156 "android.hardware.light-V1-java", 157 "android.hardware.tv.cec-V1.1-java", 158 "android.hardware.weaver-V1.0-java", 159 "android.hardware.biometrics.face-V1.0-java", 160 "android.hardware.biometrics.fingerprint-V2.3-java", 161 "android.hardware.biometrics.fingerprint-V2-java", 162 "android.hardware.oemlock-V1.0-java", 163 "android.hardware.configstore-V1.1-java", 164 "android.hardware.ir-V1-java", 165 "android.hardware.rebootescrow-V1-java", 166 "android.hardware.soundtrigger-V2.3-java", 167 "android.hardware.power.stats-V1-java", 168 "android.hardware.power-V3-java", 169 "android.hidl.manager-V1.2-java", 170 "capture_state_listener-aidl-java", 171 "icu4j_calendar_astronomer", 172 "netd-client", 173 "overlayable_policy_aidl-java", 174 "SurfaceFlingerProperties", 175 "com.android.sysprop.watchdog", 176 ], 177 javac_shard_size: 50, 178} 179 180java_genrule { 181 name: "services.core.priorityboosted", 182 srcs: [":services.core.unboosted"], 183 tools: ["lockedregioncodeinjection"], 184 cmd: "$(location lockedregioncodeinjection) " + 185 " --targets \"Lcom/android/server/am/ActivityManagerService;,Lcom/android/server/am/ActivityManagerGlobalLock;,Lcom/android/server/wm/WindowManagerGlobalLock;\" " + 186 " --pre \"com/android/server/am/ActivityManagerService.boostPriorityForLockedSection,com/android/server/am/ActivityManagerService.boostPriorityForProcLockedSection,com/android/server/wm/WindowManagerService.boostPriorityForLockedSection\" " + 187 " --post \"com/android/server/am/ActivityManagerService.resetPriorityAfterLockedSection,com/android/server/am/ActivityManagerService.resetPriorityAfterProcLockedSection,com/android/server/wm/WindowManagerService.resetPriorityAfterLockedSection\" " + 188 " -o $(out) " + 189 " -i $(in)", 190 out: ["services.core.priorityboosted.jar"], 191} 192 193java_library { 194 name: "services.core", 195 static_libs: ["services.core.priorityboosted"], 196} 197 198java_library_host { 199 name: "core_cts_test_resources", 200 srcs: ["java/com/android/server/notification/SmallHash.java"], 201} 202 203prebuilt_etc { 204 name: "gps_debug.conf", 205 src: "java/com/android/server/location/gnss/gps_debug.conf", 206} 207 208genrule { 209 name: "services.core.json.gz", 210 srcs: [":checked-protolog.json"], 211 out: ["services.core.protolog.json.gz"], 212 cmd: "$(location minigzip) -c < $(in) > $(out)", 213 tools: ["minigzip"], 214} 215 216prebuilt_etc { 217 name: "protolog.conf.json.gz", 218 src: ":services.core.json.gz", 219} 220