Remove the low battery notification if a normal battery level is reported.
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);
|
||||
} 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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue