Skip to content

Commit

Permalink
Merge branch 'main' into webview_patchedv5
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy committed Apr 19, 2023
2 parents b66e3be + c6f207c commit bb069d9
Show file tree
Hide file tree
Showing 890 changed files with 33,070 additions and 9,342 deletions.
2 changes: 1 addition & 1 deletion .ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# before running. What matters is that the base image is pinned to minimize
# unintended changes when modifying this file.
# This is the hash for the 3.0.0 image.
FROM cirrusci/flutter@sha256:794fbbce5422e79aae1dbf6e6cbfcf5fe89aff50350d7c018853b3cfdf35821a
FROM cirrusci/flutter@sha256:d99b1ba2602240a74722970b5c0cd704bbe60a7eba7557157c784f2f693c393f

RUN apt-get update -y

Expand Down
2 changes: 1 addition & 1 deletion .ci/flutter_master.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
23f5582ea654d01f9462f04158cf2c2a188708ec
42fb0b23139c480a05899090813a5f5202e5796c
2 changes: 1 addition & 1 deletion .ci/flutter_stable.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2ad6cd72c040113b47ee9055e722606a490ef0da
f72efea43c3013323d1b95cff571f3c1caa37583
3 changes: 2 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ task:
# run with --require-excerpts and no exclusions.
- ./script/tool_runner.sh readme-check --require-excerpts --exclude=script/configs/temp_exclude_excerpt.yaml
dependabot_script: $PLUGIN_TOOL_COMMAND dependabot-check
gradle_script: $PLUGIN_TOOL_COMMAND gradle-check
version_script:
# For pre-submit, pass the PR labels to the script to allow for
# check overrides.
Expand Down Expand Up @@ -324,8 +325,8 @@ task:
- name: web_benchmarks_test
env:
matrix:
CHROMIUM_BUILD: "768968" # Chromium 84.0.4147.0
CHROMIUM_BUILD: "950363" # Chromium 98.0.4758.0
CHROMIUM_BUILD: "1097615" # Chromium 111
<< : *INSTALL_CHROME_LINUX
script:
- cd packages/web_benchmarks/testing/test_app
Expand Down
7 changes: 7 additions & 0 deletions .github/autosubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright 2023 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This file will be added to flutter's internal repository.
# https://github.com/flutter/flutter/wiki/Autosubmit-bot
config_path: 'autosubmit/flutter/autosubmit_main.yml'
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
cd $GITHUB_WORKSPACE
# Checks out a copy of the repo.
- name: Check out code
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
fetch-depth: 0 # Fetch all history so the tool can get all the tags to determine version.
- name: Set up tools
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scorecards-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v2.4.0
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v2.4.0
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.0.3
uses: ossf/scorecard-action@80e868c13c90f172d68d1f4501dee99e2479f7af # v2.0.3
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -49,6 +49,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@32dc499307d133bb5085bae78498c0ac2cf762d5 # v1.0.26
uses: github/codeql-action/upload-sarif@7df0ce34898d659f95c0c4a09eaa8d4e32ee64db # v1.0.26
with:
sarif_file: results.sarif
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@ TheOneWithTheBraid <the-one@with-the-braid.cf>
Rulong Chen(陈汝龙) <rulong.crl@alibaba-inc.com>
Hwanseok Kang <tttkhs96@gmail.com>
Twin Sun, LLC <google-contrib@twinsunsolutions.com>
Amir Panahandeh <amirpanahandeh@gmail.com>
34 changes: 17 additions & 17 deletions README.md

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion customer_testing.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ REM changing this file.

CD packages/animations
CALL flutter analyze --no-fatal-infos
set USE_FLUTTER_TEST_FONT=1
CALL flutter test

REM We don't run the tests in packages/rfw because those tests are
Expand Down
2 changes: 1 addition & 1 deletion customer_testing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ flutter analyze --no-fatal-infos
if [[ "$OSTYPE" == "linux-gnu" ]]; then
# We only run the full tests on Linux because golden files differ
# from platform to platform.
USE_FLUTTER_TEST_FONT=1 flutter test
flutter test
fi
# The next script verifies that the coverage is not regressed; it does
# not verify goldens. (It does run all the tests though, so it still
Expand Down
9 changes: 5 additions & 4 deletions packages/animations/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,11 @@ android {
main.java.srcDirs += 'src/main/kotlin'
}

lintOptions {
disable 'InvalidPackage'
}

defaultConfig {
applicationId "dev.flutter.packages.animations.example"
minSdkVersion 16
targetSdkVersion 28
targetSdkVersion 32
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -52,6 +49,10 @@ android {
signingConfig signingConfigs.debug
}
}
namespace 'dev.flutter.packages.animations.example'
lint {
disable 'InvalidPackage'
}
}

flutter {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.flutter.packages.animations.example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.flutter.packages.animations.example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="example"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:exported="true"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.flutter.packages.animations.example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
4 changes: 2 additions & 2 deletions packages/animations/example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.6.0'
ext.kotlin_version = '1.6.21'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
1 change: 0 additions & 1 deletion packages/animations/example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
2 changes: 1 addition & 1 deletion packages/animations/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ publish_to: none
version: 0.0.1

environment:
sdk: ">=2.17.0 <3.0.0"
sdk: ">=2.17.0 <4.0.0"
flutter: ">=3.0.0"

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/animations/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+
version: 2.0.7

environment:
sdk: ">=2.17.0 <3.0.0"
sdk: ">=2.17.0 <4.0.0"
flutter: ">=3.0.0"

dependencies:
Expand Down
4 changes: 3 additions & 1 deletion packages/camera/camera/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## NEXT
## 0.10.4

* Allows camera to be switched while video recording.
* Updates minimum Flutter version to 3.3.
* Aligns Dart and Flutter SDK constraints.

## 0.10.3+2
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void didChangeAppLifecycleState(AppLifecycleState state) {
if (state == AppLifecycleState.inactive) {
cameraController.dispose();
} else if (state == AppLifecycleState.resumed) {
onNewCameraSelected(cameraController.description);
_initializeCameraController(cameraController.description);
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/*
* Annotation to aid repository tooling in determining if a test is
* a native java unit test or a java class with a dart integration.
*
* See: https://github.com/flutter/flutter/wiki/Plugin-Tests#enabling-android-ui-tests
* for more infomation.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface DartIntegrationTest {}
39 changes: 39 additions & 0 deletions packages/camera/camera/example/integration_test/camera_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,45 @@ void main() {
return completer.future;
}

testWidgets('Set description while recording', (WidgetTester tester) async {
final List<CameraDescription> cameras = await availableCameras();
if (cameras.length < 2) {
return;
}

final CameraController controller = CameraController(
cameras[0],
ResolutionPreset.low,
enableAudio: false,
);

await controller.initialize();
await controller.prepareForVideoRecording();

await controller.startVideoRecording();
await controller.setDescription(cameras[1]);

expect(controller.description, cameras[1]);
});

testWidgets('Set description', (WidgetTester tester) async {
final List<CameraDescription> cameras = await availableCameras();
if (cameras.length < 2) {
return;
}

final CameraController controller = CameraController(
cameras[0],
ResolutionPreset.low,
enableAudio: false,
);

await controller.initialize();
await controller.setDescription(cameras[1]);

expect(controller.description, cameras[1]);
});

testWidgets(
'iOS image streaming with imageFormatGroup',
(WidgetTester tester) async {
Expand Down
23 changes: 9 additions & 14 deletions packages/camera/camera/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
if (state == AppLifecycleState.inactive) {
cameraController.dispose();
} else if (state == AppLifecycleState.resumed) {
onNewCameraSelected(cameraController.description);
_initializeCameraController(cameraController.description);
}
}
// #enddocregion AppLifecycle
Expand Down Expand Up @@ -597,10 +597,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
title: Icon(getCameraLensIcon(cameraDescription.lensDirection)),
groupValue: controller?.description,
value: cameraDescription,
onChanged:
controller != null && controller!.value.isRecordingVideo
? null
: onChanged,
onChanged: onChanged,
),
),
);
Expand Down Expand Up @@ -633,17 +630,15 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
}

Future<void> onNewCameraSelected(CameraDescription cameraDescription) async {
final CameraController? oldController = controller;
if (oldController != null) {
// `controller` needs to be set to null before getting disposed,
// to avoid a race condition when we use the controller that is being
// disposed. This happens when camera permission dialog shows up,
// which triggers `didChangeAppLifecycleState`, which disposes and
// re-creates the controller.
controller = null;
await oldController.dispose();
if (controller != null) {
return controller!.setDescription(cameraDescription);
} else {
return _initializeCameraController(cameraDescription);
}
}

Future<void> _initializeCameraController(
CameraDescription cameraDescription) async {
final CameraController cameraController = CameraController(
cameraDescription,
kIsWeb ? ResolutionPreset.max : ResolutionPreset.medium,
Expand Down
4 changes: 2 additions & 2 deletions packages/camera/camera/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: Demonstrates how to use the camera plugin.
publish_to: none

environment:
sdk: ">=2.17.0 <3.0.0"
flutter: ">=3.0.0"
sdk: ">=2.18.0 <4.0.0"
flutter: ">=3.3.0"

dependencies:
camera:
Expand Down
Loading

0 comments on commit bb069d9

Please sign in to comment.