android: fix cancel cause modify map concurrently
This commit is contained in:
parent
24e704e1b9
commit
39e1fc98e2
@ -32,6 +32,7 @@ import org.json.JSONObject;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.WeakHashMap;
|
import java.util.WeakHashMap;
|
||||||
@ -191,7 +192,7 @@ public class DoricContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void teardown() {
|
public void teardown() {
|
||||||
Set<String> animatorIds = animators.keySet();
|
Set<String> animatorIds = new HashSet<>(animators.keySet());
|
||||||
for (String animatorId : animatorIds) {
|
for (String animatorId : animatorIds) {
|
||||||
Animator animator = animators.remove(animatorId);
|
Animator animator = animators.remove(animatorId);
|
||||||
if (animator != null) {
|
if (animator != null) {
|
||||||
|
Reference in New Issue
Block a user