Merge pull request #2433 from drabux/fix_wifi_service_mem_leak
fix wifi service mem leak
This commit is contained in:
commit
26cdef1378
|
@ -759,7 +759,7 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
|
||||||
clearAutodownloadSelectedNetworsPreference();
|
clearAutodownloadSelectedNetworsPreference();
|
||||||
}
|
}
|
||||||
// get configured networks
|
// get configured networks
|
||||||
WifiManager wifiservice = (WifiManager) activity.getSystemService(Context.WIFI_SERVICE);
|
WifiManager wifiservice = (WifiManager) activity.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
|
||||||
List<WifiConfiguration> networks = wifiservice.getConfiguredNetworks();
|
List<WifiConfiguration> networks = wifiservice.getConfiguredNetworks();
|
||||||
|
|
||||||
if (networks != null) {
|
if (networks != null) {
|
||||||
|
|
Loading…
Reference in New Issue