Merge "WifiSsid: Catch String out of bound exception" into qt-dev am: 4ec8b460c2
am: 0fa902cfc6
Change-Id: Ic6cab52fa6f6f55ce4ed9a46be4ea231d6a31974
diff --git a/wifi/java/android/net/wifi/WifiSsid.java b/wifi/java/android/net/wifi/WifiSsid.java
index fd59390..70ca088 100644
--- a/wifi/java/android/net/wifi/WifiSsid.java
+++ b/wifi/java/android/net/wifi/WifiSsid.java
@@ -129,6 +129,8 @@
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);