Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
[many] Replace deprecated getFlutterEngine calls on Android (#2600)
Browse files Browse the repository at this point in the history
  • Loading branch information
creativecreatorormaybenot committed Mar 12, 2020
1 parent 995c15b commit 04a051a
Show file tree
Hide file tree
Showing 41 changed files with 83 additions and 33 deletions.
4 changes: 4 additions & 0 deletions packages/android_alarm_manager/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.4.5+6

* Replace deprecated `getFlutterEngine` call on Android.

## 0.4.5+5

* Added an Espresso test.
Expand Down
Expand Up @@ -63,8 +63,7 @@ public static void registerWith(Registrar registrar) {

@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
onAttachedToEngine(
binding.getApplicationContext(), binding.getFlutterEngine().getDartExecutor());
onAttachedToEngine(binding.getApplicationContext(), binding.getBinaryMessenger());
}

public void onAttachedToEngine(Context applicationContext, BinaryMessenger messenger) {
Expand Down
2 changes: 1 addition & 1 deletion packages/android_alarm_manager/pubspec.yaml
@@ -1,7 +1,7 @@
name: android_alarm_manager
description: Flutter plugin for accessing the Android AlarmManager service, and
running Dart code in the background when alarms fire.
version: 0.4.5+5
version: 0.4.5+6
homepage: https://github.com/flutter/plugins/tree/master/packages/android_alarm_manager

dependencies:
Expand Down
4 changes: 4 additions & 0 deletions packages/camera/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.5.7+5

* Replace deprecated `getFlutterEngine` call on Android.

## 0.5.7+4

* Add `pedantic` to dev_dependency.
Expand Down
Expand Up @@ -68,7 +68,7 @@ public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
public void onAttachedToActivity(@NonNull ActivityPluginBinding binding) {
maybeStartListening(
binding.getActivity(),
flutterPluginBinding.getFlutterEngine().getDartExecutor(),
flutterPluginBinding.getBinaryMessenger(),
binding::addRequestPermissionsResultListener,
flutterPluginBinding.getFlutterEngine().getRenderer());
}
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/pubspec.yaml
Expand Up @@ -2,7 +2,7 @@ name: camera
description: A Flutter plugin for getting information about and controlling the
camera on Android and iOS. Supports previewing the camera feed, capturing images, capturing video,
and streaming image buffers to dart.
version: 0.5.7+4
version: 0.5.7+5

homepage: https://github.com/flutter/plugins/tree/master/packages/camera

Expand Down
4 changes: 4 additions & 0 deletions packages/connectivity/connectivity/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.4.8+3

* Replace deprecated `getFlutterEngine` call on Android.

## 0.4.8+2

* Remove hard coded ios workspace setting of the example app.
Expand Down
Expand Up @@ -28,7 +28,7 @@ public static void registerWith(Registrar registrar) {

@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
setupChannels(binding.getFlutterEngine().getDartExecutor(), binding.getApplicationContext());
setupChannels(binding.getBinaryMessenger(), binding.getApplicationContext());
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion packages/connectivity/connectivity/pubspec.yaml
Expand Up @@ -2,7 +2,7 @@ name: connectivity
description: Flutter plugin for discovering the state of the network (WiFi &
mobile/cellular) connectivity on Android and iOS.
homepage: https://github.com/flutter/plugins/tree/master/packages/connectivity/connectivity
version: 0.4.8+2
version: 0.4.8+3

flutter:
plugin:
Expand Down
4 changes: 4 additions & 0 deletions packages/e2e/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.3.0+1

* Replace deprecated `getFlutterEngine` call on Android.

## 0.3.0

* Updates documentation to instruct developers not to launch the activity since
Expand Down
Expand Up @@ -31,8 +31,7 @@ public static void registerWith(Registrar registrar) {

@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
onAttachedToEngine(
binding.getApplicationContext(), binding.getFlutterEngine().getDartExecutor());
onAttachedToEngine(binding.getApplicationContext(), binding.getBinaryMessenger());
}

private void onAttachedToEngine(Context applicationContext, BinaryMessenger messenger) {
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/pubspec.yaml
@@ -1,6 +1,6 @@
name: e2e
description: Runs tests that use the flutter_test API as integration tests.
version: 0.3.0
version: 0.3.0+1
homepage: https://github.com/flutter/plugins/tree/master/packages/e2e

environment:
Expand Down
4 changes: 4 additions & 0 deletions packages/espresso/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.0.1+5

* Replace deprecated `getFlutterEngine` call on Android.

## 0.0.1+4

* Remove Swift dependency.
Expand Down
Expand Up @@ -13,7 +13,7 @@ public class EspressoPlugin implements FlutterPlugin, MethodCallHandler {
@Override
public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
final MethodChannel channel =
new MethodChannel(flutterPluginBinding.getFlutterEngine().getDartExecutor(), "espresso");
new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "espresso");
channel.setMethodCallHandler(new EspressoPlugin());
}

Expand Down
2 changes: 1 addition & 1 deletion packages/espresso/pubspec.yaml
@@ -1,6 +1,6 @@
name: espresso
description: Java classes for testing Flutter apps using Espresso.
version: 0.0.1+4
version: 0.0.1+5
homepage: https://github.com/flutter/plugins/espresso

environment:
Expand Down
4 changes: 4 additions & 0 deletions packages/local_auth/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.6.1+4

* Replace deprecated `getFlutterEngine` call on Android.

## 0.6.1+3

* Make the pedantic dev_dependency explicit.
Expand Down
Expand Up @@ -169,7 +169,7 @@ private void stopAuthentication(Result result) {

@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
channel = new MethodChannel(binding.getFlutterEngine().getDartExecutor(), CHANNEL_NAME);
channel = new MethodChannel(binding.getBinaryMessenger(), CHANNEL_NAME);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion packages/local_auth/pubspec.yaml
Expand Up @@ -2,7 +2,7 @@ name: local_auth
description: Flutter plugin for Android and iOS device authentication sensors
such as Fingerprint Reader and Touch ID.
homepage: https://github.com/flutter/plugins/tree/master/packages/local_auth
version: 0.6.1+3
version: 0.6.1+4

flutter:
plugin:
Expand Down
4 changes: 4 additions & 0 deletions packages/package_info/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.4.0+15

* Replace deprecated `getFlutterEngine` call on Android.

## 0.4.0+14

* Make the pedantic dev_dependency explicit.
Expand Down
Expand Up @@ -31,8 +31,7 @@ public static void registerWith(Registrar registrar) {

@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
onAttachedToEngine(
binding.getApplicationContext(), binding.getFlutterEngine().getDartExecutor());
onAttachedToEngine(binding.getApplicationContext(), binding.getBinaryMessenger());
}

private void onAttachedToEngine(Context applicationContext, BinaryMessenger messenger) {
Expand Down
2 changes: 1 addition & 1 deletion packages/package_info/pubspec.yaml
Expand Up @@ -2,7 +2,7 @@ name: package_info
description: Flutter plugin for querying information about the application
package, such as CFBundleVersion on iOS or versionCode on Android.
homepage: https://github.com/flutter/plugins/tree/master/packages/package_info
version: 0.4.0+14
version: 0.4.0+15

flutter:
plugin:
Expand Down
4 changes: 4 additions & 0 deletions packages/path_provider/path_provider/CHANGELOG.md
@@ -1,3 +1,7 @@
## 1.6.6

* Replace deprecated `getFlutterEngine` call on Android.

## 1.6.5

* Remove unused class name in pubspec.
Expand Down
Expand Up @@ -35,9 +35,7 @@ public static void registerWith(Registrar registrar) {

@Override
public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) {
channel =
new MethodChannel(
binding.getFlutterEngine().getDartExecutor(), "plugins.flutter.io/path_provider");
channel = new MethodChannel(binding.getBinaryMessenger(), "plugins.flutter.io/path_provider");
context = binding.getApplicationContext();
channel.setMethodCallHandler(this);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/path_provider/path_provider/pubspec.yaml
Expand Up @@ -2,7 +2,7 @@ name: path_provider
description: Flutter plugin for getting commonly used locations on the Android &
iOS file systems, such as the temp and app data directories.
homepage: https://github.com/flutter/plugins/tree/master/packages/path_provider/path_provider
version: 1.6.5
version: 1.6.6

flutter:
plugin:
Expand Down
4 changes: 4 additions & 0 deletions packages/quick_actions/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.4.0+3

* Replace deprecated `getFlutterEngine` call on Android.

## 0.4.0+2

* Make the pedantic dev_dependency explicit.
Expand Down
Expand Up @@ -32,8 +32,7 @@ public static void registerWith(Registrar registrar) {

@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
setupChannel(
binding.getFlutterEngine().getDartExecutor(), binding.getApplicationContext(), null);
setupChannel(binding.getBinaryMessenger(), binding.getApplicationContext(), null);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion packages/quick_actions/pubspec.yaml
Expand Up @@ -2,7 +2,7 @@ name: quick_actions
description: Flutter plugin for creating shortcuts on home screen, also known as
Quick Actions on iOS and App Shortcuts on Android.
homepage: https://github.com/flutter/plugins/tree/master/packages/quick_actions
version: 0.4.0+2
version: 0.4.0+3

flutter:
plugin:
Expand Down
4 changes: 4 additions & 0 deletions packages/sensors/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.4.1+9

* Replace deprecated `getFlutterEngine` call on Android.

## 0.4.1+8

* Make the pedantic dev_dependency explicit.
Expand Down
Expand Up @@ -33,7 +33,7 @@ public static void registerWith(Registrar registrar) {
@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
final Context context = binding.getApplicationContext();
setupEventChannels(context, binding.getFlutterEngine().getDartExecutor());
setupEventChannels(context, binding.getBinaryMessenger());
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion packages/sensors/pubspec.yaml
Expand Up @@ -2,7 +2,7 @@ name: sensors
description: Flutter plugin for accessing the Android and iOS accelerometer and
gyroscope sensors.
homepage: https://github.com/flutter/plugins/tree/master/packages/sensors
version: 0.4.1+8
version: 0.4.1+9

flutter:
plugin:
Expand Down
4 changes: 4 additions & 0 deletions packages/share/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.6.3+8

* Replace deprecated `getFlutterEngine` call on Android.

## 0.6.3+7

* Updated gradle version of example.
Expand Down
Expand Up @@ -27,7 +27,7 @@ public static void registerWith(Registrar registrar) {

@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
setUpChannel(null, binding.getFlutterEngine().getDartExecutor());
setUpChannel(null, binding.getBinaryMessenger());
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion packages/share/pubspec.yaml
Expand Up @@ -2,7 +2,7 @@ name: share
description: Flutter plugin for sharing content via the platform share UI, using
the ACTION_SEND intent on Android and UIActivityViewController on iOS.
homepage: https://github.com/flutter/plugins/tree/master/packages/share
version: 0.6.3+7
version: 0.6.3+8

flutter:
plugin:
Expand Down
4 changes: 4 additions & 0 deletions packages/url_launcher/url_launcher/CHANGELOG.md
@@ -1,3 +1,7 @@
## 5.4.4

* Replace deprecated `getFlutterEngine` call on Android.

## 5.4.3

* Fixed the launchUniversalLinkIos method.
Expand Down
Expand Up @@ -35,7 +35,7 @@ public static void registerWith(Registrar registrar) {
public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) {
urlLauncher = new UrlLauncher(binding.getApplicationContext(), /*activity=*/ null);
methodCallHandler = new MethodCallHandlerImpl(urlLauncher);
methodCallHandler.startListening(binding.getFlutterEngine().getDartExecutor());
methodCallHandler.startListening(binding.getBinaryMessenger());
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion packages/url_launcher/url_launcher/pubspec.yaml
Expand Up @@ -2,7 +2,7 @@ name: url_launcher
description: Flutter plugin for launching a URL on Android and iOS. Supports
web, phone, SMS, and email schemes.
homepage: https://github.com/flutter/plugins/tree/master/packages/url_launcher/url_launcher
version: 5.4.3
version: 5.4.4

flutter:
plugin:
Expand Down
4 changes: 4 additions & 0 deletions packages/video_player/video_player/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.10.8+2

* Replace deprecated `getFlutterEngine` call on Android.

## 0.10.8+1

* Make the pedantic dev_dependency explicit.
Expand Down
Expand Up @@ -53,7 +53,7 @@ public void onAttachedToEngine(FlutterPluginBinding binding) {
this.flutterState =
new FlutterState(
binding.getApplicationContext(),
binding.getFlutterEngine().getDartExecutor(),
binding.getBinaryMessenger(),
FlutterMain::getLookupKeyForAsset,
FlutterMain::getLookupKeyForAsset,
binding.getFlutterEngine().getRenderer());
Expand Down
2 changes: 1 addition & 1 deletion packages/video_player/video_player/pubspec.yaml
@@ -1,7 +1,7 @@
name: video_player
description: Flutter plugin for displaying inline video with other Flutter
widgets on Android and iOS.
version: 0.10.8+1
version: 0.10.8+2
homepage: https://github.com/flutter/plugins/tree/master/packages/video_player/video_player

flutter:
Expand Down
4 changes: 4 additions & 0 deletions packages/webview_flutter/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.3.19+10

* Replace deprecated `getFlutterEngine` call on Android.

## 0.3.19+9

* Remove example app's iOS workspace settings.
Expand Down
Expand Up @@ -52,7 +52,7 @@ public static void registerWith(Registrar registrar) {

@Override
public void onAttachedToEngine(FlutterPluginBinding binding) {
BinaryMessenger messenger = binding.getFlutterEngine().getDartExecutor();
BinaryMessenger messenger = binding.getBinaryMessenger();
binding
.getFlutterEngine()
.getPlatformViewsController()
Expand Down

0 comments on commit 04a051a

Please sign in to comment.