mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Remove the low battery notification if a normal battery level is reported.
This commit is contained in:
+2
@@ -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);
|
||||
} else {
|
||||
GB.removeBatteryNotification(context);
|
||||
}
|
||||
|
||||
gbDevice.sendDeviceUpdateIntent(context);
|
||||
|
||||
@@ -365,6 +365,10 @@ public class GB {
|
||||
updateNotification(notification, NOTIFICATION_ID_LOW_BATTERY, context);
|
||||
}
|
||||
|
||||
public static void removeBatteryNotification(Context context) {
|
||||
removeNotification(NOTIFICATION_ID_LOW_BATTERY, context);
|
||||
}
|
||||
|
||||
public static GBEnvironment env() {
|
||||
return environment;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user