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:
@@ -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
|
||||||
|
Reference in New Issue
Block a user