Prevent WifiManager leak
This commit is contained in:
parent
ccdef60311
commit
90dc14c7bc
|
@ -231,7 +231,7 @@ public class DownloadService extends Service {
|
|||
wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, this.getClass().getName());
|
||||
wakeLock.setReferenceCounted(false);
|
||||
|
||||
WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
|
||||
WifiManager wifiManager = (WifiManager) this.getSystemService(Context.WIFI_SERVICE);
|
||||
wifiLock = wifiManager.createWifiLock(WifiManager.WIFI_MODE_FULL, "downloadServiceLock");
|
||||
|
||||
keepScreenOn = prefs.getBoolean(Constants.PREFERENCES_KEY_KEEP_SCREEN_ON, false);
|
||||
|
|
Loading…
Reference in New Issue