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