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 Aug 26, 2020

fixes flutter/flutter#64458

FlutterActivity and FlutterFragment are actually fine as is. Changing them too for consistency.
FlutterActivity doesn't expose the bundle path via Intent. FlutterFragment has a builder for override only and that doesn't resolve until after the FlutterFragment is created.

FlutterFragmentActivity tries to eager resolve to populate all the values of the FlutterFragment builder parameters.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@xster xster marked this pull request as draft August 26, 2020 01:36
@auto-assign auto-assign bot requested a review from iskakaushik August 26, 2020 01:37
@xster xster removed the request for review from iskakaushik August 26, 2020 16:45
@xster xster force-pushed the bundle-path-default branch 2 times, most recently from 6abde2f to f1e50ed Compare August 30, 2020 06:22
@xster xster marked this pull request as ready for review August 30, 2020 06:22
@auto-assign auto-assign bot requested a review from gw280 August 30, 2020 06:22
@xster xster requested review from jason-simmons and mehmetf and removed request for gw280 August 30, 2020 06:22
FlutterLoader mockFlutterLoader = mock(FlutterLoader.class);
when(mockFlutterLoader.findAppBundlePath()).thenReturn("default_flutter_assets/path");
FlutterInjector.setInstance(
new FlutterInjector.Builder().setFlutterLoader(mockFlutterLoader).build());
Copy link
Member Author

Choose a reason for hiding this comment

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

that other episode's so I can add this

}

if (!FlutterInjector.instance().flutterLoader().initialized()) {
throw new AssertionError("Flutter UI can only be started once the Flutter engine's running.");
Copy link
Contributor

Choose a reason for hiding this comment

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

If users hit this, will they know what to do? Perhaps we can guide them to add-to-app guide or something?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually I'll remove this check. Looking through the code, it's not actually possible to run into this situation through Flutter/Fragment/Activity either through builders or through subclassing and this class isn't public so it'll only affect tests.

@xster xster force-pushed the bundle-path-default branch from 965d741 to 4f34ee4 Compare September 3, 2020 21:16
@xster xster merged commit b22a8c6 into flutter:master Sep 4, 2020
@xster xster deleted the bundle-path-default branch September 4, 2020 00:31
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 5, 2020
…dle path override instead of eager resolving during construction (flutter/engine#20769)
flar pushed a commit to flutter/flutter that referenced this pull request Sep 8, 2020
* 30b829e Populates fuchsia node actions in semantics updates. (flutter/engine#20451)

* c2e7010 Roll Skia from 1ee21cdfb6fe to 6763a713f957 (1 revision) (flutter/engine#20982)

* 841401d restore FML_DCHECK removed due to a code reviewing error (flutter/engine#20953)

* 367c6db Don't use GetTaskQueueId() in rasterizer as it breaks Fuchsia (flutter/engine#20983)

* b22a8c6 Let FlutterActivity/Fragment/FragmentActivity have an app bundle path override instead of eager resolving during construction (flutter/engine#20769)

* 0f0ae68 Update test Dart code to pass the latest Dart analyzer rules (flutter/engine#20986)

* d77dd31 Manual roll of Dart b29f228f62...016e8880f0 (flutter/engine#20967)

* c7b3d53 Roll Fuchsia Mac SDK from gOI3W1UNU... to EN2ycWLxi... (flutter/engine#20985)

* 6a6986d improve sensitivity of BackdropFilter web tests (flutter/engine#20915)

* 9fc9cb2 Roll Dart SDK from 016e8880f0ab to 0f0cff3922ad (7 revisions) (flutter/engine#20990)

* 242d522 [Android R] Sync keyboard animation with view insets vs Android 11/R/API 30 WindowInsetsAnimation (flutter/engine#20843)

* b4e0896 Roll Fuchsia Linux SDK from 81O8Kg_Rw... to A0PKwETay... (flutter/engine#20998)

* d77c4e5 adjust blur radius for HTML to match CanvasKit (flutter/engine#20840)

* 0628492 Roll Dart SDK from 0f0cff3922ad to f3a9ca88b664 (1 revision) (flutter/engine#21000)

* d1d848e Roll Fuchsia Mac SDK from EN2ycWLxi... to sih5f60Gt... (flutter/engine#20999)
@ReniDelonzek
Copy link

Hello, has this been published in the dev pub? I am using the latest versions available today and I still have this problem.

For me it only occurs when a notification arrives via firebase messaging and the app is closed

@ReniDelonzek
Copy link

Based on
this solution, add

<application
        android:name="io.flutter.app.FlutterApplication"

solved my problem, However, this should not be necessary after flutter 1.20

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FlutterFragment/FlutterFragmentActivity should not reference FlutterMain

4 participants