2015-08-18 17:37:51 +02:00
|
|
|
package nodomain.freeyourgadget.gadgetbridge.deviceevents;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.GregorianCalendar;
|
|
|
|
|
2015-08-27 11:50:31 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.BatteryState;
|
|
|
|
|
2015-08-18 17:37:51 +02:00
|
|
|
public class GBDeviceEventBatteryInfo extends GBDeviceEvent {
|
2015-08-31 17:25:58 +02:00
|
|
|
public GregorianCalendar lastChargeTime = null;
|
2015-08-18 17:37:51 +02:00
|
|
|
public BatteryState state = BatteryState.UNKNOWN;
|
|
|
|
public short level = 50;
|
|
|
|
public int numCharges = -1;
|
|
|
|
|
2015-08-19 17:36:53 +02:00
|
|
|
public boolean extendedInfoAvailable() {
|
|
|
|
if (numCharges != -1 && lastChargeTime != null) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
2015-08-18 17:37:51 +02:00
|
|
|
}
|