mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-09-03 13:05:29 +02:00
Remove the low battery notification if a normal battery level is reported.
This commit is contained in:
parent
ed02a9781a
commit
d570d188a2
@ -318,6 +318,8 @@ public abstract class AbstractDeviceSupport implements DeviceSupport {
|
|||||||
context.getString(R.string.notif_battery_low_bigtext_number_of_charges, String.valueOf(deviceEvent.numCharges))
|
context.getString(R.string.notif_battery_low_bigtext_number_of_charges, String.valueOf(deviceEvent.numCharges))
|
||||||
: ""
|
: ""
|
||||||
, context);
|
, context);
|
||||||
|
} else {
|
||||||
|
GB.removeBatteryNotification(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
gbDevice.sendDeviceUpdateIntent(context);
|
gbDevice.sendDeviceUpdateIntent(context);
|
||||||
|
@ -365,6 +365,10 @@ public class GB {
|
|||||||
updateNotification(notification, NOTIFICATION_ID_LOW_BATTERY, context);
|
updateNotification(notification, NOTIFICATION_ID_LOW_BATTERY, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void removeBatteryNotification(Context context) {
|
||||||
|
removeNotification(NOTIFICATION_ID_LOW_BATTERY, context);
|
||||||
|
}
|
||||||
|
|
||||||
public static GBEnvironment env() {
|
public static GBEnvironment env() {
|
||||||
return environment;
|
return environment;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user