Adam Pardyl | 0f1b3d4 | 2019-08-19 15:24:11 +0200 | [diff] [blame] | 1 | java_library { |
| 2 | name: "protolog-common", |
| 3 | srcs: [ |
| 4 | "java/com/android/server/protolog/common/**/*.java", |
| 5 | ], |
| 6 | host_supported: true, |
| 7 | } |
| 8 | |
| 9 | java_library { |
| 10 | name: "services.core.wm.protologgroups", |
| 11 | srcs: [ |
| 12 | "java/com/android/server/wm/ProtoLogGroup.java", |
| 13 | ], |
| 14 | static_libs: ["protolog-common"], |
| 15 | } |
| 16 | |
| 17 | genrule { |
| 18 | name: "services.core.protologsrc", |
| 19 | srcs: [":services.core.wm.protologgroups", "java/**/*.java"], |
| 20 | tools: ["protologtool"], |
| 21 | cmd: "$(location protologtool) transform-protolog-calls " + |
| 22 | "--protolog-class com.android.server.protolog.common.ProtoLog " + |
| 23 | "--protolog-impl-class com.android.server.protolog.ProtoLogImpl " + |
| 24 | "--loggroups-class com.android.server.wm.ProtoLogGroup " + |
| 25 | "--loggroups-jar $(location :services.core.wm.protologgroups) " + |
| 26 | "--output-srcjar $(out) " + |
| 27 | "$(locations java/**/*.java)", |
| 28 | out: ["services.core.protolog.srcjar"], |
| 29 | } |
| 30 | |
| 31 | genrule { |
| 32 | name: "generate-protolog.json", |
| 33 | srcs: [":services.core.wm.protologgroups", "java/**/*.java"], |
| 34 | tools: ["protologtool"], |
| 35 | cmd: "$(location protologtool) generate-viewer-config " + |
| 36 | "--protolog-class com.android.server.protolog.common.ProtoLog " + |
| 37 | "--loggroups-class com.android.server.wm.ProtoLogGroup " + |
| 38 | "--loggroups-jar $(location :services.core.wm.protologgroups) " + |
| 39 | "--viewer-conf $(out) " + |
| 40 | "$(locations java/**/*.java)", |
| 41 | out: ["services.core.protolog.json"], |
| 42 | } |
| 43 | |
| 44 | genrule { |
| 45 | name: "checked-protolog.json", |
| 46 | srcs: [ |
| 47 | ":generate-protolog.json", |
| 48 | ":services.core.protolog.json", |
| 49 | ], |
| 50 | cmd: "cp $(location :generate-protolog.json) $(out) && " + |
| 51 | "{ diff $(out) $(location :services.core.protolog.json) >/dev/null 2>&1 || " + |
| 52 | "{ echo -e '##### ProtoLog viewer config is stale. ### \nRun: \n " + |
| 53 | "cp $(location :generate-protolog.json) " + |
| 54 | "$(location :services.core.protolog.json)\n' >&2 && false; } }", |
| 55 | out: ["services.core.protolog.json"], |
| 56 | } |
| 57 | |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 58 | java_library_static { |
Colin Cross | 4c0b06b | 2017-12-12 19:43:04 -0800 | [diff] [blame] | 59 | name: "services.core.unboosted", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 60 | |
| 61 | aidl: { |
| 62 | include_dirs: [ |
Mårten Kongstad | 06a1ac8 | 2018-09-20 13:09:47 +0200 | [diff] [blame] | 63 | "frameworks/base/cmds/idmap2/idmap2d/aidl", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 64 | "frameworks/native/aidl/binder", |
Nandana Dutt | b3f7168 | 2018-10-03 10:01:25 +0100 | [diff] [blame] | 65 | "frameworks/native/cmds/dumpstate/binder", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 66 | "system/core/storaged/binder", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 67 | "system/vold/binder", |
Howard Chen | 0a94764 | 2019-01-07 14:10:44 +0800 | [diff] [blame] | 68 | "system/gsid/aidl", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 69 | ], |
| 70 | }, |
| 71 | srcs: [ |
Adam Pardyl | 0f1b3d4 | 2019-08-19 15:24:11 +0200 | [diff] [blame] | 72 | ":services.core.protologsrc", |
Nandana Dutt | b3f7168 | 2018-10-03 10:01:25 +0100 | [diff] [blame] | 73 | ":dumpstate_aidl", |
Mårten Kongstad | 06a1ac8 | 2018-09-20 13:09:47 +0200 | [diff] [blame] | 74 | ":idmap2_aidl", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 75 | ":installd_aidl", |
| 76 | ":storaged_aidl", |
| 77 | ":vold_aidl", |
Howard Chen | 0a94764 | 2019-01-07 14:10:44 +0800 | [diff] [blame] | 78 | ":gsiservice_aidl", |
atrost | 7e6060f | 2019-07-24 14:12:48 +0100 | [diff] [blame] | 79 | ":platform-compat-config", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 80 | "java/com/android/server/EventLogTags.logtags", |
| 81 | "java/com/android/server/am/EventLogTags.logtags", |
Siarhei Vishniakou | 4dfa470 | 2019-03-25 15:38:11 -0700 | [diff] [blame] | 82 | "java/com/android/server/policy/EventLogTags.logtags", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 83 | ], |
| 84 | |
| 85 | libs: [ |
| 86 | "services.net", |
| 87 | "android.hardware.light-V2.0-java", |
| 88 | "android.hardware.power-V1.0-java", |
| 89 | "android.hardware.tv.cec-V1.0-java", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 90 | ], |
| 91 | |
Anton Hansson | 11905c6 | 2018-11-27 12:10:30 +0000 | [diff] [blame] | 92 | required: [ |
| 93 | "gps_debug.conf", |
Adam Pardyl | 0f1b3d4 | 2019-08-19 15:24:11 +0200 | [diff] [blame] | 94 | "protolog.conf.json.gz", |
Anton Hansson | 11905c6 | 2018-11-27 12:10:30 +0000 | [diff] [blame] | 95 | ], |
| 96 | |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 97 | static_libs: [ |
| 98 | "time_zone_distro", |
| 99 | "time_zone_distro_installer", |
Andrew Scull | e6527c1 | 2018-01-05 18:33:58 +0000 | [diff] [blame] | 100 | "android.hardware.authsecret-V1.0-java", |
Tomasz Wasilczyk | d65b3ca | 2017-12-13 08:26:25 -0800 | [diff] [blame] | 101 | "android.hardware.broadcastradio-V2.0-java", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 102 | "android.hardware.health-V1.0-java", |
| 103 | "android.hardware.health-V2.0-java", |
| 104 | "android.hardware.weaver-V1.0-java", |
Kevin Chyn | 55a5b59 | 2018-06-15 12:12:18 -0700 | [diff] [blame] | 105 | "android.hardware.biometrics.face-V1.0-java", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 106 | "android.hardware.biometrics.fingerprint-V2.1-java", |
| 107 | "android.hardware.oemlock-V1.0-java", |
| 108 | "android.hardware.tetheroffload.control-V1.0-java", |
| 109 | "android.hardware.vibrator-V1.0-java", |
| 110 | "android.hardware.configstore-V1.0-java", |
| 111 | "android.hardware.contexthub-V1.0-java", |
Peter Kalauskas | 65589e9 | 2019-01-22 15:41:59 -0800 | [diff] [blame] | 112 | "android.hidl.manager-V1.2-java", |
Lorenzo Colitti | fe0c38a | 2019-05-21 19:45:09 +0900 | [diff] [blame] | 113 | "dnsresolver_aidl_interface-V2-java", |
Luke Huang | b0d5246 | 2019-03-21 14:43:08 +0800 | [diff] [blame] | 114 | "netd_aidl_interface-java", |
Lorenzo Colitti | 31324cb | 2018-12-11 13:45:14 +0900 | [diff] [blame] | 115 | "netd_event_listener_interface-java", |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 116 | ], |
| 117 | } |
| 118 | |
| 119 | java_genrule { |
| 120 | name: "services.core.priorityboosted", |
Colin Cross | 4c0b06b | 2017-12-12 19:43:04 -0800 | [diff] [blame] | 121 | srcs: [":services.core.unboosted"], |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 122 | tools: ["lockedregioncodeinjection"], |
| 123 | cmd: "$(location lockedregioncodeinjection) " + |
Wale Ogunwale | db485de | 2018-10-29 09:47:07 -0700 | [diff] [blame] | 124 | " --targets \"Lcom/android/server/am/ActivityManagerService;,Lcom/android/server/wm/WindowManagerGlobalLock;\" " + |
Colin Cross | e0b2ee5 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 125 | " --pre \"com/android/server/am/ActivityManagerService.boostPriorityForLockedSection,com/android/server/wm/WindowManagerService.boostPriorityForLockedSection\" " + |
| 126 | " --post \"com/android/server/am/ActivityManagerService.resetPriorityAfterLockedSection,com/android/server/wm/WindowManagerService.resetPriorityAfterLockedSection\" " + |
| 127 | " -o $(out) " + |
| 128 | " -i $(in)", |
| 129 | out: ["services.core.priorityboosted.jar"], |
| 130 | } |
Colin Cross | 4c0b06b | 2017-12-12 19:43:04 -0800 | [diff] [blame] | 131 | |
| 132 | java_library { |
| 133 | name: "services.core", |
| 134 | static_libs: ["services.core.priorityboosted"], |
| 135 | } |
Anton Hansson | 11905c6 | 2018-11-27 12:10:30 +0000 | [diff] [blame] | 136 | |
| 137 | |
| 138 | prebuilt_etc { |
| 139 | name: "gps_debug.conf", |
| 140 | src: "java/com/android/server/location/gps_debug.conf", |
| 141 | } |
Adam Pardyl | 0f1b3d4 | 2019-08-19 15:24:11 +0200 | [diff] [blame] | 142 | |
| 143 | genrule { |
| 144 | name: "services.core.json.gz", |
| 145 | srcs: [":checked-protolog.json"], |
| 146 | out: ["services.core.protolog.json.gz"], |
| 147 | cmd: "gzip < $(in) > $(out)", |
| 148 | } |
| 149 | |
| 150 | prebuilt_etc { |
| 151 | name: "protolog.conf.json.gz", |
| 152 | src: ":services.core.json.gz", |
| 153 | } |