Jiyong Park | bae2e90 | 2019-11-17 13:11:19 +0900 | [diff] [blame] | 1 | filegroup { |
| 2 | name: "services.core-sources", |
| 3 | srcs: ["java/**/*.java"], |
| 4 | path: "java", |
| 5 | visibility: ["//frameworks/base/services"], |
| 6 | } |
| 7 | |
Adam Pardyl | 0f1b3d4 | 2019-08-19 15:24:11 +0200 | [diff] [blame] | 8 | java_library { |
| 9 | name: "protolog-common", |
| 10 | srcs: [ |
| 11 | "java/com/android/server/protolog/common/**/*.java", |
| 12 | ], |
| 13 | host_supported: true, |
| 14 | } |
| 15 | |
| 16 | java_library { |
| 17 | name: "services.core.wm.protologgroups", |
| 18 | srcs: [ |
| 19 | "java/com/android/server/wm/ProtoLogGroup.java", |
| 20 | ], |
| 21 | static_libs: ["protolog-common"], |
| 22 | } |
| 23 | |
| 24 | genrule { |
| 25 | name: "services.core.protologsrc", |
Jiyong Park | bae2e90 | 2019-11-17 13:11:19 +0900 | [diff] [blame] | 26 | srcs: [ |
| 27 | ":services.core.wm.protologgroups", |
| 28 | ":services.core-sources", |
| 29 | ], |
Adam Pardyl | 0f1b3d4 | 2019-08-19 15:24:11 +0200 | [diff] [blame] | 30 | tools: ["protologtool"], |
| 31 | cmd: "$(location protologtool) transform-protolog-calls " + |
| 32 | "--protolog-class com.android.server.protolog.common.ProtoLog " + |
| 33 | "--protolog-impl-class com.android.server.protolog.ProtoLogImpl " + |
Adrian Roos | 2ca5d86 | 2019-10-03 17:30:14 +0200 | [diff] [blame] | 34 | "--protolog-cache-class 'com.android.server.protolog.ProtoLog$$Cache' " + |
Adam Pardyl | 0f1b3d4 | 2019-08-19 15:24:11 +0200 | [diff] [blame] | 35 | "--loggroups-class com.android.server.wm.ProtoLogGroup " + |
| 36 | "--loggroups-jar $(location :services.core.wm.protologgroups) " + |
| 37 | "--output-srcjar $(out) " + |
Jiyong Park | bae2e90 | 2019-11-17 13:11:19 +0900 | [diff] [blame] | 38 | "$(locations :services.core-sources)", |
Adam Pardyl | 0f1b3d4 | 2019-08-19 15:24:11 +0200 | [diff] [blame] | 39 | out: ["services.core.protolog.srcjar"], |
| 40 | } |
| 41 | |
| 42 | genrule { |
| 43 | name: "generate-protolog.json", |
Jiyong Park | bae2e90 | 2019-11-17 13:11:19 +0900 | [diff] [blame] | 44 | srcs: [ |
| 45 | ":services.core.wm.protologgroups", |
| 46 | ":services.core-sources", |
| 47 | ], |
Adam Pardyl | 0f1b3d4 | 2019-08-19 15:24:11 +0200 | [diff] [blame] | 48 | tools: ["protologtool"], |
| 49 | cmd: "$(location protologtool) generate-viewer-config " + |
| 50 | "--protolog-class com.android.server.protolog.common.ProtoLog " + |
| 51 | "--loggroups-class com.android.server.wm.ProtoLogGroup " + |
| 52 | "--loggroups-jar $(location :services.core.wm.protologgroups) " + |
| 53 | "--viewer-conf $(out) " + |
Jiyong Park | bae2e90 | 2019-11-17 13:11:19 +0900 | [diff] [blame] | 54 | "$(locations :services.core-sources)", |
Adam Pardyl | 0f1b3d4 | 2019-08-19 15:24:11 +0200 | [diff] [blame] | 55 | out: ["services.core.protolog.json"], |
| 56 | } |
| 57 | |
| 58 | genrule { |
| 59 | name: "checked-protolog.json", |
| 60 | srcs: [ |
| 61 | ":generate-protolog.json", |
| 62 | ":services.core.protolog.json", |
| 63 | ], |
| 64 | cmd: "cp $(location :generate-protolog.json) $(out) && " + |
Adrian Roos | 125b839 | 2019-10-02 19:03:34 +0200 | [diff] [blame] | 65 | "{ ! (diff $(out) $(location :services.core.protolog.json) | grep -q '^<') || " + |
Adrian Roos | b2af8ab | 2019-10-02 14:48:11 +0200 | [diff] [blame] | 66 | "{ echo -e '\\n\\n################################################################\\n#\\n" + |
| 67 | "# ERROR: ProtoLog viewer config is stale. To update it, run:\\n#\\n" + |
| 68 | "# cp $(location :generate-protolog.json) " + |
| 69 | "$(location :services.core.protolog.json)\\n#\\n" + |
| 70 | "################################################################\\n\\n' >&2 && false; } }", |
Adam Pardyl | 0f1b3d4 | 2019-08-19 15:24:11 +0200 | [diff] [blame] | 71 | out: ["services.core.protolog.json"], |
| 72 | } |
| 73 | |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 74 | java_library_static { |
Colin Cross | 4c0b06b | 2017-12-12 19:43:04 -0800 | [diff] [blame] | 75 | name: "services.core.unboosted", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 76 | srcs: [ |
Adam Pardyl | 0f1b3d4 | 2019-08-19 15:24:11 +0200 | [diff] [blame] | 77 | ":services.core.protologsrc", |
Nandana Dutt | b3f7168 | 2018-10-03 10:01:25 +0100 | [diff] [blame] | 78 | ":dumpstate_aidl", |
Jiyong Park | bae2e90 | 2019-11-17 13:11:19 +0900 | [diff] [blame] | 79 | ":framework_native_aidl", |
| 80 | ":gsiservice_aidl", |
MÃ¥rten Kongstad | 06a1ac8 | 2018-09-20 13:09:47 +0200 | [diff] [blame] | 81 | ":idmap2_aidl", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 82 | ":installd_aidl", |
| 83 | ":storaged_aidl", |
| 84 | ":vold_aidl", |
atrost | 7e6060f | 2019-07-24 14:12:48 +0100 | [diff] [blame] | 85 | ":platform-compat-config", |
Santos Cordon | 4505e5e | 2020-01-17 15:18:10 +0000 | [diff] [blame] | 86 | ":display-device-config", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 87 | "java/com/android/server/EventLogTags.logtags", |
| 88 | "java/com/android/server/am/EventLogTags.logtags", |
Jeff Chang | d136e77 | 2019-11-05 20:33:52 +0800 | [diff] [blame] | 89 | "java/com/android/server/wm/EventLogTags.logtags", |
Siarhei Vishniakou | 4dfa470 | 2019-03-25 15:38:11 -0700 | [diff] [blame] | 90 | "java/com/android/server/policy/EventLogTags.logtags", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 91 | ], |
| 92 | |
| 93 | libs: [ |
Anton Hansson | a49fb99 | 2020-03-19 15:23:32 +0000 | [diff] [blame] | 94 | "android_system_server_stubs_current", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 95 | "services.net", |
| 96 | "android.hardware.light-V2.0-java", |
Jia-yi Chen | bfd8f1f | 2020-02-24 13:27:16 -0800 | [diff] [blame] | 97 | "android.hardware.power-java", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 98 | "android.hardware.power-V1.0-java", |
| 99 | "android.hardware.tv.cec-V1.0-java", |
Steven Moreland | f53d7fe | 2020-01-06 13:40:51 -0800 | [diff] [blame] | 100 | "android.hardware.vibrator-java", |
Anton Hansson | 0d95282d | 2020-03-12 16:56:08 +0000 | [diff] [blame] | 101 | "android.net.ipsec.ike.stubs.module_libs_api", |
atrost | 1a94550 | 2019-11-04 17:03:54 +0000 | [diff] [blame] | 102 | "app-compat-annotations", |
Anton Hansson | fe8b045 | 2020-03-07 12:36:42 +0000 | [diff] [blame] | 103 | "framework-tethering-stubs-module_libs_api", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 104 | ], |
| 105 | |
Anton Hansson | 11905c6 | 2018-11-27 12:10:30 +0000 | [diff] [blame] | 106 | required: [ |
| 107 | "gps_debug.conf", |
Adam Pardyl | 0f1b3d4 | 2019-08-19 15:24:11 +0200 | [diff] [blame] | 108 | "protolog.conf.json.gz", |
Anton Hansson | 11905c6 | 2018-11-27 12:10:30 +0000 | [diff] [blame] | 109 | ], |
| 110 | |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 111 | static_libs: [ |
| 112 | "time_zone_distro", |
| 113 | "time_zone_distro_installer", |
Andrew Scull | e6527c1 | 2018-01-05 18:33:58 +0000 | [diff] [blame] | 114 | "android.hardware.authsecret-V1.0-java", |
Tomasz Wasilczyk | d65b3ca | 2017-12-13 08:26:25 -0800 | [diff] [blame] | 115 | "android.hardware.broadcastradio-V2.0-java", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 116 | "android.hardware.health-V1.0-java", |
| 117 | "android.hardware.health-V2.0-java", |
Stephane Lee | 90bf874 | 2020-02-06 18:48:03 -0800 | [diff] [blame] | 118 | "android.hardware.health-V2.1-java", |
Ivailo Karamanolev | c176fb8 | 2019-12-02 10:41:25 +0100 | [diff] [blame] | 119 | "android.hardware.light-java", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 120 | "android.hardware.weaver-V1.0-java", |
Ilya Matyukhin | 244aee6 | 2020-03-16 18:39:47 +0000 | [diff] [blame] | 121 | "android.hardware.biometrics.face-V1.0-java", |
Ilya Matyukhin | ef410e3 | 2020-02-04 13:39:48 -0800 | [diff] [blame] | 122 | "android.hardware.biometrics.fingerprint-V2.2-java", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 123 | "android.hardware.oemlock-V1.0-java", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 124 | "android.hardware.configstore-V1.0-java", |
| 125 | "android.hardware.contexthub-V1.0-java", |
Kenny Root | f76cfc3 | 2019-11-08 14:36:03 -0800 | [diff] [blame] | 126 | "android.hardware.rebootescrow-java", |
Ytai Ben-Tsvi | 93c117c86 | 2019-11-25 12:43:28 -0800 | [diff] [blame] | 127 | "android.hardware.soundtrigger-V2.3-java", |
Peter Kalauskas | 65589e9 | 2019-01-22 15:41:59 -0800 | [diff] [blame] | 128 | "android.hidl.manager-V1.2-java", |
Lorenzo Colitti | fe0c38a | 2019-05-21 19:45:09 +0900 | [diff] [blame] | 129 | "dnsresolver_aidl_interface-V2-java", |
Lorenzo Colitti | 31324cb | 2018-12-11 13:45:14 +0900 | [diff] [blame] | 130 | "netd_event_listener_interface-java", |
Winson | 62ac8b5 | 2019-12-04 08:36:48 -0800 | [diff] [blame] | 131 | "overlayable_policy_aidl-java", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 132 | ], |
Bernardo Rufino | 60c39b3 | 2019-11-08 16:11:15 +0000 | [diff] [blame] | 133 | |
| 134 | plugins: [ |
| 135 | "compat-changeid-annotation-processor", |
| 136 | ], |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 137 | } |
| 138 | |
| 139 | java_genrule { |
| 140 | name: "services.core.priorityboosted", |
Colin Cross | 4c0b06b | 2017-12-12 19:43:04 -0800 | [diff] [blame] | 141 | srcs: [":services.core.unboosted"], |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 142 | tools: ["lockedregioncodeinjection"], |
| 143 | cmd: "$(location lockedregioncodeinjection) " + |
Wale Ogunwale | db485de | 2018-10-29 09:47:07 -0700 | [diff] [blame] | 144 | " --targets \"Lcom/android/server/am/ActivityManagerService;,Lcom/android/server/wm/WindowManagerGlobalLock;\" " + |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 145 | " --pre \"com/android/server/am/ActivityManagerService.boostPriorityForLockedSection,com/android/server/wm/WindowManagerService.boostPriorityForLockedSection\" " + |
| 146 | " --post \"com/android/server/am/ActivityManagerService.resetPriorityAfterLockedSection,com/android/server/wm/WindowManagerService.resetPriorityAfterLockedSection\" " + |
| 147 | " -o $(out) " + |
| 148 | " -i $(in)", |
| 149 | out: ["services.core.priorityboosted.jar"], |
| 150 | } |
Colin Cross | 4c0b06b | 2017-12-12 19:43:04 -0800 | [diff] [blame] | 151 | |
| 152 | java_library { |
| 153 | name: "services.core", |
| 154 | static_libs: ["services.core.priorityboosted"], |
| 155 | } |
Anton Hansson | 11905c6 | 2018-11-27 12:10:30 +0000 | [diff] [blame] | 156 | |
| 157 | |
| 158 | prebuilt_etc { |
| 159 | name: "gps_debug.conf", |
| 160 | src: "java/com/android/server/location/gps_debug.conf", |
| 161 | } |
Adam Pardyl | 0f1b3d4 | 2019-08-19 15:24:11 +0200 | [diff] [blame] | 162 | |
| 163 | genrule { |
| 164 | name: "services.core.json.gz", |
| 165 | srcs: [":checked-protolog.json"], |
| 166 | out: ["services.core.protolog.json.gz"], |
Adrian Roos | a91161e | 2019-10-09 13:16:33 +0200 | [diff] [blame] | 167 | cmd: "$(location minigzip) -c < $(in) > $(out)", |
| 168 | tools: ["minigzip"], |
Adam Pardyl | 0f1b3d4 | 2019-08-19 15:24:11 +0200 | [diff] [blame] | 169 | } |
| 170 | |
| 171 | prebuilt_etc { |
| 172 | name: "protolog.conf.json.gz", |
| 173 | src: ":services.core.json.gz", |
| 174 | } |