Commit 222f0151 authored by Toni Beier's avatar Toni Beier

Fix: Readd eduroam network if network id is 0(zero)

parent e86bc726
Pipeline #24892 passed with stages
in 2 minutes and 34 seconds
......@@ -447,11 +447,12 @@ class Helper {
wifiMan.disableNetwork(id);
}
}
if (id != -1) {
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 +600,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