From 89ec37fcdd304fa25ff778a57452f5c2324e1a61 Mon Sep 17 00:00:00 2001 From: Todd Poynor Date: Mon, 12 May 2014 19:10:53 -0700 Subject: [PATCH] Updates for BatteryProperty 64-bit property values Change-Id: I4838d384e14a7c2c0b607c0bd693e9c7bef75fb7 --- CheckBattery.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CheckBattery.cpp b/CheckBattery.cpp index ab5e626..8a674d0 100644 --- a/CheckBattery.cpp +++ b/CheckBattery.cpp @@ -64,8 +64,8 @@ extern "C" int is_battery_ok() status_t status = interface->getProperty(android::BATTERY_PROP_CAPACITY, &val); if (status == NO_ERROR) { - SLOGD("Capacity is %d", val.valueInt); - battery_ok = val.valueInt > 5 ? 1 : 0; + SLOGD("Capacity is %d", (int)val.valueInt64); + battery_ok = val.valueInt64 > 5 ? 1 : 0; } else { SLOGE("Failed to get battery charge"); battery_ok = 1;