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 | |
| 19 | apex_key { |
| 20 | name: "com.android.hardware.power.key", |
| 21 | public_key: "com.android.hardware.power.avbpubkey", |
| 22 | private_key: "com.android.hardware.power.pem", |
| 23 | } |
| 24 | |
| 25 | android_app_certificate { |
| 26 | name: "com.android.hardware.power.certificate", |
| 27 | certificate: "com.android.hardware.power", |
| 28 | } |
| 29 | |
| 30 | genrule { |
| 31 | name: "com.android.hardware.power.rc-srcs", |
| 32 | srcs: [ |
| 33 | ":android.hardware.power.rc", |
| 34 | ":android.hardware.power.stats.rc", |
| 35 | ], |
| 36 | out: ["com.android.hardware.power.rc"], |
| 37 | cmd: "sed -E 's/\\/vendor/\\/apex\\/com.android.hardware.power/' $(in) > $(out)", |
| 38 | } |
| 39 | |
| 40 | prebuilt_etc { |
| 41 | name: "com.android.hardware.power.rc", |
| 42 | src: ":com.android.hardware.power.rc-srcs", |
| 43 | installable: false, |
| 44 | } |
| 45 | |
| 46 | apex { |
| 47 | name: "com.android.hardware.power", |
| 48 | manifest: "apex_manifest.json", |
| 49 | key: "com.android.hardware.power.key", |
| 50 | certificate: ":com.android.hardware.power.certificate", |
| 51 | file_contexts: "file_contexts", |
| 52 | use_vndk_as_stable: true, |
| 53 | updatable: false, |
| 54 | // Install the apex in /vendor/apex |
| 55 | soc_specific: true, |
| 56 | // Bundle the Power and PowerStats HALs into this one APEX. |
| 57 | binaries: [ |
| 58 | "android.hardware.power-service.example", |
| 59 | "android.hardware.power.stats-service.example", |
| 60 | ], |
| 61 | prebuilts: [ |
| 62 | "com.android.hardware.power.rc", |
| 63 | ], |
| 64 | vintf_fragments: [ |
| 65 | ":android.hardware.power.xml", |
| 66 | ":android.hardware.power.stats.xml", |
| 67 | ], |
| 68 | overrides: [ |
| 69 | // Shared lib installed by default but unused by the AIDL implementation. |
| 70 | "power.default", |
| 71 | ], |
| 72 | } |