diff options
author | Etan Cohen <etancohen@google.com> | 2018-05-25 23:33:19 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-05-25 23:33:19 +0000 |
commit | c231fb2d5b30ef8faa41399d0feed9b6448e85f9 (patch) | |
tree | 933fb4c2617449dafc1b7a643618658bb9816a1c /service | |
parent | b8ccf8e846d73180792b76d74e6c124262cc2f16 (diff) | |
parent | 658aaf3edd65b5e0a978425d94652c7ecda9818a (diff) |
Merge "[WIFI] Make sure only a single callback is registered on IWifiChip" into pi-dev
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiVendorHal.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiVendorHal.java b/service/java/com/android/server/wifi/WifiVendorHal.java index f5b118795..0d73459b5 100644 --- a/service/java/com/android/server/wifi/WifiVendorHal.java +++ b/service/java/com/android/server/wifi/WifiVendorHal.java @@ -543,11 +543,15 @@ public class WifiVendorHal { private boolean retrieveWifiChip(IWifiIface iface) { synchronized (sLock) { + boolean registrationNeeded = mIWifiChip == null; mIWifiChip = mHalDeviceManager.getChip(iface); if (mIWifiChip == null) { mLog.err("Failed to get the chip created for the Iface").flush(); return false; } + if (!registrationNeeded) { + return true; + } if (!registerChipCallback()) { mLog.err("Failed to register chip callback").flush(); return false; |