From 832c9cd24fcff55da0460b8587a1c5e6145e8ab5 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Fri, 27 Sep 2019 23:32:00 -0700 Subject: Refactor battery info querying functions into librecovery_utils. Bug: 134560109 Test: Run recovery_unit_test. Change-Id: Ibbcdcfd507fa23657ee7ff677208b0003ec382ba --- recovery_utils/Android.bp | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) (limited to 'recovery_utils/Android.bp') diff --git a/recovery_utils/Android.bp b/recovery_utils/Android.bp index 271d0799d..463f27fd8 100644 --- a/recovery_utils/Android.bp +++ b/recovery_utils/Android.bp @@ -12,6 +12,32 @@ // See the License for the specific language governing permissions and // limitations under the License. +cc_defaults { + name: "librecovery_utils_defaults", + + defaults: [ + "recovery_defaults", + ], + + shared_libs: [ + "android.hardware.health@2.0", + "libbase", + "libext4_utils", + "libfs_mgr", + "libhidlbase", + "libselinux", + "libutils", + ], + + static_libs: [ + "libotautil", + + // External dependencies. + "libfstab", + "libhealthhalutils", + ], +} + // A utility lib that's local to recovery (in contrast, libotautil is exposed to device-specific // recovery_ui lib as well as device-specific updater). cc_library_static { @@ -20,23 +46,17 @@ cc_library_static { recovery_available: true, defaults: [ - "recovery_defaults", + "librecovery_utils_defaults", ], srcs: [ + "battery_utils.cpp", "logging.cpp", "parse_install_logs.cpp", "roots.cpp", "thermalutil.cpp", ], - shared_libs: [ - "libbase", - "libext4_utils", - "libfs_mgr", - "libselinux", - ], - export_include_dirs: [ "include", ], @@ -45,13 +65,6 @@ cc_library_static { "system/vold", ], - static_libs: [ - "libotautil", - - // external dependency - "libfstab", - ], - export_static_lib_headers: [ "libfstab", ], -- cgit v1.2.3