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

Commit 6892b27

Browse files
author
Miguel Ruivo
authored
Merge branch 'master' into master
2 parents dc5052c + 9560b2a commit 6892b27

472 files changed

Lines changed: 7214 additions & 761 deletions

File tree

Some content is hidden

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

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ packages/camera/** @bparrishMines
1111
packages/connectivity/** @cyanglaz @matthew-carroll
1212
packages/device_info/** @matthew-carroll
1313
packages/espresso/** @collinjackson @adazh
14+
packages/file_selector/** @ditman
1415
packages/google_maps_flutter/** @cyanglaz
1516
packages/google_sign_in/** @cyanglaz @mehmetf
1617
packages/image_picker/** @cyanglaz

packages/android_alarm_manager/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 0.4.5+15
2+
3+
* Update android compileSdkVersion to 29.
4+
5+
## 0.4.5+14
6+
7+
* Keep handling deprecated Android v1 classes for backward compatibility.
8+
19
## 0.4.5+13
210

311
* Android Code Inspection and Clean up.

packages/android_alarm_manager/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ project.getTasks().withType(JavaCompile){
2727
apply plugin: 'com.android.library'
2828

2929
android {
30-
compileSdkVersion 28
30+
compileSdkVersion 29
3131
compileOptions {
3232
sourceCompatibility JavaVersion.VERSION_1_8
3333
targetCompatibility JavaVersion.VERSION_1_8

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/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
2525
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2626

2727
android {
28-
compileSdkVersion 28
28+
compileSdkVersion 29
2929

3030
lintOptions {
3131
disable 'InvalidPackage'

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)