ignore "java.lang.IllegalArgumentException: Could not parse [null/24]"

This is currently baffling me as to how it can happen.  This isn't a pretty
fix but it is better that letting F-Droid crash.  db9bdc31 was supposed to
make it so that only one thread at a time ever updated the static vars on
FDroidApp.

closes #690
This commit is contained in:
Hans-Christoph Steiner 2016-06-21 13:03:37 +02:00
parent ba88bd7060
commit 09eea0d40b

View File

@ -103,7 +103,12 @@ public class WifiStateChangeService extends IntentService {
if (dhcpInfo != null) {
String netmask = formatIpAddress(dhcpInfo.netmask);
if (!TextUtils.isEmpty(FDroidApp.ipAddressString) && netmask != null) {
try {
FDroidApp.subnetInfo = new SubnetUtils(FDroidApp.ipAddressString, netmask).getInfo();
} catch (IllegalArgumentException e) {
// catch this mystery error: "java.lang.IllegalArgumentException: Could not parse [null/24]"
e.printStackTrace();
}
}
}
} else if (wifiState == WifiManager.WIFI_STATE_DISABLED