You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
156 lines
4.2 KiB
156 lines
4.2 KiB
// Copyright (C) 2021 The Android Open Source Project
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
cc_defaults {
|
|
name: "libhealth_aidl_common_defaults_rockchip",
|
|
shared_libs: [
|
|
"libbase",
|
|
"libbinder_ndk",
|
|
"libcutils",
|
|
"liblog",
|
|
"libutils",
|
|
"android.hardware.health-V2-ndk",
|
|
|
|
// TODO(b/177269435): remove when BatteryMonitor works with AIDL HealthInfo.
|
|
"libhidlbase",
|
|
],
|
|
static_libs: [
|
|
"libbatterymonitor",
|
|
"libhealthloop_rockchip",
|
|
|
|
// TODO(b/177269435): remove when BatteryMonitor works with AIDL HealthInfo.
|
|
"android.hardware.health-translate-ndk",
|
|
],
|
|
}
|
|
|
|
// Dependency to libhealthd_charger_ui. No UI in recovery.
|
|
cc_defaults {
|
|
name: "libhealth_aidl_charger_defaults_rockchip",
|
|
shared_libs: [
|
|
// common
|
|
"android.hardware.health-V2-ndk",
|
|
"libbase",
|
|
"libcutils",
|
|
"liblog",
|
|
"libutils",
|
|
|
|
// charger UI only
|
|
"libpng",
|
|
],
|
|
|
|
static_libs: [
|
|
// common
|
|
"libbatterymonitor",
|
|
"libhealthloop_rockchip",
|
|
|
|
// charger UI only
|
|
"libhealthd_draw",
|
|
"libhealthd_charger_ui",
|
|
"libminui",
|
|
"libsuspend",
|
|
],
|
|
|
|
target: {
|
|
recovery: {
|
|
// No UI and libsuspend for recovery charger.
|
|
cflags: [
|
|
"-DCHARGER_FORCE_NO_UI=1",
|
|
],
|
|
exclude_shared_libs: [
|
|
"libpng",
|
|
],
|
|
exclude_static_libs: [
|
|
"libhealthd_draw",
|
|
"libhealthd_charger_ui",
|
|
"libminui",
|
|
"libsuspend",
|
|
],
|
|
},
|
|
},
|
|
}
|
|
|
|
// AIDL version of libhealth2impl.
|
|
// A helper library for health HAL implementation.
|
|
// HAL implementations can link to this library and extend the Health class.
|
|
cc_library_static {
|
|
name: "libhealth_aidl_impl_rockchip",
|
|
defaults: [
|
|
"libhealth_aidl_common_defaults_rockchip",
|
|
"libhealth_aidl_charger_defaults_rockchip",
|
|
],
|
|
vendor: true,
|
|
recovery_available: true,
|
|
export_include_dirs: [
|
|
"include",
|
|
"utils/libhealthloop/include",
|
|
],
|
|
export_static_lib_headers: [
|
|
"libbatterymonitor",
|
|
],
|
|
srcs: [
|
|
"ChargerUtils.cpp",
|
|
"health-convert.cpp",
|
|
"HalHealthLoop.cpp",
|
|
"Health.cpp",
|
|
"LinkedCallback.cpp",
|
|
],
|
|
target: {
|
|
recovery: {
|
|
exclude_srcs: [
|
|
"ChargerUtils.cpp",
|
|
],
|
|
},
|
|
},
|
|
}
|
|
|
|
// Users of libhealth_aidl_impl should use this defaults.
|
|
cc_defaults {
|
|
name: "libhealth_aidl_impl_user_rockchip",
|
|
defaults: [
|
|
"libhealth_aidl_common_defaults_rockchip",
|
|
"libhealth_aidl_charger_defaults_rockchip",
|
|
],
|
|
}
|
|
|
|
// AIDL version of android.hardware.health@2.1-service.
|
|
// Default binder service of the health HAL.
|
|
cc_defaults {
|
|
name: "android.hardware.health-service.rockchip-defaults",
|
|
relative_install_path: "hw",
|
|
vintf_fragments: ["android.hardware.health-service.rockchip.xml"],
|
|
defaults: [
|
|
"libhealth_aidl_impl_user_rockchip",
|
|
],
|
|
static_libs: [
|
|
"libhealth_aidl_impl_rockchip",
|
|
],
|
|
srcs: ["main.cpp"],
|
|
}
|
|
|
|
cc_binary {
|
|
name: "android.hardware.health-service.rockchip",
|
|
vendor: true,
|
|
defaults: ["android.hardware.health-service.rockchip-defaults"],
|
|
init_rc: ["android.hardware.health-service.rockchip.rc"],
|
|
overrides: ["charger"],
|
|
}
|
|
|
|
cc_binary {
|
|
name: "android.hardware.health-service.rockchip_recovery",
|
|
recovery: true,
|
|
defaults: ["android.hardware.health-service.rockchip-defaults"],
|
|
init_rc: ["android.hardware.health-service.rockchip_recovery.rc"],
|
|
overrides: ["charger.recovery"],
|
|
}
|