mirror of
https://github.com/zxing/zxing.git
synced 2025-01-13 04:07:27 -08:00
Don't fail on bad network type input. Log it.
git-svn-id: https://zxing.googlecode.com/svn/trunk@2268 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
a23a2b8adb
commit
9de4dd7256
|
@ -68,7 +68,13 @@ public final class WifiConfigManager {
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NetworkType networkType = NetworkType.forIntentValue(networkTypeString);
|
NetworkType networkType;
|
||||||
|
try {
|
||||||
|
networkType = NetworkType.forIntentValue(networkTypeString);
|
||||||
|
} catch (IllegalArgumentException iae) {
|
||||||
|
Log.w(TAG, "Bad network type; see NetworkType values: " + networkTypeString);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (networkType == NetworkType.NO_PASSWORD) {
|
if (networkType == NetworkType.NO_PASSWORD) {
|
||||||
changeNetworkUnEncrypted(wifiManager, ssid);
|
changeNetworkUnEncrypted(wifiManager, ssid);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue