Daniel Norman | 0f956a6 | 2021-10-19 15:40:01 -0700 | [diff] [blame] | 1 | // Copyright (C) 2021 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package { |
| 16 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 17 | } |
| 18 | |
Daniel Norman | 0f956a6 | 2021-10-19 15:40:01 -0700 | [diff] [blame] | 19 | genrule { |
| 20 | name: "com.android.hardware.power.rc-srcs", |
| 21 | srcs: [ |
| 22 | ":android.hardware.power.rc", |
| 23 | ":android.hardware.power.stats.rc", |
| 24 | ], |
| 25 | out: ["com.android.hardware.power.rc"], |
Jooyung Han | cadd26d | 2023-10-10 10:55:42 +0900 | [diff] [blame^] | 26 | cmd: "sed -E 's@/vendor/bin/@/apex/com.android.hardware.power/bin/@' $(in) > $(out)", |
Daniel Norman | 0f956a6 | 2021-10-19 15:40:01 -0700 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | prebuilt_etc { |
| 30 | name: "com.android.hardware.power.rc", |
| 31 | src: ":com.android.hardware.power.rc-srcs", |
| 32 | installable: false, |
| 33 | } |
| 34 | |
| 35 | apex { |
| 36 | name: "com.android.hardware.power", |
| 37 | manifest: "apex_manifest.json", |
Jooyung Han | a0b0a62 | 2023-10-10 10:47:36 +0900 | [diff] [blame] | 38 | key: "com.android.hardware.key", |
| 39 | certificate: ":com.android.hardware.certificate", |
Daniel Norman | 0f956a6 | 2021-10-19 15:40:01 -0700 | [diff] [blame] | 40 | file_contexts: "file_contexts", |
Daniel Norman | 0f956a6 | 2021-10-19 15:40:01 -0700 | [diff] [blame] | 41 | updatable: false, |
Jooyung Han | cadd26d | 2023-10-10 10:55:42 +0900 | [diff] [blame^] | 42 | vendor: true, |
| 43 | |
Daniel Norman | 0f956a6 | 2021-10-19 15:40:01 -0700 | [diff] [blame] | 44 | // Bundle the Power and PowerStats HALs into this one APEX. |
| 45 | binaries: [ |
| 46 | "android.hardware.power-service.example", |
| 47 | "android.hardware.power.stats-service.example", |
| 48 | ], |
| 49 | prebuilts: [ |
| 50 | "com.android.hardware.power.rc", |
Jooyung Han | cadd26d | 2023-10-10 10:55:42 +0900 | [diff] [blame^] | 51 | "android.hardware.power.xml", |
| 52 | "android.hardware.power.stats.xml", |
Daniel Norman | 0f956a6 | 2021-10-19 15:40:01 -0700 | [diff] [blame] | 53 | ], |
| 54 | overrides: [ |
| 55 | // Shared lib installed by default but unused by the AIDL implementation. |
| 56 | "power.default", |
| 57 | ], |
| 58 | } |