KeepAliveReceiver: check pump only if initialized already.
This commit is contained in:
parent
eed3773b49
commit
a1d6834bce
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ public class KeepAliveReceiver extends BroadcastReceiver {
|
|||
private void checkPump() {
|
||||
final PumpInterface pump = MainApp.getConfigBuilder();
|
||||
final Profile profile = MainApp.getConfigBuilder().getProfile();
|
||||
if (pump != null && profile != null && profile.getBasal() != null) {
|
||||
if (pump != null && pump.isInitialized() && profile != null && profile.getBasal() != null) {
|
||||
Date lastConnection = pump.lastDataTime();
|
||||
|
||||
boolean isStatusOutdated = lastConnection.getTime() + 15 * 60 * 1000L < System.currentTimeMillis();
|
||||
|
|
Loading…
Reference in a new issue