From ac9f9cb3487e999f28ec09349fb02a0c8db006e0 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 19 Oct 2021 11:55:53 -0700 Subject: [PATCH] libhealthloop: Remove the POWER_SUPPLY_SUBSYSTEM macro Make the source code slightly easier to read by removing a macro that is only used once. Change-Id: I954a1ee9760398480c68a7e9bd2cdf58527c5746 Signed-off-by: Bart Van Assche --- health/utils/libhealthloop/HealthLoop.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/health/utils/libhealthloop/HealthLoop.cpp b/health/utils/libhealthloop/HealthLoop.cpp index 3f4b5bc596..4190769077 100644 --- a/health/utils/libhealthloop/HealthLoop.cpp +++ b/health/utils/libhealthloop/HealthLoop.cpp @@ -40,8 +40,6 @@ using namespace android; using namespace std::chrono_literals; -#define POWER_SUPPLY_SUBSYSTEM "power_supply" - namespace android { namespace hardware { namespace health { @@ -143,7 +141,7 @@ void HealthLoop::UeventEvent(uint32_t /*epevents*/) { cp = msg; while (*cp) { - if (!strcmp(cp, "SUBSYSTEM=" POWER_SUPPLY_SUBSYSTEM)) { + if (!strcmp(cp, "SUBSYSTEM=power_supply")) { ScheduleBatteryUpdate(); break; }