public static class KeyguardUpdateMonitor.BatteryStatus extends Object
Modifier and Type | Field and Description |
---|---|
static int |
CHARGING_FAST |
static int |
CHARGING_REGULAR |
static int |
CHARGING_SLOWLY |
static int |
CHARGING_UNKNOWN |
int |
health |
int |
level |
int |
maxChargingWattage |
int |
plugged |
int |
status |
Constructor and Description |
---|
BatteryStatus(int status,
int level,
int plugged,
int health,
int maxChargingWattage) |
Modifier and Type | Method and Description |
---|---|
int |
getChargingSpeed(int slowThreshold,
int fastThreshold) |
boolean |
isBatteryLow()
Whether battery is low and needs to be charged.
|
boolean |
isCharged()
Whether or not the device is charged.
|
boolean |
isPluggedIn()
Determine whether the device is plugged in (USB, power, or wireless).
|
public static final int CHARGING_UNKNOWN
public static final int CHARGING_SLOWLY
public static final int CHARGING_REGULAR
public static final int CHARGING_FAST
public final int status
public final int level
public final int plugged
public final int health
public final int maxChargingWattage
public BatteryStatus(int status, int level, int plugged, int health, int maxChargingWattage)
public boolean isPluggedIn()
public boolean isCharged()
public boolean isBatteryLow()
public final int getChargingSpeed(int slowThreshold, int fastThreshold)