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 vintf_fragments: ["android.hardware.health-service.cuttlefish.xml"], 24 25 srcs: [ 26 "health-aidl.cpp", 27 ], 28 29 cflags: [ 30 "-Wall", 31 "-Werror", 32 ], 33 34 static_libs: [ 35 "android.hardware.health-translate-ndk", 36 "libbatterymonitor", 37 "libhealthloop", 38 "libhealth_aidl_impl", 39 ], 40 41 shared_libs: [ 42 "libbase", 43 "libbinder_ndk", 44 "libcutils", 45 "libhidlbase", 46 "liblog", 47 "libutils", 48 "android.hardware.health-V1-ndk", 49 ], 50 51 defaults: ["enabled_on_p_and_later"], 52} 53 54cc_binary { 55 name: "android.hardware.health-service.cuttlefish", 56 defaults: ["android.hardware.health-service.cuttlefish-defaults"], 57 proprietary: true, 58 init_rc: ["android.hardware.health-service.cuttlefish.rc"], 59 overrides: ["charger"], 60} 61 62cc_binary { 63 name: "android.hardware.health-service.cuttlefish_recovery", 64 defaults: ["android.hardware.health-service.cuttlefish-defaults"], 65 recovery: true, 66 init_rc: ["android.hardware.health-service.cuttlefish_recovery.rc"], 67 overrides: ["charger.recovery"], 68} 69 70// Deprecated. Retained to be used on other devices. It is not installed on cuttlefish. 71// TODO(b/210183170): Delete once other devices transition to the AIDL HAL. 72cc_library_shared { 73 name: "android.hardware.health@2.1-impl-cuttlefish", 74 stem: "android.hardware.health@2.0-impl-2.1-cuttlefish", 75 proprietary: true, 76 recovery_available: true, 77 78 relative_install_path: "hw", 79 80 srcs: [ 81 "health-hidl.cpp", 82 ], 83 84 cflags: [ 85 "-Wall", 86 "-Werror", 87 ], 88 89 static_libs: [ 90 "android.hardware.health@1.0-convert", 91 "libbatterymonitor", 92 "libhealthloop", 93 "libhealth2impl", 94 ], 95 96 shared_libs: [ 97 "libbase", 98 "libcutils", 99 "libhidlbase", 100 "libutils", 101 "android.hardware.health@2.0", 102 "android.hardware.health@2.1", 103 ], 104 105 defaults: ["enabled_on_p_and_later"], 106} 107