Merge pull request #2433 from drabux/fix_wifi_service_mem_leak

fix wifi service mem leak
This commit is contained in:
Martin Fietz 2017-10-06 11:12:56 +02:00 committed by GitHub
commit 26cdef1378
1 changed files with 1 additions and 1 deletions

View File

@ -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) {