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

Commit 46c9bc9

Browse files
committed
Merge remote-tracking branch 'plugins/master'
2 parents b79938a + a346783 commit 46c9bc9

File tree

499 files changed

+7637
-1548
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

499 files changed

+7637
-1548
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ task:
5959
- ./chromedriver/chromedriver --port=4444 &
6060
test_script:
6161
- cd $INTEGRATION_TEST_PATH/example/
62-
- flutter drive -v --driver=test_driver/integration_test_driver.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome
62+
- flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome
6363
- name: build-apks+java-test+firebase-test-lab
6464
env:
6565
matrix:

CODEOWNERS

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@
44
# These names are just suggestions. It is fine to have your changes
55
# reviewed by someone else.
66

7-
packages/android_alarm_manager/* @bkonyi
8-
packages/android_intent/* @mklim @matthew-carroll
9-
packages/battery/* @amirh @matthew-carroll
10-
packages/camera/* @bparrishMines
11-
packages/connectivity/* @cyanglaz @matthew-carroll
12-
packages/device_info/* @matthew-carroll
13-
packages/espresso/* @collinjackson @adazh
14-
packages/google_maps_flutter/* @cyanglaz
15-
packages/google_sign_in/* @cyanglaz @mehmetf
16-
packages/image_picker/* @cyanglaz
17-
packages/integration_test/* @dnfield
18-
packages/in_app_purchase/* @mklim @cyanglaz @LHLL
19-
packages/ios_platform_images/* @gaaclarke
20-
packages/package_info/* @cyanglaz @matthew-carroll
21-
packages/path_provider/* @matthew-carroll
22-
packages/shared_preferences/* @matthew-carroll
23-
packages/url_launcher/* @mklim
24-
packages/video_player/* @iskakaushik @cyanglaz
25-
packages/webview_flutter/* @amirh
7+
packages/android_alarm_manager/** @bkonyi
8+
packages/android_intent/** @mklim @matthew-carroll
9+
packages/battery/** @amirh @matthew-carroll
10+
packages/camera/** @bparrishMines
11+
packages/connectivity/** @cyanglaz @matthew-carroll
12+
packages/device_info/** @matthew-carroll
13+
packages/espresso/** @collinjackson @adazh
14+
packages/file_selector/** @ditman
15+
packages/google_maps_flutter/** @cyanglaz
16+
packages/google_sign_in/** @cyanglaz @mehmetf
17+
packages/image_picker/** @cyanglaz
18+
packages/integration_test/** @dnfield
19+
packages/in_app_purchase/** @mklim @cyanglaz @LHLL
20+
packages/ios_platform_images/** @gaaclarke
21+
packages/package_info/** @cyanglaz @matthew-carroll
22+
packages/path_provider/** @matthew-carroll
23+
packages/shared_preferences/** @matthew-carroll
24+
packages/url_launcher/** @mklim
25+
packages/video_player/** @iskakaushik @cyanglaz
26+
packages/webview_flutter/** @amirh

README.md

Lines changed: 28 additions & 28 deletions
Large diffs are not rendered by default.

packages/android_alarm_manager/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.4.5+14
2+
3+
* Keep handling deprecated Android v1 classes for backward compatibility.
4+
15
## 0.4.5+13
26

37
* Android Code Inspection and Clean up.

packages/android_alarm_manager/android/src/main/java/io/flutter/plugins/androidalarmmanager/AlarmService.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import android.util.Log;
1414
import androidx.core.app.AlarmManagerCompat;
1515
import androidx.core.app.JobIntentService;
16-
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback;
1716
import java.util.Collections;
1817
import java.util.HashMap;
1918
import java.util.HashSet;
@@ -91,15 +90,18 @@ public static void setCallbackDispatcher(Context context, long callbackHandle) {
9190
}
9291

9392
/**
94-
* Sets the {@link PluginRegistrantCallback} used to register the plugins used by an application
95-
* with the newly spawned background isolate.
93+
* Sets the {@link io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback} used to
94+
* register the plugins used by an application with the newly spawned background isolate.
9695
*
9796
* <p>This should be invoked in {@link Application.onCreate} with {@link
9897
* GeneratedPluginRegistrant} in applications using the V1 embedding API in order to use other
9998
* plugins in the background isolate. For applications using the V2 embedding API, it is not
100-
* necessary to set a {@link PluginRegistrantCallback} as plugins are registered automatically.
99+
* necessary to set a {@link io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback} as
100+
* plugins are registered automatically.
101101
*/
102-
public static void setPluginRegistrant(PluginRegistrantCallback callback) {
102+
@SuppressWarnings("deprecation")
103+
public static void setPluginRegistrant(
104+
io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback callback) {
103105
// Indirectly set in FlutterBackgroundExecutor for backwards compatibility.
104106
FlutterBackgroundExecutor.setPluginRegistrant(callback);
105107
}

packages/android_alarm_manager/android/src/main/java/io/flutter/plugins/androidalarmmanager/AndroidAlarmManagerPlugin.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66

77
import android.content.Context;
88
import android.util.Log;
9+
import io.flutter.embedding.engine.FlutterEngine;
910
import io.flutter.embedding.engine.plugins.FlutterPlugin;
1011
import io.flutter.plugin.common.BinaryMessenger;
1112
import io.flutter.plugin.common.JSONMethodCodec;
1213
import io.flutter.plugin.common.MethodCall;
1314
import io.flutter.plugin.common.MethodChannel;
1415
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
1516
import io.flutter.plugin.common.MethodChannel.Result;
16-
import io.flutter.plugin.common.PluginRegistry.Registrar;
17-
import io.flutter.view.FlutterNativeView;
1817
import org.json.JSONArray;
1918
import org.json.JSONException;
2019

@@ -28,8 +27,8 @@
2827
* <li>The Dart side of this plugin sends the Android side a "AlarmService.start" message, along
2928
* with a Dart callback handle for a Dart callback that should be immediately invoked by a
3029
* background Dart isolate.
31-
* <li>The Android side of this plugin spins up a background {@link FlutterNativeView}, which
32-
* includes a background Dart isolate.
30+
* <li>The Android side of this plugin spins up a background {@link FlutterEngine}, which includes
31+
* a background Dart isolate.
3332
* <li>The Android side of this plugin instructs the new background Dart isolate to execute the
3433
* callback that was received in the "AlarmService.start" message.
3534
* <li>The Dart side of this plugin, running within the new background isolate, executes the
@@ -49,12 +48,13 @@ public class AndroidAlarmManagerPlugin implements FlutterPlugin, MethodCallHandl
4948

5049
/**
5150
* Registers this plugin with an associated Flutter execution context, represented by the given
52-
* {@link Registrar}.
51+
* {@link io.flutter.plugin.common.PluginRegistry.Registrar}.
5352
*
5453
* <p>Once this method is executed, an instance of {@code AndroidAlarmManagerPlugin} will be
5554
* connected to, and running against, the associated Flutter execution context.
5655
*/
57-
public static void registerWith(Registrar registrar) {
56+
@SuppressWarnings("deprecation")
57+
public static void registerWith(io.flutter.plugin.common.PluginRegistry.Registrar registrar) {
5858
if (instance == null) {
5959
instance = new AndroidAlarmManagerPlugin();
6060
}

packages/android_alarm_manager/android/src/main/java/io/flutter/plugins/androidalarmmanager/FlutterBackgroundExecutor.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
import io.flutter.plugin.common.MethodChannel;
2020
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
2121
import io.flutter.plugin.common.MethodChannel.Result;
22-
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback;
2322
import io.flutter.view.FlutterCallbackInformation;
24-
import io.flutter.view.FlutterMain;
2523
import java.util.concurrent.CountDownLatch;
2624
import java.util.concurrent.atomic.AtomicBoolean;
2725

@@ -32,7 +30,10 @@
3230
public class FlutterBackgroundExecutor implements MethodCallHandler {
3331
private static final String TAG = "FlutterBackgroundExecutor";
3432
private static final String CALLBACK_HANDLE_KEY = "callback_handle";
35-
private static PluginRegistrantCallback pluginRegistrantCallback;
33+
34+
@SuppressWarnings("deprecation")
35+
private static io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback
36+
pluginRegistrantCallback;
3637

3738
/**
3839
* The {@link MethodChannel} that connects the Android side of this plugin with the background
@@ -45,14 +46,16 @@ public class FlutterBackgroundExecutor implements MethodCallHandler {
4546
private AtomicBoolean isCallbackDispatcherReady = new AtomicBoolean(false);
4647

4748
/**
48-
* Sets the {@code PluginRegistrantCallback} used to register plugins with the newly spawned
49-
* isolate.
49+
* Sets the {@code io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback} used to
50+
* register plugins with the newly spawned isolate.
5051
*
5152
* <p>Note: this is only necessary for applications using the V1 engine embedding API as plugins
5253
* are automatically registered via reflection in the V2 engine embedding API. If not set, alarm
5354
* callbacks will not be able to utilize functionality from other plugins.
5455
*/
55-
public static void setPluginRegistrant(PluginRegistrantCallback callback) {
56+
@SuppressWarnings("deprecation")
57+
public static void setPluginRegistrant(
58+
io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback callback) {
5659
pluginRegistrantCallback = callback;
5760
}
5861

@@ -101,7 +104,7 @@ public void onMethodCall(MethodCall call, Result result) {
101104
* <p>The isolate is configured as follows:
102105
*
103106
* <ul>
104-
* <li>Bundle Path: {@code FlutterMain.findAppBundlePath(context)}.
107+
* <li>Bundle Path: {@code io.flutter.view.FlutterMain.findAppBundlePath(context)}.
105108
* <li>Entrypoint: The Dart method used the last time this plugin was initialized in the
106109
* foreground.
107110
* <li>Run args: none.
@@ -130,7 +133,7 @@ public void startBackgroundIsolate(Context context) {
130133
* <p>The isolate is configured as follows:
131134
*
132135
* <ul>
133-
* <li>Bundle Path: {@code FlutterMain.findAppBundlePath(context)}.
136+
* <li>Bundle Path: {@code io.flutter.view.FlutterMain.findAppBundlePath(context)}.
134137
* <li>Entrypoint: The Dart method represented by {@code callbackHandle}.
135138
* <li>Run args: none.
136139
* </ul>
@@ -151,7 +154,8 @@ public void startBackgroundIsolate(Context context, long callbackHandle) {
151154
}
152155

153156
Log.i(TAG, "Starting AlarmService...");
154-
String appBundlePath = FlutterMain.findAppBundlePath();
157+
@SuppressWarnings("deprecation")
158+
String appBundlePath = io.flutter.view.FlutterMain.findAppBundlePath();
155159
AssetManager assets = context.getAssets();
156160
if (!isRunning()) {
157161
backgroundFlutterEngine = new FlutterEngine(context);

packages/android_alarm_manager/example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Demonstrates how to use the android_alarm_manager plugin.
55
## Getting Started
66

77
For help getting started with Flutter, view our online
8-
[documentation](http://flutter.io/).
8+
[documentation](https://flutter.dev/).

packages/android_alarm_manager/example/android/app/src/main/java/io/flutter/plugins/androidalarmmanagerexample/Application.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
package io.flutter.plugins.androidalarmmanagerexample;
22

33
import io.flutter.app.FlutterApplication;
4-
import io.flutter.plugin.common.PluginRegistry;
5-
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback;
64
import io.flutter.plugins.androidalarmmanager.AlarmService;
75
import io.flutter.plugins.androidalarmmanager.AndroidAlarmManagerPlugin;
86

9-
public class Application extends FlutterApplication implements PluginRegistrantCallback {
7+
@SuppressWarnings("deprecation")
8+
public class Application extends FlutterApplication
9+
implements io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback {
1010
@Override
1111
public void onCreate() {
1212
super.onCreate();
1313
AlarmService.setPluginRegistrant(this);
1414
}
1515

1616
@Override
17-
public void registerWith(PluginRegistry registry) {
17+
@SuppressWarnings("deprecation")
18+
public void registerWith(io.flutter.plugin.common.PluginRegistry registry) {
1819
AndroidAlarmManagerPlugin.registerWith(
1920
registry.registrarFor("io.flutter.plugins.androidalarmmanager.AndroidAlarmManagerPlugin"));
2021
}

packages/android_alarm_manager/example/android/app/src/main/java/io/flutter/plugins/androidalarmmanagerexample/EmbeddingV1Activity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
package io.flutter.plugins.androidalarmmanagerexample;
66

77
import android.os.Bundle;
8-
import io.flutter.app.FlutterActivity;
98
import io.flutter.plugins.androidalarmmanager.AndroidAlarmManagerPlugin;
109

11-
public class EmbeddingV1Activity extends FlutterActivity {
10+
@SuppressWarnings("deprecation")
11+
public class EmbeddingV1Activity extends io.flutter.app.FlutterActivity {
1212
public static final String TAG = "AlarmExampleMainActivity";
1313

1414
@Override

0 commit comments

Comments
 (0)