2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-09-02 15:15:09 +00:00

Fixed battery plugin

This commit is contained in:
Albert Vaca
2015-01-31 00:18:15 -08:00
parent 86261bd105
commit bda6e3cb7f

View File

@@ -85,9 +85,9 @@ public class BatteryPlugin extends Plugin {
int thresholdEvent = lowBattery? THRESHOLD_EVENT_BATTERY_LOW : THRESHOLD_EVENT_NONE; int thresholdEvent = lowBattery? THRESHOLD_EVENT_BATTERY_LOW : THRESHOLD_EVENT_NONE;
if (lastInfo != null if (lastInfo != null
&& isCharging != lastInfo.getBoolean("isCharging") && isCharging == lastInfo.getBoolean("isCharging")
&& currentCharge != lastInfo.getInt("currentCharge") && currentCharge == lastInfo.getInt("currentCharge")
&& thresholdEvent != lastInfo.getInt("thresholdEvent") && thresholdEvent == lastInfo.getInt("thresholdEvent")
) { ) {
//Do not send again if nothing has changed //Do not send again if nothing has changed