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-V4-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 vintf_fragment_modules: ["android.hardware.health-service.cuttlefish.xml"], 56} 57 58cc_binary { 59 name: "android.hardware.health-service.cuttlefish_recovery", 60 defaults: ["android.hardware.health-service.cuttlefish-defaults"], 61 recovery: true, 62 init_rc: ["android.hardware.health-service.cuttlefish_recovery.rc"], 63 vintf_fragment_modules: ["android.hardware.health-service.cuttlefish.xml.recovery"], 64 overrides: ["charger.recovery"], 65} 66 67prebuilt_etc { 68 name: "android.hardware.health-service.cuttlefish.rc", 69 src: "android.hardware.health-service.cuttlefish.rc", 70 installable: false, 71} 72 73vintf_fragment { 74 name: "android.hardware.health-service.cuttlefish.xml.recovery", 75 src: "android.hardware.health-service.cuttlefish.xml", 76 recovery: true, 77} 78 79vintf_fragment { 80 name: "android.hardware.health-service.cuttlefish.xml", 81 src: "android.hardware.health-service.cuttlefish.xml", 82 vendor: true, 83} 84 85apex { 86 name: "com.google.cf.health", 87 manifest: "apex_manifest.json", 88 file_contexts: "apex_file_contexts", 89 key: "com.google.cf.apex.key", 90 certificate: ":com.google.cf.apex.certificate", 91 updatable: false, 92 vendor: true, 93 94 binaries: ["android.hardware.health-service.cuttlefish"], 95 overrides: ["charger"], 96 prebuilts: [ 97 "android.hardware.health-service.cuttlefish.rc", 98 ], 99} 100 101// Deprecated. Retained to be used on other devices. It is not installed on cuttlefish. 102// TODO(b/210183170): Delete once other devices transition to the AIDL HAL. 103cc_library_shared { 104 name: "android.hardware.health@2.1-impl-cuttlefish", 105 stem: "android.hardware.health@2.0-impl-2.1-cuttlefish", 106 proprietary: true, 107 recovery_available: true, 108 109 relative_install_path: "hw", 110 111 srcs: [ 112 "health-hidl.cpp", 113 ], 114 115 cflags: [ 116 "-Wall", 117 "-Werror", 118 ], 119 120 static_libs: [ 121 "android.hardware.health@1.0-convert", 122 "libbatterymonitor", 123 "libhealth2impl", 124 "libhealthloop", 125 ], 126 127 shared_libs: [ 128 "android.hardware.health@2.0", 129 "android.hardware.health@2.1", 130 "libbase", 131 "libcutils", 132 "libhidlbase", 133 "libutils", 134 ], 135} 136