KeepAliveReceiver: proper Notification ids.

This commit is contained in:
Johannes Mockenhaupt 2017-10-26 01:05:52 +02:00
parent 4539b5a9e5
commit e895ba65eb
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
2 changed files with 4 additions and 2 deletions

View file

@ -51,7 +51,9 @@ public class Notification {
public static final int TOAST_ALARM = 22;
public static final int WRONGBASALSTEP = 23;
public static final int BOLUS_DELIVERY_ERROR = 24;
public static final int COMBO_PUMP_ERROR = 25;
public static final int COMBO_PUMP_ALARM = 25;
public static final int PUMP_UNREACHABLE = 26;
public static final int BG_READINGS_MISSED = 27;
public int id;
public Date date;

View file

@ -47,7 +47,7 @@ public class KeepAliveReceiver extends BroadcastReceiver {
private void checkBg() {
BgReading bgReading = DatabaseHelper.lastBg();
if (bgReading != null && bgReading.date + 25 * 60 * 1000 < System.currentTimeMillis()) {
Notification n = new Notification(Notification.PUMP_UNREACHABLE, "Missed BG readings", Notification.URGENT);
Notification n = new Notification(Notification.BG_READINGS_MISSED, "Missed BG readings", Notification.URGENT);
n.soundId = R.raw.alarm;
MainApp.bus().post(new EventNewNotification(n));
}