3838import io .flutter .embedding .engine .dart .DartExecutor ;
3939import io .flutter .embedding .engine .dart .DartExecutor .DartCallback ;
4040import io .flutter .embedding .engine .loader .FlutterLoader ;
41- import io .flutter .embedding .engine .plugins .shim .ShimPluginRegistry ;
4241import io .flutter .plugin .common .BinaryMessenger ;
4342import io .flutter .plugin .common .MethodCall ;
4443import io .flutter .plugin .common .MethodChannel ;
4544import io .flutter .plugin .common .MethodChannel .MethodCallHandler ;
4645import io .flutter .plugin .common .MethodChannel .Result ;
47- import io .flutter .plugin .common .PluginRegistry .PluginRegistrantCallback ;
4846import io .flutter .view .FlutterCallbackInformation ;
4947
5048import java .util .Arrays ;
@@ -60,9 +58,6 @@ public class FlutterBackgroundRunner implements MethodCallHandler {
6058
6159 public static final String USER_CALLBACK_KEY = "push_background_message_callback" ;
6260
63- // Deprecated, Support for backwards compatibility with V1 embedding.
64- private static PluginRegistrantCallback pluginRegistrantCallback ;
65-
6661 private final AtomicBoolean isCallbackDispatcherReady = new AtomicBoolean (false );
6762
6863 private MethodChannel bgMethodChannel ;
@@ -71,11 +66,6 @@ public class FlutterBackgroundRunner implements MethodCallHandler {
7166
7267 private long bgMessagingCallback ;
7368
74- // For Backwards Compatibility with V1 Plugin registration.
75- public static void setPluginRegistrantCallback (final PluginRegistrantCallback callback ) {
76- pluginRegistrantCallback = callback ;
77- }
78-
7969 public static void setCallBackDispatcher (final Context context , final long callbackHandle ) {
8070 final SharedPreferences prefs = context .getSharedPreferences (Core .PREFERENCE_NAME , Context .MODE_PRIVATE );
8171 prefs .edit ().putLong (CALLBACK_DISPATCHER_KEY , callbackHandle ).apply ();
@@ -128,12 +118,6 @@ public void startBgIsolate(final Context context, final long callbackHandle) {
128118 initializeMethodChannel (executor );
129119 final DartCallback dartCallback = new DartCallback (assets , appBundlePath , flutterCallbackInfo );
130120 executor .executeDartCallback (dartCallback );
131-
132- // For V1 Embedding
133- if (pluginRegistrantCallback != null ) {
134- pluginRegistrantCallback .registerWith (new ShimPluginRegistry (flutterEngine ));
135- }
136-
137121 }
138122 });
139123 };
0 commit comments