From 9239612870d08fbf79b3c53f11bd5d7cb4beb875 Mon Sep 17 00:00:00 2001 From: Imre Sunyi Date: Mon, 20 Sep 2010 18:02:50 +0200 Subject: Support showing "Cold" battery health. The Linux kernel supports reporting "cold" battery health to sysfs. Android framework has not implemented this and it defaults to "unknown" This adds handling the cold battery health. Change-Id: Idcc156aae6aabce73391081143f79d052edf332e --- api/current.xml | 11 +++++++++++ core/java/android/os/BatteryManager.java | 1 + services/jni/com_android_server_BatteryService.cpp | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/api/current.xml b/api/current.xml index 85f15cb34965..19bef42ab118 100644 --- a/api/current.xml +++ b/api/current.xml @@ -114001,6 +114001,17 @@ visibility="public" > + + GetStaticIntField(clazz, env->GetStaticFieldID(clazz, "BATTERY_HEALTH_UNSPECIFIED_FAILURE", "I")); + gConstants.healthCold = env->GetStaticIntField(clazz, + env->GetStaticFieldID(clazz, "BATTERY_HEALTH_COLD", "I")); + return jniRegisterNativeMethods(env, "com/android/server/BatteryService", sMethods, NELEM(sMethods)); } -- cgit v1.2.3-59-g8ed1b