Skip to content

Commit

Permalink
Allow FirstFrameListeners to remove themselves from the FlutterView's…
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-simmons authored Mar 26, 2018
1 parent d9ec2de commit 5e85573
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shell/platform/android/io/flutter/view/FlutterView.java
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,9 @@ public void updateSemantics(ByteBuffer buffer, String[] strings) {

// 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();
}
}
Expand Down

0 comments on commit 5e85573

Please sign in to comment.