diff options
author | Ningyuan Wang <nywang@google.com> | 2017-10-06 10:56:08 -0700 |
---|---|---|
committer | Ningyuan Wang <nywang@google.com> | 2017-10-06 11:35:09 -0700 |
commit | 0a6b9c1199f91790606acc70c771548f079fa8f0 (patch) | |
tree | ac039364d7def99e7bbcefcec8161e907aa2c2f5 /service | |
parent | 87d7badd662aa84369b2b9893e990cb24197ad24 (diff) |
Catch Exception on creating NetworkDetail
Bug: 67482129
Test: compile, unit tests
Change-Id: I8d6806f750a8002a0a568bb2b84d1f18ba833594
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WificondControl.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/service/java/com/android/server/wifi/WificondControl.java b/service/java/com/android/server/wifi/WificondControl.java index 056777fd9..b6104a8cd 100644 --- a/service/java/com/android/server/wifi/WificondControl.java +++ b/service/java/com/android/server/wifi/WificondControl.java @@ -374,8 +374,13 @@ public class WificondControl { new InformationElementUtil.Capabilities(); capabilities.from(ies, result.capability); String flags = capabilities.generateCapabilitiesString(); - NetworkDetail networkDetail = - new NetworkDetail(bssid, ies, null, result.frequency); + NetworkDetail networkDetail; + try { + networkDetail = new NetworkDetail(bssid, ies, null, result.frequency); + } catch (IllegalArgumentException e) { + Log.e(TAG, "Illegal argument for scan result with bssid: " + bssid, e); + continue; + } ScanDetail scanDetail = new ScanDetail(networkDetail, wifiSsid, bssid, flags, result.signalMbm / 100, result.frequency, result.tsf, ies, null); |