Skip to content

Commit 7182194

Browse files
committed
Ignore wifi wakelock.
1 parent 2c8f97d commit 7182194

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/android/ForegroundService.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public class ForegroundService extends Service {
6767
// Binder given to clients
6868
private final IBinder binder = new ForegroundBinder();
6969

70-
private WifiLock wfl = null;
70+
//private WifiLock wfl = null;
7171

7272
/**
7373
* Allow clients to call on to the service.
@@ -134,11 +134,11 @@ private void keepAwake()
134134
startForeground(NOTIFICATION_ID, makeNotification());
135135
}
136136

137-
if(wfl == null) {
138-
WifiManager wm = (WifiManager)getSystemService(Context.WIFI_SERVICE);
139-
wfl = wm.createWifiLock(WIFI_MODE_FULL_HIGH_PERF, "backgroundmode:sync_all_wifi");
140-
wfl.acquire();
141-
}
137+
//if(wfl == null) {
138+
// WifiManager wm = (WifiManager)getSystemService(Context.WIFI_SERVICE);
139+
// wfl = wm.createWifiLock(WIFI_MODE_FULL_HIGH_PERF, "backgroundmode:sync_all_wifi");
140+
// wfl.acquire();
141+
//}
142142
}
143143

144144
/**
@@ -149,10 +149,10 @@ private void sleepWell()
149149
stopForeground(true);
150150
getNotificationManager().cancel(NOTIFICATION_ID);
151151

152-
if(wfl != null) {
153-
wfl.release();
154-
wfl = null;
155-
}
152+
//if(wfl != null) {
153+
// wfl.release();
154+
// wfl = null;
155+
//}
156156
}
157157

158158
/**

0 commit comments

Comments
 (0)