BatteryManager运行状况值“ 9”

时间:2019-01-08 05:44:18

标签: android batterymanager

我从BatteryManager得到一个“ 9”值。这是什么意思?有人知道吗?

这是我想要的代码:

int health = batteryIntent.getIntExtra(BatteryManager.EXTRA_HEALTH, 0);

研究领域。

BatteryManager Health values

BatteryStats.Java

BatteryManager.java

根据documentation android在常数以下使用。

enum {
    BATTERY_STATUS_UNKNOWN = 1,
    BATTERY_STATUS_CHARGING = 2,
    BATTERY_STATUS_DISCHARGING = 3,
    BATTERY_STATUS_NOT_CHARGING = 4,
    BATTERY_STATUS_FULL = 5,
};

enum {
    BATTERY_HEALTH_UNKNOWN = 1,
    BATTERY_HEALTH_GOOD = 2,
    BATTERY_HEALTH_OVERHEAT = 3,
    BATTERY_HEALTH_DEAD = 4,
    BATTERY_HEALTH_OVER_VOLTAGE = 5,
    BATTERY_HEALTH_UNSPECIFIED_FAILURE = 6,
    BATTERY_HEALTH_COLD = 7,
};
  
    

根据我的研究,我没有看到“ 9”的值。这种价值并非总是会出现,很少会出现,但我无法发现这种情况。

  

0 个答案:

没有答案