platform_hardware_libhardwa.../Android.bp
Kalesh Singh b64a38eee2 libpower: Use AIDL suspend HAL
Use the system susepnd AIDL hal for requesting wakelocks from libpower
or libhardware_legacy.

Bug: 170260236
Test: boot test on cf (suspend blocker works).
Test: libpower_test
Test: block_suspend
Change-Id: I8fc345c33fb893ca11603826b0e993ca908d5b20
2021-07-22 19:57:05 +00:00

104 lines
2.2 KiB
Text

// Copyright 2006 The Android Open Source Project
package {
default_applicable_licenses: ["hardware_libhardware_legacy_license"],
}
// Added automatically by a large-scale-change
// See: http://go/android-license-faq
license {
name: "hardware_libhardware_legacy_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
],
license_text: [
"NOTICE",
],
}
cc_library_headers {
name: "libhardware_legacy_headers",
vendor_available: true,
export_include_dirs: ["include"],
header_libs: ["libcutils_headers"],
export_header_lib_headers: ["libcutils_headers"],
}
cc_defaults {
name: "libpower_defaults",
defaults: ["system_suspend_defaults"],
cflags: [
"-Wexit-time-destructors",
"-fno-c++-static-destructors",
],
}
cc_library {
name: "libpower",
defaults: ["libpower_defaults"],
srcs: ["power.cpp"],
export_include_dirs: ["include"],
shared_libs: ["android.system.suspend-V1-ndk_platform"],
vendor_available: true,
vndk: {
enabled: true,
},
}
cc_test {
name: "libpower_test",
defaults: ["libpower_defaults"],
srcs: ["power_test.cpp"],
static_libs: ["libpower"],
shared_libs: [
"android.system.suspend.control.internal-cpp",
"android.system.suspend-V1-ndk_platform",
],
test_suites: ["device-tests"],
require_root: true,
}
cc_library_shared {
name: "libhardware_legacy",
defaults: ["libpower_defaults"],
vendor_available: true,
vndk: {
enabled: true,
},
shared_libs: [
"android.system.suspend-V1-ndk_platform",
"libdl",
],
header_libs: [
"libhardware_legacy_headers",
],
export_header_lib_headers: ["libhardware_legacy_headers"],
export_include_dirs: ["include"],
cflags: [
"-DQEMU_HARDWARE",
"-Wall",
"-Werror",
],
srcs: [
"power.cpp",
"uevent.c",
],
}
cc_test {
name: "block_suspend",
defaults: ["libpower_defaults"],
srcs: ["block_suspend.cpp"],
static_libs: ["libpower"],
shared_libs: [
"android.system.suspend-V1-ndk_platform",
],
gtest: false,
}