- added Notification when Time/TZ change is made

- changed code to display dialog
This commit is contained in:
Andy Rozman 2019-12-25 21:49:35 +01:00
parent b80fc3851c
commit 3ceb5f46d8
4 changed files with 10 additions and 2 deletions

View file

@ -79,6 +79,7 @@ public class Notification {
public static final int OVER_24H_TIME_CHANGE_REQUESTED = 54; public static final int OVER_24H_TIME_CHANGE_REQUESTED = 54;
public static final int INVALID_VERSION = 55; public static final int INVALID_VERSION = 55;
public static final int OMNIPOD_PUMP_ALARM = 56; public static final int OMNIPOD_PUMP_ALARM = 56;
public static final int TIME_OR_TIMEZONE_CHANGE = 57;
public int id; public int id;

View file

@ -118,7 +118,7 @@ class OmnipodFragment : Fragment() {
} else { } else {
val readPulseLog = AapsOmnipodManager.getInstance().readPulseLog() val readPulseLog = AapsOmnipodManager.getInstance().readPulseLog()
OKDialog.showConfirmation(null, OKDialog.show(MainApp.instance().applicationContext, MainApp.gs(R.string.action),
"Pulse Log:\n" + readPulseLog.toString(), null) "Pulse Log:\n" + readPulseLog.toString(), null)
} }
} }

View file

@ -387,6 +387,13 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump
if (omnipodUITask.wasCommandSuccessful()) { if (omnipodUITask.wasCommandSuccessful()) {
this.hasTimeDateOrTimeZoneChanged = false; this.hasTimeDateOrTimeZoneChanged = false;
timeChangeRetries = 0; timeChangeRetries = 0;
Notification notification = new Notification(
Notification.TIME_OR_TIMEZONE_CHANGE,
MainApp.gs(R.string.time_or_timezone_change),
Notification.INFO, 60);
RxBus.INSTANCE.send(new EventNewNotification(notification));
} else { } else {
timeChangeRetries++; timeChangeRetries++;

View file

@ -1636,7 +1636,7 @@
<string name="objectives_button_unstart">Clear started</string> <string name="objectives_button_unstart">Clear started</string>
<string name="timedetection">Time detection</string> <string name="timedetection">Time detection</string>
<string name="doyouwantresetstart">Do you want reset objective start? You may lose your progress.</string> <string name="doyouwantresetstart">Do you want reset objective start? You may lose your progress.</string>
<string name="time_or_timezone_change">Time and/or Timezone change on pump</string>
<!-- Omnipod --> <!-- Omnipod -->