From b989cf5a3cf95ed61ca839506848dcb635f54919 Mon Sep 17 00:00:00 2001 From: Jamorham Date: Thu, 22 Feb 2018 13:27:43 +0000 Subject: [PATCH] Revert NSClient service to previous for PR --- .../plugins/NSClientInternal/services/NSClientService.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/services/NSClientService.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/services/NSClientService.java index 2e853ec838..4085849675 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/services/NSClientService.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/services/NSClientService.java @@ -118,7 +118,7 @@ public class NSClientService extends Service { @Override public void onCreate() { super.onCreate(); - mWakeLock.acquire(60000); + mWakeLock.acquire(); } @Override @@ -207,8 +207,6 @@ public class NSClientService extends Service { } else if (!nsEnabled) { MainApp.bus().post(new EventNSClientNewLog("NSCLIENT", "disabled")); MainApp.bus().post(new EventNSClientStatus("Disabled")); - destroy(); - stopSelf(); } else if (!nsURL.equals("")) { try { MainApp.bus().post(new EventNSClientStatus("Connecting ...")); @@ -456,7 +454,7 @@ public class NSClientService extends Service { PowerManager powerManager = (PowerManager) MainApp.instance().getApplicationContext().getSystemService(Context.POWER_SERVICE); PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "onDataUpdate"); - wakeLock.acquire(30000); + wakeLock.acquire(); try { JSONObject data = (JSONObject) args[0];