未验证 提交 5e855733 编写于 作者: J Jason Simmons 提交者: GitHub

Allow FirstFrameListeners to remove themselves from the FlutterView's list (#4871)

Fixes https://github.com/flutter/flutter/issues/15884
上级 d9ec2de7
......@@ -767,7 +767,9 @@ public class FlutterView extends SurfaceView
// Called by native to notify first Flutter frame rendered.
public void onFirstFrame() {
for (FirstFrameListener listener : mFirstFrameListeners) {
// Allow listeners to remove themselves when they are called.
List<FirstFrameListener> listeners = new ArrayList<>(mFirstFrameListeners);
for (FirstFrameListener listener : listeners) {
listener.onFirstFrame();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册