Revert NSClient service to previous for PR
This commit is contained in:
parent
9d985ec3b7
commit
b989cf5a3c
1 changed files with 2 additions and 4 deletions
|
@ -118,7 +118,7 @@ public class NSClientService extends Service {
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
mWakeLock.acquire(60000);
|
mWakeLock.acquire();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -207,8 +207,6 @@ public class NSClientService extends Service {
|
||||||
} else if (!nsEnabled) {
|
} else if (!nsEnabled) {
|
||||||
MainApp.bus().post(new EventNSClientNewLog("NSCLIENT", "disabled"));
|
MainApp.bus().post(new EventNSClientNewLog("NSCLIENT", "disabled"));
|
||||||
MainApp.bus().post(new EventNSClientStatus("Disabled"));
|
MainApp.bus().post(new EventNSClientStatus("Disabled"));
|
||||||
destroy();
|
|
||||||
stopSelf();
|
|
||||||
} else if (!nsURL.equals("")) {
|
} else if (!nsURL.equals("")) {
|
||||||
try {
|
try {
|
||||||
MainApp.bus().post(new EventNSClientStatus("Connecting ..."));
|
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 powerManager = (PowerManager) MainApp.instance().getApplicationContext().getSystemService(Context.POWER_SERVICE);
|
||||||
PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
|
PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
|
||||||
"onDataUpdate");
|
"onDataUpdate");
|
||||||
wakeLock.acquire(30000);
|
wakeLock.acquire();
|
||||||
try {
|
try {
|
||||||
|
|
||||||
JSONObject data = (JSONObject) args[0];
|
JSONObject data = (JSONObject) args[0];
|
||||||
|
|
Loading…
Reference in a new issue