Avoid generated plugin registrant warnings for scenario_app (flutter/engine#50874)
Cleans up some noise in those logs.
This commit is contained in:
@@ -33,7 +33,13 @@ public class EngineLaunchE2ETest {
|
||||
// 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`.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user