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

Fixed crash

This commit is contained in:
M66B 2015-12-08 16:43:25 +01:00
parent fac669371c
commit adecd479dc
2 changed files with 8 additions and 3 deletions

View file

@ -105,10 +105,14 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
WifiManager wm = (WifiManager) getSystemService(Context.WIFI_SERVICE);
List<CharSequence> listSSID = new ArrayList<>();
listSSID.add("");
for (WifiConfiguration config : wm.getConfiguredNetworks())
listSSID.add(config.SSID);
List<WifiConfiguration> configs = wm.getConfiguredNetworks();
if (configs != null)
for (WifiConfiguration config : configs)
listSSID.add(config.SSID);
listSSID.add(0, getString(R.string.title_all));
wifi_home_pref.setEntries(listSSID.toArray(new CharSequence[0]));
listSSID.remove(0);
listSSID.add(0, "");
wifi_home_pref.setEntryValues(listSSID.toArray(new CharSequence[0]));
// Handle auto enable

View file

@ -62,6 +62,7 @@ Since NetGuard has no internet permission, you know your internet traffic is not
<string name="msg_terms">By donating you agree to the <a href="http://www.netguard.me/#terms">terms &amp; conditions</a></string>
<string name="msg_dimming">If you cannot press OK in the next dialog, another (screen dimming) application is likely manipulating the screen.</string>
<string name="title_all">All</string>
<string name="title_screen_wifi">Allow Wi-Fi when screen is on</string>
<string name="title_screen_other">Allow mobile when screen is on</string>
<string name="title_roaming">Block when roaming</string>