android: fix java.util.ConcurrentModificationException
This commit is contained in:
parent
6efd008841
commit
fc94230df2
@ -67,12 +67,22 @@ public class DoricPerformanceProfile {
|
|||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addAnchorHook(AnchorHook hook) {
|
public void addAnchorHook(final AnchorHook hook) {
|
||||||
this.hooks.add(hook);
|
performanceHandler.post(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
hooks.add(hook);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeAnchorHook(AnchorHook hook) {
|
public void removeAnchorHook(final AnchorHook hook) {
|
||||||
this.hooks.remove(hook);
|
performanceHandler.post(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
hooks.remove(hook);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enable(boolean enable) {
|
public void enable(boolean enable) {
|
||||||
|
Reference in New Issue
Block a user