1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2025-02-24 15:21:19 +00:00

Fixed lint warning

Workaround for Android < N bug, although Google calls it differently
This commit is contained in:
M66B 2016-12-21 16:26:59 +01:00
parent bdcb64e714
commit 8d9dc22239

View file

@ -163,7 +163,7 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
else else
pref_wifi_homes.setTitle(getString(R.string.setting_wifi_home, "-")); pref_wifi_homes.setTitle(getString(R.string.setting_wifi_home, "-"));
WifiManager wm = (WifiManager) getSystemService(Context.WIFI_SERVICE); WifiManager wm = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
List<CharSequence> listSSID = new ArrayList<>(); List<CharSequence> listSSID = new ArrayList<>();
List<WifiConfiguration> configs = wm.getConfiguredNetworks(); List<WifiConfiguration> configs = wm.getConfiguredNetworks();
if (configs != null) if (configs != null)