From 81437590af33ddfc00f92de88878399f93590125 Mon Sep 17 00:00:00 2001 From: "v-krishna.rao" Date: Thu, 30 Jul 2020 09:22:05 -0400 Subject: Handle IllegalArgumentException while doing addInterface. In aging test, IllegalArgumentException was observed sometimes when set command to HwRemoteBinder. add exception handling for that. Bug: 162705230 Test: atest FrameworksWifiTests Change-Id: Ie0ac58e2b122fc003bdd088cb48757cf8fa89f44 --- .../java/com/android/server/wifi/SupplicantStaIfaceHal.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java b/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java index 657b081dd..667abfe35 100644 --- a/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java +++ b/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java @@ -527,6 +527,10 @@ public class SupplicantStaIfaceHal { Log.e(TAG, "ISupplicant.addInterface exception: " + e); handleNoSuchElementException(e, "addInterface"); return null; + } catch (IllegalArgumentException e) { + handleIllegalArgumentException(e, "addInterface"); + Log.e(TAG, "ISupplicant.addInterface exception: " + e); + return null; } return supplicantIface.value; } @@ -2593,6 +2597,13 @@ public class SupplicantStaIfaceHal { } } + private void handleIllegalArgumentException(IllegalArgumentException e, String methodStr) { + synchronized (mLock) { + clearState(); + Log.e(TAG, "ISupplicantStaIface." + methodStr + " failed with exception", e); + } + } + /** * Converts the Wps config method string to the equivalent enum value. */ -- cgit v1.2.3