summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-04-23 20:41:18 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-04-23 20:41:18 +0000
commita171f589ae666e3e1fe78f0c2d980fa5dff291af (patch)
treeb8961df4e08338f0177ceca6bc6947b30b367be0
parent362e8087cfdc3924e034398c96d283b3a085f6dd (diff)
parent19df2d0dfa75acecef66737dee97e605bd2b00a3 (diff)
Merge "HDM: Resolve concurrent access issue - defer execution" into rvc-dev am: 19df2d0dfa
Change-Id: Ia07ea840770f53f59ec6a7c307b3ca3b755ccc39
-rw-r--r--service/java/com/android/server/wifi/HalDeviceManager.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/HalDeviceManager.java b/service/java/com/android/server/wifi/HalDeviceManager.java
index e47a33efb..783c91adf 100644
--- a/service/java/com/android/server/wifi/HalDeviceManager.java
+++ b/service/java/com/android/server/wifi/HalDeviceManager.java
@@ -2087,15 +2087,20 @@ public class HalDeviceManager {
private void dispatchAllDestroyedListeners() {
if (VDBG) Log.d(TAG, "dispatchAllDestroyedListeners");
+ List<InterfaceDestroyedListenerProxy> triggerList = new ArrayList<>();
synchronized (mLock) {
for (InterfaceCacheEntry cacheEntry: mInterfaceInfoCache.values()) {
for (InterfaceDestroyedListenerProxy listener : cacheEntry.destroyedListeners) {
- listener.trigger();
+ triggerList.add(listener);
}
cacheEntry.destroyedListeners.clear(); // for insurance
}
mInterfaceInfoCache.clear();
}
+
+ for (InterfaceDestroyedListenerProxy listener : triggerList) {
+ listener.trigger();
+ }
}
private abstract class ListenerProxy<LISTENER> {