Skip to content

Commit 2af1488

Browse files
Merge branch 'main' into tool-android-javac-warnings
2 parents 307db2b + 0954499 commit 2af1488

File tree

118 files changed

+855
-868
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+855
-868
lines changed

.ci/flutter_master.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7175de4fe686c64e7221667cc5e47a057352fe4b
1+
f032a4d64891641c1217c831143f78b8abf3ae7a

.ci/flutter_stable.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9944297138845a94256f1cf37beb88ff9a8e811a
1+
c07f7888888435fd9df505aa2efc38d3cf65681b

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636

3737
# This workflow should be the last to run. So wait for all the other tests to succeed.
3838
- name: Wait on all tests
39-
uses: lewagon/wait-on-check-action@3a563271c3f8d1611ed7352809303617ee7e54ac
39+
uses: lewagon/wait-on-check-action@e106e5c43e8ca1edea6383a39a01c5ca495fd812
4040
with:
4141
ref: ${{ github.sha }}
4242
running-workflow-name: 'release'

.github/workflows/scorecards-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ jobs:
4949

5050
# Upload the results to GitHub's code scanning dashboard.
5151
- name: "Upload to code-scanning"
52-
uses: github/codeql-action/upload-sarif@3ebbd71c74ef574dbc558c82f70e52732c8b44fe # v1.0.26
52+
uses: github/codeql-action/upload-sarif@32dc499307d133bb5085bae78498c0ac2cf762d5 # v1.0.26
5353
with:
5454
sarif_file: results.sarif

packages/camera/camera/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.10.3+2
2+
3+
* Updates iOS minimum version in README.
4+
15
## 0.10.3+1
26

37
* Updates links for the merge of flutter/plugins into flutter/packages.

packages/camera/camera/README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
A Flutter plugin for iOS, Android and Web allowing access to the device cameras.
88

9-
| | Android | iOS | Web |
10-
|----------------|---------|----------|------------------------|
11-
| **Support** | SDK 21+ | iOS 10+* | [See `camera_web `][1] |
9+
| | Android | iOS | Web |
10+
|----------------|---------|-----------|------------------------|
11+
| **Support** | SDK 21+ | iOS 11.0+ | [See `camera_web `][1] |
1212

1313
## Features
1414

@@ -23,11 +23,6 @@ First, add `camera` as a [dependency in your pubspec.yaml file](https://flutter.
2323

2424
### iOS
2525

26-
\* The camera plugin compiles for any version of iOS, but its functionality
27-
requires iOS 10 or higher. If compiling for iOS 9, make sure to programmatically
28-
check the version of iOS running on the device before using any camera plugin features.
29-
The [device_info_plus](https://pub.dev/packages/device_info_plus) plugin, for example, can be used to check the iOS version.
30-
3126
Add two rows to the `ios/Runner/Info.plist`:
3227

3328
* one with the key `Privacy - Camera Usage Description` and a usage description.

packages/camera/camera/example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
<string>arm64</string>
2626
</array>
2727
<key>MinimumOSVersion</key>
28-
<string>9.0</string>
28+
<string>11.0</string>
2929
</dict>
3030
</plist>

packages/camera/camera/example/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '9.0'
2+
# platform :ios, '11.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

packages/camera/camera/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -212,10 +212,12 @@
212212
/* Begin PBXShellScriptBuildPhase section */
213213
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
214214
isa = PBXShellScriptBuildPhase;
215+
alwaysOutOfDate = 1;
215216
buildActionMask = 2147483647;
216217
files = (
217218
);
218219
inputPaths = (
220+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
219221
);
220222
name = "Thin Binary";
221223
outputPaths = (
@@ -226,6 +228,7 @@
226228
};
227229
9740EEB61CF901F6004384FC /* Run Script */ = {
228230
isa = PBXShellScriptBuildPhase;
231+
alwaysOutOfDate = 1;
229232
buildActionMask = 2147483647;
230233
files = (
231234
);
@@ -343,7 +346,7 @@
343346
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
344347
GCC_WARN_UNUSED_FUNCTION = YES;
345348
GCC_WARN_UNUSED_VARIABLE = YES;
346-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
349+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
347350
MTL_ENABLE_DEBUG_INFO = YES;
348351
ONLY_ACTIVE_ARCH = YES;
349352
SDKROOT = iphoneos;
@@ -393,7 +396,7 @@
393396
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
394397
GCC_WARN_UNUSED_FUNCTION = YES;
395398
GCC_WARN_UNUSED_VARIABLE = YES;
396-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
399+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
397400
MTL_ENABLE_DEBUG_INFO = NO;
398401
SDKROOT = iphoneos;
399402
TARGETED_DEVICE_FAMILY = "1,2";

packages/camera/camera/example/ios/Runner/Info.plist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,9 @@
5252
</array>
5353
<key>UIViewControllerBasedStatusBarAppearance</key>
5454
<false/>
55+
<key>CADisableMinimumFrameDurationOnPhone</key>
56+
<true/>
57+
<key>UIApplicationSupportsIndirectInputEvents</key>
58+
<true/>
5559
</dict>
5660
</plist>

packages/camera/camera/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: A Flutter plugin for controlling the camera. Supports previewing
44
Dart.
55
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera
66
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
7-
version: 0.10.3+1
7+
version: 0.10.3+2
88

99
environment:
1010
sdk: ">=2.14.0 <3.0.0"

packages/camera/camera_avfoundation/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.9.12
2+
3+
* Updates minimum Flutter version to 3.3 and iOS 11.
4+
15
## 0.9.11+1
26

37
* Updates links for the merge of flutter/plugins into flutter/packages.

packages/camera/camera_avfoundation/example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
<string>arm64</string>
2626
</array>
2727
<key>MinimumOSVersion</key>
28-
<string>9.0</string>
28+
<string>11.0</string>
2929
</dict>
3030
</plist>

packages/camera/camera_avfoundation/example/ios/Podfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '9.0'
2+
# platform :ios, '11.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@@ -31,7 +31,6 @@ target 'Runner' do
3131
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
3232

3333
target 'RunnerTests' do
34-
platform :ios, '9.0'
3534
inherit! :search_paths
3635
# Pods for testing
3736
pod 'OCMock', '~> 3.8.1'

packages/camera/camera_avfoundation/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -336,10 +336,12 @@
336336
/* Begin PBXShellScriptBuildPhase section */
337337
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
338338
isa = PBXShellScriptBuildPhase;
339+
alwaysOutOfDate = 1;
339340
buildActionMask = 2147483647;
340341
files = (
341342
);
342343
inputPaths = (
344+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
343345
);
344346
name = "Thin Binary";
345347
outputPaths = (
@@ -372,6 +374,7 @@
372374
};
373375
9740EEB61CF901F6004384FC /* Run Script */ = {
374376
isa = PBXShellScriptBuildPhase;
377+
alwaysOutOfDate = 1;
375378
buildActionMask = 2147483647;
376379
files = (
377380
);
@@ -574,7 +577,7 @@
574577
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
575578
GCC_WARN_UNUSED_FUNCTION = YES;
576579
GCC_WARN_UNUSED_VARIABLE = YES;
577-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
580+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
578581
MTL_ENABLE_DEBUG_INFO = YES;
579582
ONLY_ACTIVE_ARCH = YES;
580583
SDKROOT = iphoneos;
@@ -624,7 +627,7 @@
624627
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
625628
GCC_WARN_UNUSED_FUNCTION = YES;
626629
GCC_WARN_UNUSED_VARIABLE = YES;
627-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
630+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
628631
MTL_ENABLE_DEBUG_INFO = NO;
629632
SDKROOT = iphoneos;
630633
TARGETED_DEVICE_FAMILY = "1,2";

packages/camera/camera_avfoundation/example/ios/Runner/Info.plist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,9 @@
5252
</array>
5353
<key>UIViewControllerBasedStatusBarAppearance</key>
5454
<false/>
55+
<key>CADisableMinimumFrameDurationOnPhone</key>
56+
<true/>
57+
<key>UIApplicationSupportsIndirectInputEvents</key>
58+
<true/>
5559
</dict>
5660
</plist>

packages/camera/camera_avfoundation/ios/Classes/CameraPlugin.m

Lines changed: 32 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -104,43 +104,39 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result
104104
- (void)handleMethodCallAsync:(FlutterMethodCall *)call
105105
result:(FLTThreadSafeFlutterResult *)result {
106106
if ([@"availableCameras" isEqualToString:call.method]) {
107-
if (@available(iOS 10.0, *)) {
108-
NSMutableArray *discoveryDevices =
109-
[@[ AVCaptureDeviceTypeBuiltInWideAngleCamera, AVCaptureDeviceTypeBuiltInTelephotoCamera ]
110-
mutableCopy];
111-
if (@available(iOS 13.0, *)) {
112-
[discoveryDevices addObject:AVCaptureDeviceTypeBuiltInUltraWideCamera];
113-
}
114-
AVCaptureDeviceDiscoverySession *discoverySession = [AVCaptureDeviceDiscoverySession
115-
discoverySessionWithDeviceTypes:discoveryDevices
116-
mediaType:AVMediaTypeVideo
117-
position:AVCaptureDevicePositionUnspecified];
118-
NSArray<AVCaptureDevice *> *devices = discoverySession.devices;
119-
NSMutableArray<NSDictionary<NSString *, NSObject *> *> *reply =
120-
[[NSMutableArray alloc] initWithCapacity:devices.count];
121-
for (AVCaptureDevice *device in devices) {
122-
NSString *lensFacing;
123-
switch ([device position]) {
124-
case AVCaptureDevicePositionBack:
125-
lensFacing = @"back";
126-
break;
127-
case AVCaptureDevicePositionFront:
128-
lensFacing = @"front";
129-
break;
130-
case AVCaptureDevicePositionUnspecified:
131-
lensFacing = @"external";
132-
break;
133-
}
134-
[reply addObject:@{
135-
@"name" : [device uniqueID],
136-
@"lensFacing" : lensFacing,
137-
@"sensorOrientation" : @90,
138-
}];
107+
NSMutableArray *discoveryDevices =
108+
[@[ AVCaptureDeviceTypeBuiltInWideAngleCamera, AVCaptureDeviceTypeBuiltInTelephotoCamera ]
109+
mutableCopy];
110+
if (@available(iOS 13.0, *)) {
111+
[discoveryDevices addObject:AVCaptureDeviceTypeBuiltInUltraWideCamera];
112+
}
113+
AVCaptureDeviceDiscoverySession *discoverySession = [AVCaptureDeviceDiscoverySession
114+
discoverySessionWithDeviceTypes:discoveryDevices
115+
mediaType:AVMediaTypeVideo
116+
position:AVCaptureDevicePositionUnspecified];
117+
NSArray<AVCaptureDevice *> *devices = discoverySession.devices;
118+
NSMutableArray<NSDictionary<NSString *, NSObject *> *> *reply =
119+
[[NSMutableArray alloc] initWithCapacity:devices.count];
120+
for (AVCaptureDevice *device in devices) {
121+
NSString *lensFacing;
122+
switch ([device position]) {
123+
case AVCaptureDevicePositionBack:
124+
lensFacing = @"back";
125+
break;
126+
case AVCaptureDevicePositionFront:
127+
lensFacing = @"front";
128+
break;
129+
case AVCaptureDevicePositionUnspecified:
130+
lensFacing = @"external";
131+
break;
139132
}
140-
[result sendSuccessWithData:reply];
141-
} else {
142-
[result sendNotImplemented];
133+
[reply addObject:@{
134+
@"name" : [device uniqueID],
135+
@"lensFacing" : lensFacing,
136+
@"sensorOrientation" : @90,
137+
}];
143138
}
139+
[result sendSuccessWithData:reply];
144140
} else if ([@"create" isEqualToString:call.method]) {
145141
[self handleCreateMethodCall:call result:result];
146142
} else if ([@"startImageStream" isEqualToString:call.method]) {
@@ -188,11 +184,7 @@ - (void)handleMethodCallAsync:(FlutterMethodCall *)call
188184
[_camera start];
189185
[result sendSuccess];
190186
} else if ([@"takePicture" isEqualToString:call.method]) {
191-
if (@available(iOS 10.0, *)) {
192-
[_camera captureToFile:result];
193-
} else {
194-
[result sendNotImplemented];
195-
}
187+
[_camera captureToFile:result];
196188
} else if ([@"dispose" isEqualToString:call.method]) {
197189
[_registry unregisterTexture:cameraId];
198190
[_camera close];

packages/camera/camera_avfoundation/ios/Classes/FLTCam.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ NS_ASSUME_NONNULL_BEGIN
4747
- (void)start;
4848
- (void)stop;
4949
- (void)setDeviceOrientation:(UIDeviceOrientation)orientation;
50-
- (void)captureToFile:(FLTThreadSafeFlutterResult *)result API_AVAILABLE(ios(10));
50+
- (void)captureToFile:(FLTThreadSafeFlutterResult *)result;
5151
- (void)close;
5252
- (void)startVideoRecordingWithResult:(FLTThreadSafeFlutterResult *)result;
5353
/**

packages/camera/camera_avfoundation/ios/Classes/FLTCam.m

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,10 @@ - (instancetype)initWithCameraName:(NSString *)cameraName
167167
[_captureSession addOutputWithNoConnections:_captureVideoOutput];
168168
[_captureSession addConnection:connection];
169169

170-
if (@available(iOS 10.0, *)) {
171-
_capturePhotoOutput = [AVCapturePhotoOutput new];
172-
[_capturePhotoOutput setHighResolutionCaptureEnabled:YES];
173-
[_captureSession addOutput:_capturePhotoOutput];
174-
}
170+
_capturePhotoOutput = [AVCapturePhotoOutput new];
171+
[_capturePhotoOutput setHighResolutionCaptureEnabled:YES];
172+
[_captureSession addOutput:_capturePhotoOutput];
173+
175174
_motionManager = [[CMMotionManager alloc] init];
176175
[_motionManager startAccelerometerUpdates];
177176

@@ -229,7 +228,7 @@ - (void)updateOrientation:(UIDeviceOrientation)orientation
229228
}
230229
}
231230

232-
- (void)captureToFile:(FLTThreadSafeFlutterResult *)result API_AVAILABLE(ios(10)) {
231+
- (void)captureToFile:(FLTThreadSafeFlutterResult *)result {
233232
AVCapturePhotoSettings *settings = [AVCapturePhotoSettings photoSettings];
234233
if (_resolutionPreset == FLTResolutionPresetMax) {
235234
[settings setHighResolutionPhotoEnabled:YES];
@@ -1002,19 +1001,11 @@ - (void)setZoomLevel:(CGFloat)zoom Result:(FLTThreadSafeFlutterResult *)result {
10021001
}
10031002

10041003
- (CGFloat)getMinAvailableZoomFactor {
1005-
if (@available(iOS 11.0, *)) {
1006-
return _captureDevice.minAvailableVideoZoomFactor;
1007-
} else {
1008-
return 1.0;
1009-
}
1004+
return _captureDevice.minAvailableVideoZoomFactor;
10101005
}
10111006

10121007
- (CGFloat)getMaxAvailableZoomFactor {
1013-
if (@available(iOS 11.0, *)) {
1014-
return _captureDevice.maxAvailableVideoZoomFactor;
1015-
} else {
1016-
return _captureDevice.activeFormat.videoMaxZoomFactor;
1017-
}
1008+
return _captureDevice.maxAvailableVideoZoomFactor;
10181009
}
10191010

10201011
- (BOOL)setupWriterForPath:(NSString *)path {

packages/camera/camera_avfoundation/ios/Classes/FLTCam_Test.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
@property(readonly, nonatomic) AVCaptureVideoDataOutput *captureVideoOutput;
2626

2727
/// The output for photo capturing. Exposed setter for unit tests.
28-
@property(strong, nonatomic) AVCapturePhotoOutput *capturePhotoOutput API_AVAILABLE(ios(10));
28+
@property(strong, nonatomic) AVCapturePhotoOutput *capturePhotoOutput;
2929

3030
/// True when images from the camera are being streamed.
3131
@property(assign, nonatomic) BOOL isStreamingImages;

0 commit comments

Comments
 (0)