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

Commit 52713b2

Browse files
committed
Merge branch 'fluttermaster'
# Conflicts: # packages/image_picker/android/src/main/java/io/flutter/plugins/imagepicker/ImageResizer.java
2 parents bbdfe64 + e0eaed3 commit 52713b2

313 files changed

Lines changed: 4415 additions & 2127 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.

.cirrus.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ task:
6060
image: mojave-xcode-10.2-flutter
6161
setup_script:
6262
- pod repo update
63-
switch_channel_script:
63+
upgrade_script:
6464
- flutter channel master
6565
- flutter upgrade
66-
- flutter doctor
66+
- git fetch origin master
6767
activate_script:
6868
- pub global activate flutter_plugin_tools
6969
create_simulator_script:
@@ -83,4 +83,4 @@ task:
8383
SIMCTL_CHILD_MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550]
8484
build_script:
8585
- ./script/incremental_build.sh build-examples --ipa
86-
- ./script/incremental_build.sh drive-examples
86+
- ./script/incremental_build.sh drive-examples

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ GeneratedPluginRegistrant.m
3535
GeneratedPluginRegistrant.java
3636
build/
3737
.flutter-plugins
38+
39+
.project
40+
.classpath
41+
.settings

AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ Jonathan Younger <[email protected]>
4040
Jose Sanchez <[email protected]>
4141
Debkanchan Samadder <[email protected]>
4242
Audrius Karosevicius <[email protected]>
43+
Lukasz Piliszczuk <[email protected]>
44+
SoundReply Solutions GmbH <[email protected]>

CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
# reviewed by someone else.
66

77
packages/android_alarm_manager/* @bkonyi
8+
packages/android_intent/* @mklim
9+
packages/battery/* @amirh
810
packages/camera/* @bparrishMines @mklim
911
packages/cloud_firestore/* @collinjackson @kroikie
1012
packages/cloud_functions/* @collinjackson @kroikie
@@ -16,6 +18,7 @@ packages/firebase_core/* @collinjackson @kroikie
1618
packages/firebase_crashlytics/* @kroikie @collinjackson
1719
packages/firebase_database/* @collinjackson @kroikie
1820
packages/firebase_dynamic_links/* @bparrishMines
21+
packages/firebase_in_app_messaging/* @collinjackson
1922
packages/firebase_messaging/* @collinjackson @kroikie
2023
packages/firebase_ml_vision/* @bparrishMines
2124
packages/firebase_performance/* @bparrishMines @collinjackson
@@ -27,6 +30,8 @@ packages/image_picker/* @cyanglaz
2730
packages/in_app_purchase/* @mklim @cyanglaz
2831
packages/package_info/* @cyanglaz
2932
packages/path_provider/* @collinjackson
33+
packages/quick_actions/* @collinjackson
3034
packages/shared_preferences/* @collinjackson
35+
packages/url_launcher/* @mklim
3136
packages/video_player/* @iskakaushik @cyanglaz
3237
packages/webview_flutter/* @amirh

FlutterFire.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ The plugins are still under development, and some APIs might not be available ye
2323
| [firebase_crashlytics][crash_pub] | ![pub package][crash_badge] | [Firebase Crashlytics][crash_product] | [`packages/firebase_crashlytics`][crash_code] |
2424
| [firebase_database][database_pub] | ![pub package][database_badge] | [Firebase Realtime Database][database_product] | [`packages/firebase_database`][database_code] |
2525
| [firebase_dynamic_links][dynamic_links_pub] | ![pub package][dynamic_links_badge] | [Firebase Dynamic Links][dynamic_links_product] | [`packages/firebase_dynamic_links`][dynamic_links_code] |
26+
| [in_app_messaging][in_app_messaging_pub] | ![pub package][in_app_messaging_badge] | [Firebase In-App Messaging][in_app_messaging_product] | [`packages/firebase_in_app_messaging`][in_app_messaging_code] |
2627
| [firebase_messaging][messaging_pub] | ![pub package][messaging_badge] | [Firebase Cloud Messaging][messaging_product] | [`packages/firebase_messaging`][messaging_code] |
2728
| [firebase_ml_vision][ml_vision_pub] | ![pub package][ml_vision_badge] | [Firebase ML Kit][ml_vision_product] | [`packages/firebase_ml_vision`][ml_vision_code] |
2829
| [firebase_performance][performance_pub] | ![pub package][performance_badge] | [Firebase Performance Monitoring][performance_product] | [`packages/firebase_performance`][performance_code] |
@@ -74,6 +75,11 @@ The plugins are still under development, and some APIs might not be available ye
7475
[functions_code]: https://github.com/flutter/plugins/tree/master/packages/cloud_functions
7576
[functions_badge]: https://img.shields.io/pub/v/cloud_functions.svg
7677

78+
[in_app_messaging_pub]: https://pub.dartlang.org/packages/firebase_in_app_messaging
79+
[in_app_messaging_product]: https://firebase.google.com/products/in-app-messaging/
80+
[in_app_messaging_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_in_app_messaging
81+
[in_app_messaging_badge]: https://img.shields.io/pub/v/firebase_in_app_messaging.svg
82+
7783
[messaging_pub]: https://pub.dartlang.org/packages/firebase_messaging
7884
[messaging_product]: https://firebase.google.com/products/cloud-messaging/
7985
[messaging_code]: https://github.com/flutter/plugins/tree/master/packages/firebase_messaging

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ These are the available plugins in this repository.
6969
| [firebase_crashlytics](./packages/firebase_crashlytics/) | [![pub package](https://img.shields.io/pub/v/firebase_crashlytics.svg)](https://pub.dev/packages/firebase_crashlytics) |
7070
| [firebase_database](./packages/firebase_database/) | [![pub package](https://img.shields.io/pub/v/firebase_database.svg)](https://pub.dev/packages/firebase_database) |
7171
| [firebase_dynamic_links](./packages/firebase_dynamic_links/) | [![pub package](https://img.shields.io/pub/v/firebase_dynamic_links.svg)](https://pub.dev/packages/firebase_dynamic_links) |
72+
| [firebase_in_app_messaging](./packages/firebase_in_app_messaging/) | [![pub package](https://img.shields.io/pub/v/firebase_in_app_messaging.svg)](https://pub.dev/packages/firebase_in_app_messaging) |
7273
| [firebase_messaging](./packages/firebase_messaging/) | [![pub package](https://img.shields.io/pub/v/firebase_messaging.svg)](https://pub.dev/packages/firebase_messaging) |
7374
| [firebase_ml_vision](./packages/firebase_ml_vision/) | [![pub package](https://img.shields.io/pub/v/firebase_ml_vision.svg)](https://pub.dev/packages/firebase_ml_vision) |
7475
| [firebase_performance](./packages/firebase_performance/) | [![pub package](https://img.shields.io/pub/v/firebase_performance.svg)](https://pub.dev/packages/firebase_performance) |

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.2
2+
3+
* Added support for setting alarms which work when the phone is in doze mode.
4+
5+
## 0.4.1+8
6+
7+
* Remove dependency on google-services in the Android example.
8+
19
## 0.4.1+7
210

311
* Fix possible crash on Android devices with APIs below 19.

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

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ public void notImplemented() {
217217
private static void scheduleAlarm(
218218
Context context,
219219
int requestCode,
220+
boolean alarmClock,
221+
boolean allowWhileIdle,
220222
boolean repeating,
221223
boolean exact,
222224
boolean wakeup,
@@ -228,6 +230,8 @@ private static void scheduleAlarm(
228230
addPersistentAlarm(
229231
context,
230232
requestCode,
233+
alarmClock,
234+
allowWhileIdle,
231235
repeating,
232236
exact,
233237
wakeup,
@@ -250,17 +254,31 @@ private static void scheduleAlarm(
250254

251255
// Schedule the alarm.
252256
AlarmManager manager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
257+
258+
if (alarmClock) {
259+
AlarmManagerCompat.setAlarmClock(manager, startMillis, pendingIntent, pendingIntent);
260+
return;
261+
}
262+
253263
if (exact) {
254264
if (repeating) {
255265
manager.setRepeating(clock, startMillis, intervalMillis, pendingIntent);
256266
} else {
257-
AlarmManagerCompat.setExact(manager, clock, startMillis, pendingIntent);
267+
if (allowWhileIdle) {
268+
AlarmManagerCompat.setExactAndAllowWhileIdle(manager, clock, startMillis, pendingIntent);
269+
} else {
270+
AlarmManagerCompat.setExact(manager, clock, startMillis, pendingIntent);
271+
}
258272
}
259273
} else {
260274
if (repeating) {
261275
manager.setInexactRepeating(clock, startMillis, intervalMillis, pendingIntent);
262276
} else {
263-
manager.set(clock, startMillis, pendingIntent);
277+
if (allowWhileIdle) {
278+
AlarmManagerCompat.setAndAllowWhileIdle(manager, clock, startMillis, pendingIntent);
279+
} else {
280+
manager.set(clock, startMillis, pendingIntent);
281+
}
264282
}
265283
}
266284
}
@@ -270,6 +288,8 @@ public static void setOneShot(Context context, AndroidAlarmManagerPlugin.OneShot
270288
scheduleAlarm(
271289
context,
272290
request.requestCode,
291+
request.alarmClock,
292+
request.allowWhileIdle,
273293
repeating,
274294
request.exact,
275295
request.wakeup,
@@ -282,9 +302,13 @@ public static void setOneShot(Context context, AndroidAlarmManagerPlugin.OneShot
282302
public static void setPeriodic(
283303
Context context, AndroidAlarmManagerPlugin.PeriodicRequest request) {
284304
final boolean repeating = true;
305+
final boolean allowWhileIdle = false;
306+
final boolean alarmClock = false;
285307
scheduleAlarm(
286308
context,
287309
request.requestCode,
310+
alarmClock,
311+
allowWhileIdle,
288312
repeating,
289313
request.exact,
290314
request.wakeup,
@@ -317,13 +341,17 @@ private static String getPersistentAlarmKey(int requestCode) {
317341
private static void addPersistentAlarm(
318342
Context context,
319343
int requestCode,
344+
boolean alarmClock,
345+
boolean allowWhileIdle,
320346
boolean repeating,
321347
boolean exact,
322348
boolean wakeup,
323349
long startMillis,
324350
long intervalMillis,
325351
long callbackHandle) {
326352
HashMap<String, Object> alarmSettings = new HashMap<>();
353+
alarmSettings.put("alarmClock", alarmClock);
354+
alarmSettings.put("allowWhileIdle", allowWhileIdle);
327355
alarmSettings.put("repeating", repeating);
328356
alarmSettings.put("exact", exact);
329357
alarmSettings.put("wakeup", wakeup);
@@ -389,6 +417,8 @@ public static void reschedulePersistentAlarms(Context context) {
389417
}
390418
try {
391419
JSONObject alarm = new JSONObject(json);
420+
boolean alarmClock = alarm.getBoolean("alarmClock");
421+
boolean allowWhileIdle = alarm.getBoolean("allowWhileIdle");
392422
boolean repeating = alarm.getBoolean("repeating");
393423
boolean exact = alarm.getBoolean("exact");
394424
boolean wakeup = alarm.getBoolean("wakeup");
@@ -398,6 +428,8 @@ public static void reschedulePersistentAlarms(Context context) {
398428
scheduleAlarm(
399429
context,
400430
requestCode,
431+
alarmClock,
432+
allowWhileIdle,
401433
repeating,
402434
exact,
403435
wakeup,

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

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,17 +166,28 @@ public boolean onViewDestroy(FlutterNativeView nativeView) {
166166
static final class OneShotRequest {
167167
static OneShotRequest fromJson(JSONArray json) throws JSONException {
168168
int requestCode = json.getInt(0);
169-
boolean exact = json.getBoolean(1);
170-
boolean wakeup = json.getBoolean(2);
171-
long startMillis = json.getLong(3);
172-
boolean rescheduleOnReboot = json.getBoolean(4);
173-
long callbackHandle = json.getLong(5);
169+
boolean alarmClock = json.getBoolean(1);
170+
boolean allowWhileIdle = json.getBoolean(2);
171+
boolean exact = json.getBoolean(3);
172+
boolean wakeup = json.getBoolean(4);
173+
long startMillis = json.getLong(5);
174+
boolean rescheduleOnReboot = json.getBoolean(6);
175+
long callbackHandle = json.getLong(7);
174176

175177
return new OneShotRequest(
176-
requestCode, exact, wakeup, startMillis, rescheduleOnReboot, callbackHandle);
178+
requestCode,
179+
alarmClock,
180+
allowWhileIdle,
181+
exact,
182+
wakeup,
183+
startMillis,
184+
rescheduleOnReboot,
185+
callbackHandle);
177186
}
178187

179188
final int requestCode;
189+
final boolean alarmClock;
190+
final boolean allowWhileIdle;
180191
final boolean exact;
181192
final boolean wakeup;
182193
final long startMillis;
@@ -185,12 +196,16 @@ static OneShotRequest fromJson(JSONArray json) throws JSONException {
185196

186197
OneShotRequest(
187198
int requestCode,
199+
boolean alarmClock,
200+
boolean allowWhileIdle,
188201
boolean exact,
189202
boolean wakeup,
190203
long startMillis,
191204
boolean rescheduleOnReboot,
192205
long callbackHandle) {
193206
this.requestCode = requestCode;
207+
this.alarmClock = alarmClock;
208+
this.allowWhileIdle = allowWhileIdle;
194209
this.exact = exact;
195210
this.wakeup = wakeup;
196211
this.startMillis = startMillis;

packages/android_alarm_manager/android_alarm_manager.iml

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)