Skip to content

Commit

Permalink
Merge branch 'main' into statefulshellroute-preload-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
chunhtai authored Nov 7, 2024
2 parents a5f6600 + 0105013 commit 1b85750
Show file tree
Hide file tree
Showing 695 changed files with 49,915 additions and 3,126 deletions.
2 changes: 1 addition & 1 deletion .ci/flutter_master.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6790525ce673734ef3a913e301a7001e2f500703
73546b3b71a73bce38dcc45012c5fd585a6ec55d
2 changes: 1 addition & 1 deletion .ci/flutter_stable.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2663184aa79047d0a33a14a3b607954f8fdd8730
603104015dd692ea3403755b55d07813d5cf8965
8 changes: 8 additions & 0 deletions .ci/scripts/plugin_tools_format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# Copyright 2013 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.
set -e

cd script/tool
dart format --set-exit-if-changed .
2 changes: 2 additions & 0 deletions .ci/targets/repo_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ tasks:
infra_step: true # Note infra steps failing prevents "always" from running.
- name: tool unit tests
script: .ci/scripts/plugin_tools_tests.sh
- name: tool format
script: .ci/scripts/plugin_tools_format.sh
- name: format
script: .ci/scripts/tool_runner.sh
# Skip Swift formatting on Linux builders.
Expand Down
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -886,3 +886,14 @@ updates:
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-minor", "version-update:semver-patch"]

- package-ecosystem: "gradle"
directory: "/third_party/packages/flutter_svg/example/android/app"
commit-message:
prefix: "[flutter_svg]"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-minor", "version-update:semver-patch"]
18 changes: 18 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@
- any-glob-to-any-file:
- packages/flutter_plugin_android_lifecycle/**/*

'p: flutter_svg':
- changed-files:
- any-glob-to-any-file:
- third_party/packages/flutter_svg/**/*
- third_party/packages/flutter_svg_test/**/*

'p: flutter_template_images':
- changed-files:
- any-glob-to-any-file:
Expand Down Expand Up @@ -138,6 +144,11 @@
- any-glob-to-any-file:
- packages/palette_generator/**/*

'p: path_parsing':
- changed-files:
- any-glob-to-any-file:
- third_party/packages/path_parsing/**/*

'p: path_provider':
- changed-files:
- any-glob-to-any-file:
Expand Down Expand Up @@ -183,6 +194,13 @@
- any-glob-to-any-file:
- packages/url_launcher/**/*

'p: vector_graphics':
- changed-files:
- any-glob-to-any-file:
- packages/vector_graphics/**/*
- packages/vector_graphics_codec/**/*
- packages/vector_graphics_compiler/**/*

'p: video_player':
- changed-files:
- any-glob-to-any-file:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
cd $GITHUB_WORKSPACE
# Checks out a copy of the repo.
- name: Check out code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
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: 6 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,18 @@ packages/shared_preferences/** @tarrinneal
packages/standard_message_codec/** @jonahwilliams
packages/two_dimensional_scrollables/** @Piinks
packages/url_launcher/** @stuartmorgan
packages/vector_graphics/** @jonahwilliams
packages/vector_graphics_codec/** @jonahwilliams
packages/vector_graphics_compiler/** @jonahwilliams
packages/video_player/** @tarrinneal
packages/web_benchmarks/** @yjbanov
packages/webview_flutter/** @bparrishMines
packages/xdg_directories/** @stuartmorgan
third_party/packages/cupertino_icons/** @MitchellGoodwin
third_party/packages/cupertino_icons/test/goldens/** @LongCatIsLooong
third_party/packages/flutter_svg/** @domesticmouse
third_party/packages/flutter_svg_test/** @domesticmouse
third_party/packages/path_parsing/** @domesticmouse

# Plugin platform implementation rules. These should stay last, since the last
# matching entry takes precedence.
Expand Down
6 changes: 6 additions & 0 deletions README.md

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ linter:
- avoid_init_to_null
- avoid_js_rounded_ints
# - avoid_multiple_declarations_per_line # seems to be a stylistic choice we don't subscribe to
- avoid_null_checks_in_equality_operators
# - avoid_positional_boolean_parameters # would have been nice to enable this but by now there's too many places that break it
- avoid_print
# - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
Expand Down Expand Up @@ -112,6 +111,7 @@ linter:
# - lines_longer_than_80_chars # not required by flutter style
- literal_only_boolean_expressions
# - matching_super_parameters # blocked on https://github.com/dart-lang/language/issues/2509
- missing_code_block_language_in_doc_comment
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_default_cases
Expand Down Expand Up @@ -219,7 +219,6 @@ linter:
- unnecessary_to_list_in_spreads
- unreachable_from_main
- unrelated_type_equality_checks
- unsafe_html
- use_build_context_synchronously
- use_colored_box
# - use_decorated_box # leads to bugs: DecoratedBox and Container are not equivalent (Container inserts extra padding)
Expand Down
9 changes: 9 additions & 0 deletions packages/animations/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ android {
namespace 'dev.flutter.packages.animations.example'
compileSdk flutter.compileSdkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = '11'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
Expand Down
2 changes: 1 addition & 1 deletion packages/animations/example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '1.9.0'
repositories {
google()
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ import 'package:integration_test/integration_test.dart';
import 'package:path_provider/path_provider.dart';
import 'package:video_player/video_player.dart';

// Skip due to video_player error.
// See https://github.com/flutter/flutter/issues/157181
bool skipFor157181 = Platform.isAndroid;

void main() {
late Directory testDir;

Expand Down Expand Up @@ -177,7 +181,7 @@ void main() {
await videoController.dispose();

expect(duration, lessThan(recordingTime));
});
}, skip: skipFor157181);

testWidgets('Pause and resume video recording', (WidgetTester tester) async {
final List<CameraDescription> cameras = await availableCameras();
Expand Down Expand Up @@ -225,7 +229,7 @@ void main() {
await videoController.dispose();

expect(duration, lessThan(recordingTime - timePaused));
}, skip: !Platform.isAndroid);
}, skip: !Platform.isAndroid || skipFor157181);

testWidgets(
'Android image streaming',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
buildscript {
// This version should intentionally be a 1.7.* version and lower than the
// version of kotlin-bom defined in packages/camera/camera_android_camerax/android/build.gradle.
// This tests that the kotlin version resolution continues to work.
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '1.9.0'
repositories {
google()
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:video_player/video_player.dart';

// Skip due to video_player error.
// See https://github.com/flutter/flutter/issues/157181
const bool skipFor157181 = true;

void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

Expand Down Expand Up @@ -210,7 +214,7 @@ void main() {
await videoController.dispose();

expect(duration, lessThan(postStopTime));
});
}, skip: skipFor157181);

testWidgets('Pause and resume video recording', (WidgetTester tester) async {
final List<CameraDescription> cameras = await availableCameras();
Expand Down Expand Up @@ -255,5 +259,5 @@ void main() {
await videoController.dispose();

expect(duration, lessThan(recordingTime - timePaused));
});
}, skip: skipFor157181);
}
6 changes: 5 additions & 1 deletion packages/camera/camera_avfoundation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.9.17+5

* Adds ability to use any supported FPS and fixes crash when using unsupported FPS.

## 0.9.17+4

* Updates Pigeon for non-nullable collection type support.
Expand All @@ -13,7 +17,7 @@

## 0.9.17+1

* Fixes a crash due to appending sample buffers when readyForMoreMediaData is NO
* Fixes a crash due to appending sample buffers when readyForMoreMediaData is NO.

## 0.9.17

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,20 @@ - (void)testSettings_ShouldBeSupportedByMethodCall {
XCTAssertNotNil(resultValue);
}

- (void)testSettings_ShouldSelectFormatWhichSupports60FPS {
FCPPlatformMediaSettings *settings =
[FCPPlatformMediaSettings makeWithResolutionPreset:gTestResolutionPreset
framesPerSecond:@(60)
videoBitrate:@(gTestVideoBitrate)
audioBitrate:@(gTestAudioBitrate)
enableAudio:gTestEnableAudio];

FLTCam *camera = FLTCreateCamWithCaptureSessionQueueAndMediaSettings(
dispatch_queue_create("test", NULL), settings, nil, nil);

AVFrameRateRange *range = camera.captureDevice.activeFormat.videoSupportedFrameRateRanges[0];
XCTAssertLessThanOrEqual(range.minFrameRate, 60);
XCTAssertGreaterThanOrEqual(range.maxFrameRate, 60);
}

@end
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,44 @@
OCMStub([audioSessionMock addInputWithNoConnections:[OCMArg any]]);
OCMStub([audioSessionMock canSetSessionPreset:[OCMArg any]]).andReturn(YES);

id frameRateRangeMock1 = OCMClassMock([AVFrameRateRange class]);
OCMStub([frameRateRangeMock1 minFrameRate]).andReturn(3);
OCMStub([frameRateRangeMock1 maxFrameRate]).andReturn(30);
id captureDeviceFormatMock1 = OCMClassMock([AVCaptureDeviceFormat class]);
OCMStub([captureDeviceFormatMock1 videoSupportedFrameRateRanges]).andReturn(@[
frameRateRangeMock1
]);

id frameRateRangeMock2 = OCMClassMock([AVFrameRateRange class]);
OCMStub([frameRateRangeMock2 minFrameRate]).andReturn(3);
OCMStub([frameRateRangeMock2 maxFrameRate]).andReturn(60);
id captureDeviceFormatMock2 = OCMClassMock([AVCaptureDeviceFormat class]);
OCMStub([captureDeviceFormatMock2 videoSupportedFrameRateRanges]).andReturn(@[
frameRateRangeMock2
]);

id captureDeviceMock = OCMClassMock([AVCaptureDevice class]);
OCMStub([captureDeviceMock lockForConfiguration:[OCMArg setTo:nil]]).andReturn(YES);
OCMStub([captureDeviceMock formats]).andReturn((@[
captureDeviceFormatMock1, captureDeviceFormatMock2
]));
__block AVCaptureDeviceFormat *format = captureDeviceFormatMock1;
OCMStub([captureDeviceMock setActiveFormat:[OCMArg any]]).andDo(^(NSInvocation *invocation) {
[invocation retainArguments];
[invocation getArgument:&format atIndex:2];
});
OCMStub([captureDeviceMock activeFormat]).andDo(^(NSInvocation *invocation) {
[invocation setReturnValue:&format];
});

id fltCam = [[FLTCam alloc] initWithMediaSettings:mediaSettings
mediaSettingsAVWrapper:mediaSettingsAVWrapper
orientation:UIDeviceOrientationPortrait
videoCaptureSession:videoSessionMock
audioCaptureSession:audioSessionMock
captureSessionQueue:captureSessionQueue
captureDeviceFactory:captureDeviceFactory ?: ^AVCaptureDevice *(void) {
return [AVCaptureDevice deviceWithUniqueID:@"camera"];
return captureDeviceMock;
}
videoDimensionsForFormat:^CMVideoDimensions(AVCaptureDeviceFormat *format) {
return CMVideoFormatDescriptionGetDimensions(format.formatDescription);
Expand Down
Loading

0 comments on commit 1b85750

Please sign in to comment.