From 5771858dc082223c20cf62cba738eeefb5e801a1 Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Mon, 13 Dec 2021 14:01:14 -0800 Subject: [PATCH] healthd: *charger_test links to a.h.health@2.x statically. These libraries might not be installed on the device any more. Fixes: 210093617 Test: run it Change-Id: Ic1bc6ba3c78ccaad93aef00ab695f3c2acd2b367 --- healthd/Android.bp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/healthd/Android.bp b/healthd/Android.bp index eaa8e5bb3..24777c8e6 100644 --- a/healthd/Android.bp +++ b/healthd/Android.bp @@ -216,8 +216,6 @@ cc_defaults { shared_libs: [ // common - "android.hardware.health@2.0", - "android.hardware.health@2.1", "libbase", "libcutils", "libhidlbase", @@ -255,6 +253,10 @@ cc_binary { "charger.cpp", "charger_utils.cpp", ], + shared_libs: [ + "android.hardware.health@2.0", + "android.hardware.health@2.1", + ], target: { recovery: { @@ -280,6 +282,11 @@ cc_test { name: "charger_test", defaults: ["charger_defaults"], srcs: ["charger_test.cpp"], + static_libs: [ + "android.hardware.health@1.0", + "android.hardware.health@2.0", + "android.hardware.health@2.1", + ], } cc_test { @@ -290,6 +297,9 @@ cc_test { "healthd_mode_charger_test.cpp" ], static_libs: [ + "android.hardware.health@1.0", + "android.hardware.health@2.0", + "android.hardware.health@2.1", "libgmock", ], test_suites: [