diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/InsightAlertService.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/InsightAlertService.java index 4a543f27c5..53636ef88f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/InsightAlertService.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/InsightAlertService.java @@ -104,8 +104,10 @@ public class InsightAlertService extends Service implements InsightConnectionSer } @Override - public int onStartCommand(Intent intent, int flags, int startId) { - if ("mute".equals(intent.getStringExtra("command"))) { + public int onStartCommand(@Nullable Intent intent, int flags, int startId) { + if (intent == null) { + // service is being restarted + } else if ("mute".equals(intent.getStringExtra("command"))) { mute(); } else if ("confirm".equals(intent.getStringExtra("command"))) { dismissNotification();