Skip to content

Commit

Permalink
Merge branch 'flutter:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
jiagengArctuition authored Dec 17, 2024
2 parents 4b9c79f + 2fc3390 commit 6014d47
Show file tree
Hide file tree
Showing 385 changed files with 9,561 additions and 2,768 deletions.
8 changes: 4 additions & 4 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,21 +292,21 @@ targets:
timeout: 30
properties:
target_file: analyze_legacy.yaml
channel: "3.22.3"
channel: "3.24.5"
env_variables: >-
{
"CHANNEL": "3.22.3"
"CHANNEL": "3.24.5"
}
- name: Linux analyze_legacy N-2
recipe: packages/packages
timeout: 30
properties:
target_file: analyze_legacy.yaml
channel: "3.19.6"
channel: "3.22.3"
env_variables: >-
{
"CHANNEL": "3.19.6"
"CHANNEL": "3.22.3"
}
- name: Linux_android custom_package_tests master
Expand Down
2 changes: 1 addition & 1 deletion .ci/flutter_master.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ab5b20c16d56c8e608773ce65c3f7c39d515d4a5
29a6c648ca4d2b813a6787644fdfe20421a2570a
2 changes: 1 addition & 1 deletion .ci/flutter_stable.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
8495dee1fd4aacbe9de707e7581203232f591b2f
2 changes: 1 addition & 1 deletion .ci/targets/repo_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ tasks:
script: .ci/scripts/tool_runner.sh
args:
- "pubspec-check"
- "--min-min-flutter-version=3.19.0"
- "--min-min-flutter-version=3.22.0"
- "--allow-dependencies=script/configs/allowed_unpinned_deps.yaml"
- "--allow-pinned-dependencies=script/configs/allowed_pinned_deps.yaml"
always: true
Expand Down
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# See Dependabot documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
Expand Down Expand Up @@ -66,7 +66,7 @@ updates:
- /packages/webview_flutter/webview_flutter_android/example/android/app
- /third_party/packages/flutter_svg/example/android/app
commit-message:
prefix: "[gradle]"
prefix: "[dependabot]"
schedule:
interval: "weekly"
labels:
Expand Down Expand Up @@ -99,7 +99,7 @@ updates:
- /packages/video_player/video_player_android/android
- /packages/webview_flutter/webview_flutter_android/android
commit-message:
prefix: "[gradle]"
prefix: "[dependabot]"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
# the change if it doesn't.
run: |
cd $HOME
git clone https://github.com/flutter/flutter.git --depth 1 -b 3.24.0 _flutter
git clone https://github.com/flutter/flutter.git --depth 1 -b 3.27.0 _flutter
echo "$HOME/_flutter/bin" >> $GITHUB_PATH
cd $GITHUB_WORKSPACE
# Checks out a copy of the repo.
Expand Down
4 changes: 4 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,7 @@ packages/local_auth/local_auth_windows/** @cbracken
packages/path_provider/path_provider_windows/** @cbracken
packages/shared_preferences/shared_preferences_windows/** @cbracken
packages/url_launcher/url_launcher_windows/** @cbracken

# - DevTools extensions
# @adsonpleal is the actual maintainer of shared_preferences_tool but is not yet a committer, so can't be listed as the owner.
packages/shared_preferences/shared_preferences_tool/** @tarrinneal
2 changes: 1 addition & 1 deletion packages/animations/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## NEXT

* Updates minimum supported SDK version to Flutter 3.19/Dart 3.3.
* Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.

## 2.0.11

Expand Down
4 changes: 2 additions & 2 deletions packages/animations/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ publish_to: none
version: 0.0.1

environment:
sdk: ^3.3.0
flutter: ">=3.19.0"
sdk: ^3.4.0
flutter: ">=3.22.0"

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

environment:
sdk: ^3.3.0
flutter: ">=3.19.0"
sdk: ^3.4.0
flutter: ">=3.22.0"

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

* Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.

## 0.11.0+2

* Updates minimum supported SDK version to Flutter 3.19/Dart 3.3.
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ android {
defaultConfig {
applicationId "io.flutter.plugins.cameraexample"
minSdkVersion flutter.minSdkVersion
targetSdkVersion 28
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection"
android:hardwareAccelerated="true"
android:exported="true"
android:launchMode="singleTop"
android:name="io.flutter.embedding.android.FlutterActivity"
android:theme="@style/LaunchTheme"
Expand Down
43 changes: 0 additions & 43 deletions packages/camera/camera/example/integration_test/camera_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,49 +53,6 @@ void main() {
actual.longestSide == expectedSize.longestSide;
}

// This tests that the capture is no bigger than the preset, since we have
// automatic code to fall back to smaller sizes when we need to. Returns
// whether the image is exactly the desired resolution.
Future<bool> testCaptureImageResolution(
CameraController controller, ResolutionPreset preset) async {
final Size expectedSize = presetExpectedSizes[preset]!;

// Take Picture
final XFile file = await controller.takePicture();

// Load picture
final File fileImage = File(file.path);
final Image image = await decodeImageFromList(fileImage.readAsBytesSync());

// Verify image dimensions are as expected
expect(image, isNotNull);
return assertExpectedDimensions(
expectedSize, Size(image.height.toDouble(), image.width.toDouble()));
}

testWidgets('Capture specific image resolutions',
(WidgetTester tester) async {
final List<CameraDescription> cameras = await availableCameras();
if (cameras.isEmpty) {
return;
}
for (final CameraDescription cameraDescription in cameras) {
bool previousPresetExactlySupported = true;
for (final MapEntry<ResolutionPreset, Size> preset
in presetExpectedSizes.entries) {
final CameraController controller =
CameraController(cameraDescription, preset.key);
await controller.initialize();
final bool presetExactlySupported =
await testCaptureImageResolution(controller, preset.key);
assert(!(!previousPresetExactlySupported && presetExactlySupported),
'The camera took higher resolution pictures at a lower resolution.');
previousPresetExactlySupported = presetExactlySupported;
await controller.dispose();
}
}
});

// This tests that the capture is no bigger than the preset, since we have
// automatic code to fall back to smaller sizes when we need to. Returns
// whether the image is exactly the desired resolution.
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: ^3.3.0
flutter: ">=3.19.0"
sdk: ^3.4.0
flutter: ">=3.22.0"

dependencies:
camera:
Expand Down
4 changes: 2 additions & 2 deletions packages/camera/camera/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+
version: 0.11.0+2

environment:
sdk: ^3.3.0
flutter: ">=3.19.0"
sdk: ^3.4.0
flutter: ">=3.22.0"

flutter:
plugin:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ android {
defaultConfig {
applicationId "io.flutter.plugins.cameraexample"
minSdkVersion flutter.minSdkVersion
targetSdkVersion 28
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection"
android:hardwareAccelerated="true"
android:exported="true"
android:launchMode="singleTop"
android:name="io.flutter.embedding.android.FlutterActivity"
android:theme="@style/LaunchTheme"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
// found in the LICENSE file.

import 'dart:io';
import 'dart:ui';

import 'package:camera_android/camera_android.dart';
import 'package:camera_example/camera_controller.dart';
import 'package:camera_platform_interface/camera_platform_interface.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
Expand Down Expand Up @@ -50,50 +48,6 @@ void main() {
actual.longestSide == expectedSize.longestSide;
}

// This tests that the capture is no bigger than the preset, since we have
// automatic code to fall back to smaller sizes when we need to. Returns
// whether the image is exactly the desired resolution.
Future<bool> testCaptureImageResolution(
CameraController controller, ResolutionPreset preset) async {
final Size expectedSize = presetExpectedSizes[preset]!;

// Take Picture
final XFile file = await controller.takePicture();

// Load picture
final File fileImage = File(file.path);
final Image image = await decodeImageFromList(fileImage.readAsBytesSync());

// Verify image dimensions are as expected
expect(image, isNotNull);
return assertExpectedDimensions(
expectedSize, Size(image.height.toDouble(), image.width.toDouble()));
}

testWidgets('Capture specific image resolutions',
(WidgetTester tester) async {
final List<CameraDescription> cameras =
await CameraPlatform.instance.availableCameras();
if (cameras.isEmpty) {
return;
}
for (final CameraDescription cameraDescription in cameras) {
bool previousPresetExactlySupported = true;
for (final MapEntry<ResolutionPreset, Size> preset
in presetExpectedSizes.entries) {
final CameraController controller = CameraController(cameraDescription,
mediaSettings: MediaSettings(resolutionPreset: preset.key));
await controller.initialize();
final bool presetExactlySupported =
await testCaptureImageResolution(controller, preset.key);
assert(!(!previousPresetExactlySupported && presetExactlySupported),
'The camera took higher resolution pictures at a lower resolution.');
previousPresetExactlySupported = presetExactlySupported;
await controller.dispose();
}
}
});

// This tests that the capture is no bigger than the preset, since we have
// automatic code to fall back to smaller sizes when we need to. Returns
// whether the image is exactly the desired resolution.
Expand Down
4 changes: 4 additions & 0 deletions packages/camera/camera_android_camerax/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.6.10+1

* Removes nonnull annotation from MeteringPointHostApiImpl#getDefaultPointSize.

## 0.6.10

* Removes logic that explicitly removes `READ_EXTERNAL_STORAGE` permission that may be implied
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ public DisplayOrientedMeteringPointFactory getDisplayOrientedMeteringPointFactor
* Returns the default point size of the {@link MeteringPoint} width and height, which is a
* normalized percentage of the sensor width/height.
*/
@NonNull
public float getDefaultPointSize() {
return MeteringPointFactory.getDefaultPointSize();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ android {
defaultConfig {
applicationId "io.flutter.plugins.cameraxexample"
minSdkVersion flutter.minSdkVersion
targetSdkVersion 30
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:exported="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
Expand Down
Loading

0 comments on commit 6014d47

Please sign in to comment.