-
Notifications
You must be signed in to change notification settings - Fork 6k
Implemented library uri support for FlutterFragments and FlutterActivities #30726
Conversation
0c3906a
to
29b896f
Compare
29b896f
to
104dd5c
Compare
* | ||
* <p>Example value: "package:foo/bar.dart" | ||
* | ||
* <p>This preference can be controlled by setting a {@code <meta-data>} called {@link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, the manifest can have dynamic values that are passed from the tool to Gradle, then copied into the final manifest. e.g. https://github.com/flutter/flutter/blob/master/packages/flutter_tools/templates/app_shared/android.tmpl/app/src/main/AndroidManifest.xml.tmpl#L5
cc @GaryQian
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs another migration of existing manifest files
@@ -824,6 +825,32 @@ public String getDartEntrypointFunctionName() { | |||
} | |||
} | |||
|
|||
/** | |||
* The Dart library uri for the entrypoint that will be executed as soon as the Dart snapshot is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: uppercase for URI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -105,6 +105,8 @@ | |||
|
|||
/** The Dart entrypoint method name that is executed upon initialization. */ | |||
protected static final String ARG_DART_ENTRYPOINT = "dart_entrypoint"; | |||
/** */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: missing comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -1026,6 +1036,20 @@ public String getDartEntrypointFunctionName() { | |||
return getArguments().getString(ARG_DART_ENTRYPOINT, "main"); | |||
} | |||
|
|||
/** | |||
* Returns the library uri of the Dart method that this {@code FlutterFragment} should execute to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: uppercase URI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
I guess that we also need to add engine/shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java Lines 685 to 694 in f110bc7
engine/shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java Lines 472 to 473 in f110bc7
|
It should already exist by virtue of FlutterFragmentActivity inheriting from FlutterActivity. It looks like FlutterFragmentActivity's getDartEntrypointFunctionName is the same as FlutterActivity's. I'm not sure why it overloads it with the exact same code. Probably a quirk of changing inheritance. |
* 58305d1 Roll Skia from dd575bc0f1f5 to 0056f3f006de (2 revisions) (flutter/engine#30765) * 92a4f99 Allow additional expose_dirs in flutter_runner (flutter/engine#30749) * 358605c [web] Remove EngineParagraph and ParagraphGeometricStyle (flutter/engine#30766) * 8b9f625 Remove glitch when displaying platform views (flutter/engine#30724) * bd65330 Add missing dependencies to the background image app (flutter/engine#30769) * 65dfc9e [android] Remove the FlutterView casting, add a @nonnull and fix code style (flutter/engine#30734) * 00e2a47 Roll Skia from 0056f3f006de to 3e1354a592bc (3 revisions) (flutter/engine#30771) * 279e3af Implemented library uri support for FlutterFragments and FlutterActivities (flutter/engine#30726) * 36ad9f1 Roll Skia from 3e1354a592bc to 55b4dc3f7a1c (1 revision) (flutter/engine#30773)
Sorry, I didn't express clearly. Since the superclass of |
…ities (flutter#30726) * Implemented library uri support for FlutterFragments and FlutterActivities. * added docstrings * emmanuel feedback
issue flutter/flutter#91841
Pre-launch Checklist
writing and running engine tests.
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.