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

Android Embedding PR29: Improve FlutterFragment construction API + engine config API. #8540

Conversation

matthew-carroll
Copy link
Contributor

Android Embedding PR29: Improve FlutterFragment construction API + engine config API.

I accidentally removed the ability to override a FlutterFragment method for engine customization in a previous PR. I bring that ability back with this PR.

@Override
@Nullable
protected FlutterEngine createFlutterEngine(@NonNull Context context) {
  return MyEngineCache.cachedEngine;
} 

I also revamped the Builder within FlutterFragment such that FlutterFragment.Builder can be used directly for FlutterFragment subclasses without itself being subclassed, so long as the subclass does not need to introduce any new properties:

MyFlutterFragment f = new FlutterFragment.Builder(MyFlutterFragment.class)
  .someProperty(...)
  .build<MyFlutterFragment>();

If the FlutterFragment subclass does need to add more creation properties then the Builder can be subclassed as before. Then it can be used like:

MyFlutterFragment f = new MyFlutterFragment.MyBuilder()
  .someProperty(...)
  .build<MyFlutterFragment>();

If a typical FlutterFragment is desired, then the Builder can be used as it previously was:

FlutterFragment f = new FlutterFragment.Builder()
  .someProperty(...)
  .build();

@mjohnsullivan
Copy link

API changes LGTM

@matthew-carroll matthew-carroll merged commit 23b0e02 into flutter:master Apr 12, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 13, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 13, 2019
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Apr 15, 2019
flutter/engine@9aa7c9a...c3824f0

git log 9aa7c9a..c3824f0 --no-merges --oneline
c3824f0 Roll src/third_party/skia e62bf561638c..990bfc785891 (2 commits) (flutter/engine#8569)
49a72e1 Roll src/third_party/skia 8be917af4313..e62bf561638c (5 commits) (flutter/engine#8568)
7292d62 Revert Versions API (flutter/engine#7828)
9336671 Revert &#34;Roll src/third_party/dart a8f3a5dae6..c2eb9a9860 (8 commits)&#34; (flutter/engine#8567)
a543543 Roll src/third_party/dart a8f3a5dae6..c2eb9a9860 (8 commits)
23b0e02 Android Embedding PR29: Improve FlutterFragment construction API &#43; engine config API. (flutter/engine#8540)
e6c822d Roll src/third_party/skia 25071cc52b4b..8be917af4313 (6 commits) (flutter/engine#8564)
1bb2c0c Remove unused import in FlutterActivityDelegate (flutter/engine#8563)
ad04340 Add missing &lt;memory&gt; include to text_input_model.h (flutter/engine#8562)
fcd717e Update README.md to point to flutter.dev (flutter/engine#8557)
501892a Roll src/third_party/skia 35f1c154c5e5..25071cc52b4b (7 commits) (flutter/engine#8560)
db99c86 Roll src/third_party/skia 41476708db86..35f1c154c5e5 (1 commits) (flutter/engine#8559)
a88cd80 Roll src/third_party/skia f74fff660084..41476708db86 (1 commits) (flutter/engine#8558)

The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff (garyq@google.com), and stop
the roller if necessary.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants