Merge "Fix concurrent modification exception in KeepaliveTracker" am: 7da0d7f02e
am: 5fb8a1d525
Change-Id: I6221bdff630ebef88bfd9d609e31a0f9ede036ad
This commit is contained in:
@@ -462,9 +462,10 @@ public class KeepaliveTracker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void handleStopAllKeepalives(NetworkAgentInfo nai, int reason) {
|
public void handleStopAllKeepalives(NetworkAgentInfo nai, int reason) {
|
||||||
HashMap <Integer, KeepaliveInfo> networkKeepalives = mKeepalives.get(nai);
|
final HashMap<Integer, KeepaliveInfo> networkKeepalives = mKeepalives.get(nai);
|
||||||
if (networkKeepalives != null) {
|
if (networkKeepalives != null) {
|
||||||
for (KeepaliveInfo ki : networkKeepalives.values()) {
|
final ArrayList<KeepaliveInfo> kalist = new ArrayList(networkKeepalives.values());
|
||||||
|
for (KeepaliveInfo ki : kalist) {
|
||||||
ki.stop(reason);
|
ki.stop(reason);
|
||||||
// Clean up keepalives since the network agent is disconnected and unable to pass
|
// Clean up keepalives since the network agent is disconnected and unable to pass
|
||||||
// back asynchronous result of stop().
|
// back asynchronous result of stop().
|
||||||
|
|||||||
Reference in New Issue
Block a user