Commit db1d74ce authored by Toni Beier's avatar Toni Beier

Merge branch 'fix_samsung_j5_behavior' into 'master'

Fix behaviour of android j5 devices

See merge request !20
parents e86bc726 14fa4728
Pipeline #24964 passed with stages
in 2 minutes and 34 seconds
......@@ -447,11 +447,14 @@ class Helper {
wifiMan.disableNetwork(id);
}
}
if (id != -1) {
// Test network id, to check if WLAN is available(-1) or disabled(0)
// Network id indicates network config status
if (id == -1 || id == 0) {
lastAddedWifi = wifiMan.addNetwork(lastWifi);
} else {
Log.d("applyWifiConfig", "updating old eduroam");
lastAddedWifi = wifiMan.updateNetwork(lastWifi);
} else {
lastAddedWifi = wifiMan.addNetwork(lastWifi);
}
if (lastAddedWifi == -1) return false;
......@@ -599,7 +602,7 @@ class Helper {
List<WifiConfiguration> currentConfigs = wifi.getConfiguredNetworks();
for (WifiConfiguration currentConfig : currentConfigs)
{
if (ssid.equals(currentConfig.SSID))
if (ssid.equals(currentConfig.SSID) && currentConfig.networkId != 0)
{
String message;
boolean ticked = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment