From 4f5fdf09a9eb9668d2d6d03c383df4a7916a28d6 Mon Sep 17 00:00:00 2001 From: Tomasz Wasilczyk Date: Wed, 13 Sep 2023 04:22:51 +0000 Subject: [PATCH] Don't depend on String8 cast to C string [health] Bug: 295394788 Test: m checkbuild Change-Id: I67f0468dc21dfb0baab58361078f4f7bc750bdbd --- health/1.0/default/convert.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/health/1.0/default/convert.cpp b/health/1.0/default/convert.cpp index 31b4679980..e12e1978b6 100644 --- a/health/1.0/default/convert.cpp +++ b/health/1.0/default/convert.cpp @@ -117,7 +117,7 @@ void convertToHealthInfo(const struct android::BatteryProperties *p, info.batteryCycleCount = p->batteryCycleCount; info.batteryFullCharge = p->batteryFullCharge; info.batteryChargeCounter = p->batteryChargeCounter; - info.batteryTechnology = p->batteryTechnology; + info.batteryTechnology = p->batteryTechnology.c_str(); } void convertFromHealthInfo(const HealthInfo& info,