1/* 2 * Copyright (C) 2018 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20cc_defaults { 21 name: "android.hardware.health-service.cuttlefish-defaults", 22 relative_install_path: "hw", 23 24 srcs: [ 25 "health-aidl.cpp", 26 ], 27 28 cflags: [ 29 "-Wall", 30 "-Werror", 31 ], 32 33 static_libs: [ 34 "android.hardware.health-V3-ndk", 35 "libbase", 36 "libbatterymonitor", 37 "libcutils", 38 "libhealth_aidl_impl", 39 "libhealthloop", 40 "libutils", 41 ], 42 43 shared_libs: [ 44 "libbinder_ndk", 45 "liblog", 46 ], 47} 48 49cc_binary { 50 name: "android.hardware.health-service.cuttlefish", 51 defaults: ["android.hardware.health-service.cuttlefish-defaults"], 52 stl: "c++_static", 53 proprietary: true, 54 installable: false, // installed in APEX 55} 56 57cc_binary { 58 name: "android.hardware.health-service.cuttlefish_recovery", 59 defaults: ["android.hardware.health-service.cuttlefish-defaults"], 60 recovery: true, 61 init_rc: ["android.hardware.health-service.cuttlefish_recovery.rc"], 62 vintf_fragments: ["android.hardware.health-service.cuttlefish.xml"], 63 overrides: ["charger.recovery"], 64} 65 66prebuilt_etc { 67 name: "android.hardware.health-service.cuttlefish.rc", 68 src: "android.hardware.health-service.cuttlefish.rc", 69 installable: false, 70} 71 72prebuilt_etc { 73 name: "android.hardware.health-service.cuttlefish.xml", 74 src: "android.hardware.health-service.cuttlefish.xml", 75 sub_dir: "vintf", 76 installable: false, 77} 78 79apex { 80 name: "com.google.cf.health", 81 manifest: "apex_manifest.json", 82 file_contexts: "apex_file_contexts", 83 key: "com.google.cf.apex.key", 84 certificate: ":com.google.cf.apex.certificate", 85 updatable: false, 86 vendor: true, 87 88 binaries: ["android.hardware.health-service.cuttlefish"], 89 overrides: ["charger"], 90 prebuilts: [ 91 "android.hardware.health-service.cuttlefish.rc", 92 "android.hardware.health-service.cuttlefish.xml", 93 ], 94} 95 96// Deprecated. Retained to be used on other devices. It is not installed on cuttlefish. 97// TODO(b/210183170): Delete once other devices transition to the AIDL HAL. 98cc_library_shared { 99 name: "android.hardware.health@2.1-impl-cuttlefish", 100 stem: "android.hardware.health@2.0-impl-2.1-cuttlefish", 101 proprietary: true, 102 recovery_available: true, 103 104 relative_install_path: "hw", 105 106 srcs: [ 107 "health-hidl.cpp", 108 ], 109 110 cflags: [ 111 "-Wall", 112 "-Werror", 113 ], 114 115 static_libs: [ 116 "android.hardware.health@1.0-convert", 117 "libbatterymonitor", 118 "libhealthloop", 119 "libhealth2impl", 120 ], 121 122 shared_libs: [ 123 "libbase", 124 "libcutils", 125 "libhidlbase", 126 "libutils", 127 "android.hardware.health@2.0", 128 "android.hardware.health@2.1", 129 ], 130} 131