Skip to content

Commit bb4c359

Browse files
author
Emmanuel Garcia
committed
Merge branch 'master' into update_nnbd
2 parents 8b8edd0 + 8ec679c commit bb4c359

218 files changed

Lines changed: 6973 additions & 1379 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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ task:
163163
- name: build-ipas+drive-examples
164164
env:
165165
PATH: $PATH:/usr/local/bin
166+
PLUGINS_TO_SKIP_XCTESTS: "battery/battery,camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,image_picker/image_picker,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter"
166167
matrix:
167168
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
168169
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
@@ -179,6 +180,7 @@ task:
179180
- flutter channel $CHANNEL
180181
- ./script/incremental_build.sh build-examples --ipa --enable-experiment=non-nullable
181182
- ./script/incremental_build.sh drive-examples --enable-experiment=non-nullable
183+
- ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS --enable-experiment=non-nullable
182184
task:
183185
# don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
184186
only_if: $CIRRUS_TAG == ''

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ gradle-wrapper.jar
3737
generated_plugin_registrant.dart
3838
GeneratedPluginRegistrant.h
3939
GeneratedPluginRegistrant.m
40+
generated_plugin_registrant.cc
4041
GeneratedPluginRegistrant.java
4142
GeneratedPluginRegistrant.swift
4243
build/

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+16
2+
3+
* Remove unnecessary workaround from test.
4+
15
## 0.4.5+15
26

37
* Update android compileSdkVersion to 29.

packages/android_alarm_manager/example/lib/main.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,7 @@ class _AlarmHomePageState extends State<_AlarmHomePage> {
104104

105105
@override
106106
Widget build(BuildContext context) {
107-
// TODO(jackson): This has been deprecated and should be replaced
108-
// with `headline4` when it's available on all the versions of
109-
// Flutter that we test.
110-
// ignore: deprecated_member_use
111-
final textStyle = Theme.of(context).textTheme.display1;
107+
final textStyle = Theme.of(context).textTheme.headline4;
112108
return Scaffold(
113109
appBar: AppBar(
114110
title: Text(widget.title),

packages/android_alarm_manager/example/test_driver/integration_test.dart

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,14 @@ import 'dart:convert';
77
import 'dart:io';
88

99
import 'package:flutter_driver/flutter_driver.dart';
10-
import 'package:vm_service_client/vm_service_client.dart';
11-
12-
Future<StreamSubscription<VMIsolateRef>> resumeIsolatesOnPause(
13-
FlutterDriver driver) async {
14-
final VM vm = await driver.serviceClient.getVM();
15-
for (VMIsolateRef isolateRef in vm.isolates) {
16-
final VMIsolate isolate = await isolateRef.load();
17-
if (isolate.isPaused) {
18-
await isolate.resume();
19-
}
20-
}
21-
return driver.serviceClient.onIsolateRunnable
22-
.asBroadcastStream()
23-
.listen((VMIsolateRef isolateRef) async {
24-
final VMIsolate isolate = await isolateRef.load();
25-
if (isolate.isPaused) {
26-
await isolate.resume();
27-
}
28-
});
29-
}
3010

3111
Future<void> main() async {
3212
final FlutterDriver driver = await FlutterDriver.connect();
33-
// flutter drive causes isolates to be paused on spawn. The background isolate
34-
// for this plugin will need to be resumed for the test to pass.
35-
final StreamSubscription<VMIsolateRef> subscription =
36-
await resumeIsolatesOnPause(driver);
3713
final String data = await driver.requestData(
3814
null,
3915
timeout: const Duration(minutes: 1),
4016
);
4117
await driver.close();
42-
await subscription.cancel();
4318
final Map<String, dynamic> result = jsonDecode(data);
4419
exit(result['result'] == 'true' ? 0 : 1);
4520
}

packages/android_alarm_manager/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Flutter plugin for accessing the Android AlarmManager service, and
44
# 0.4.y+z is compatible with 1.0.0, if you land a breaking change bump
55
# the version to 2.0.0.
66
# See more details: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0
7-
version: 0.4.5+15
7+
version: 0.4.5+16
88
homepage: https://github.com/flutter/plugins/tree/master/packages/android_alarm_manager
99

1010
dependencies:

packages/camera/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## 0.5.8+14
2+
3+
* Changed the order of the setters for `mediaRecorder` in `MediaRecorderBuilder.java` to make it more readable.
4+
5+
## 0.5.8+13
6+
7+
* Added Dartdocs for all public APIs.
8+
9+
## 0.5.8+12
10+
11+
* Added information of video not working correctly on Android emulators to `README.md`.
12+
113
## 0.5.8+11
214

315
* Fix rare nullptr exception on Android.

packages/camera/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ Change the minimum Android sdk version to 21 (or higher) in your `android/app/bu
4141
minSdkVersion 21
4242
```
4343

44+
It's important to note that the `MediaRecorder` class is not working properly on emulators, as stated in the documentation: https://developer.android.com/reference/android/media/MediaRecorder. Specifically, when recording a video with sound enabled and trying to play it back, the duration won't be correct and you will only see the first frame.
45+
4446
### Handling Lifecycle states
4547

4648
As of version [0.5.0](https://github.com/flutter/plugins/blob/master/packages/camera/CHANGELOG.md#050) of the camera plugin, lifecycle changes are no longer handled by the plugin. This means developers are now responsible to control camera resources when the lifecycle state is updated. Failure to do so might lead to unexpected behavior (for example as described in issue [#39109](https://github.com/flutter/flutter/issues/39109)). Handling lifecycle changes can be done by overriding the `didChangeAppLifecycleState` method like so:

packages/camera/analysis_options.yaml

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

packages/camera/android/src/main/java/io/flutter/plugins/camera/media/MediaRecorderBuilder.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,18 @@ public MediaRecorderBuilder setMediaOrientation(int orientation) {
4949
public MediaRecorder build() throws IOException {
5050
MediaRecorder mediaRecorder = recorderFactory.makeMediaRecorder();
5151

52-
// There's a specific order that mediaRecorder expects. Do not change the order
53-
// of these function calls.
52+
// There's a fixed order that mediaRecorder expects. Only change these functions accordingly.
53+
// You can find the specifics here: https://developer.android.com/reference/android/media/MediaRecorder.
54+
if (enableAudio) mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
55+
mediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE);
56+
mediaRecorder.setOutputFormat(recordingProfile.fileFormat);
5457
if (enableAudio) {
55-
mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
58+
mediaRecorder.setAudioEncoder(recordingProfile.audioCodec);
5659
mediaRecorder.setAudioEncodingBitRate(recordingProfile.audioBitRate);
60+
mediaRecorder.setAudioSamplingRate(recordingProfile.audioSampleRate);
5761
}
58-
mediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE);
59-
mediaRecorder.setOutputFormat(recordingProfile.fileFormat);
60-
if (enableAudio) mediaRecorder.setAudioEncoder(recordingProfile.audioCodec);
6162
mediaRecorder.setVideoEncoder(recordingProfile.videoCodec);
6263
mediaRecorder.setVideoEncodingBitRate(recordingProfile.videoBitRate);
63-
if (enableAudio) mediaRecorder.setAudioSamplingRate(recordingProfile.audioSampleRate);
6464
mediaRecorder.setVideoFrameRate(recordingProfile.videoFrameRate);
6565
mediaRecorder.setVideoSize(recordingProfile.videoFrameWidth, recordingProfile.videoFrameHeight);
6666
mediaRecorder.setOutputFile(outputFilePath);

0 commit comments

Comments
 (0)