Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ public void smokeTestEngineLaunch() throws Throwable {
// Run the production under test on the UI thread instead of annotating the whole test
// as @UiThreadTest because having the message handler and the CompletableFuture both being
// on the same thread will create deadlocks.
UiThreadStatement.runOnUiThread(() -> engine.set(new FlutterEngine(applicationContext)));
UiThreadStatement.runOnUiThread(
() ->
engine.set(
new FlutterEngine(
applicationContext,
/*dartVmArgs */ null,
/* automaticallyRegisterPlugins */ false)));
SettableFuture<Boolean> statusReceived = SettableFuture.create();

// Resolve locale to `en_US`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ public class SpawnMultiEngineActivity extends TestActivity {
@NonNull
public FlutterEngine provideFlutterEngine(@NonNull Context context) {
FlutterEngineGroup engineGroup = new FlutterEngineGroup(context);
FlutterEngine firstEngine = engineGroup.createAndRunDefaultEngine(context);
FlutterEngineGroup.Options options =
new FlutterEngineGroup.Options(context).setAutomaticallyRegisterPlugins(false);
FlutterEngine firstEngine = engineGroup.createAndRunEngine(options);

FlutterEngine secondEngine = engineGroup.createAndRunDefaultEngine(context);
FlutterEngine secondEngine = engineGroup.createAndRunEngine(options);

// Check that a new engine can be spawned from the group even if the group's
// original engine has been destroyed.
firstEngine.destroy();
FlutterEngine thirdEngine = engineGroup.createAndRunDefaultEngine(context);
FlutterEngine thirdEngine = engineGroup.createAndRunEngine(options);

return thirdEngine;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ public class SpawnedEngineActivity extends TestActivity {
@NonNull
public FlutterEngine provideFlutterEngine(@NonNull Context context) {
FlutterEngineGroup engineGroup = new FlutterEngineGroup(context);
engineGroup.createAndRunDefaultEngine(context);
FlutterEngineGroup.Options options =
new FlutterEngineGroup.Options(context).setAutomaticallyRegisterPlugins(false);
engineGroup.createAndRunEngine(options);

FlutterEngine secondEngine = engineGroup.createAndRunDefaultEngine(context);
FlutterEngine secondEngine = engineGroup.createAndRunEngine(options);

secondEngine
.getDartExecutor()
Expand Down