WifiSsid: Catch String out of bound exception

Bug: 130843215
Test: None
Change-Id: I6046bf0fe9e9c402e565e5fa63f0e0aec711725c
This commit is contained in:
Roshan Pius
2019-04-19 09:17:59 -07:00
parent 3979c51c00
commit 72e1cea036

View File

@@ -129,6 +129,8 @@ public class WifiSsid implements Parcelable {
val = Integer.parseInt(asciiEncoded.substring(i, i + 2), HEX_RADIX);
} catch (NumberFormatException e) {
val = -1;
} catch (StringIndexOutOfBoundsException e) {
val = -1;
}
if (val < 0) {
val = Character.digit(asciiEncoded.charAt(i), HEX_RADIX);