use of com.edotasx.amazfit.events.BatteryHistoryUpdatedEvent in project AmazMod by edotassi.
the class BatteryCard method updateBatteryViews.
@DexWrap
public void updateBatteryViews(BatteryInfo batteryInfo) {
updateBatteryViews(batteryInfo);
BatteryRead batteryRead = new BatteryRead();
batteryRead.setDate(System.currentTimeMillis());
batteryRead.setLevel(batteryInfo.getBatteryLevel());
batteryRead.setCharging(batteryInfo.isBatteryCharging());
FlowManager.getModelAdapter(BatteryRead.class).insert(batteryRead);
Log.d("BatteryChart", "level: " + batteryInfo.getBatteryLevel());
RxBus.get().post(new BatteryHistoryUpdatedEvent());
}
Aggregations