Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@xster
Copy link
Member

@xster xster commented Apr 26, 2021

Fixes b/186281005. I broke it in https://github.com/flutter/engine/pull/25395/files#diff-893547c230a70f1b0618f0b79a56c67d8506f0983a5a92b819f13c1071fd7d84R591 since there's an edge case where that method is called before the FlutterFragmentActivity figures out which FlutterFragment it contains in scenarios where the FlutterFragmentActivity is destroyed (such as during reconfiguration) but the FlutterFragment in the fragment manager is not.

This PR moves the restore of the existing fragment earlier in the FlutterFragmentActivity recreation process.

@xster xster requested a review from blasten April 26, 2021 21:19
@google-cla google-cla bot added the cla: yes label Apr 26, 2021
@xster xster requested review from GaryQian and gaaclarke and removed request for blasten April 26, 2021 21:20
}

static class FlutterFragmentActivityWithProvidedEngine extends FlutterFragmentActivity {
int engineCreated = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/engineCreated/numberOfEnginesCreated

@xster xster added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Apr 27, 2021
@xster xster merged commit dbd622c into flutter:master Apr 27, 2021
@xster xster deleted the fragment-null branch April 27, 2021 05:23
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes platform-android waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants