Skip to content

Commit 68eae4a

Browse files
authored
Merge branch 'main' into file_selector-can-create-directories-param
2 parents b40b3af + 5db2635 commit 68eae4a

File tree

93 files changed

+1230
-2092
lines changed

Some content is hidden

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

93 files changed

+1230
-2092
lines changed

.ci/flutter_master.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
87d5b753196cd8eaec15bf4080f4dffbe0c36617
1+
a0820964d59cd983341dffcc824676967178df70

packages/camera/camera/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## NEXT
22

33
* Updates minimum supported SDK version to Flutter 3.29/Dart 3.7.
4+
* Updates README to reflect that only Android API 24+ is supported.
45

56
## 0.11.2
67

packages/camera/camera/README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A Flutter plugin for iOS, Android and Web allowing access to the device cameras.
88

99
| | Android | iOS | Web |
1010
|----------------|---------|-----------|------------------------|
11-
| **Support** | SDK 23+ | iOS 12.0+ | [See `camera_web `][1] |
11+
| **Support** | SDK 24+ | iOS 12.0+ | [See `camera_web `][1] |
1212

1313
## Features
1414

@@ -37,12 +37,6 @@ If editing `Info.plist` as text, add:
3737

3838
### Android
3939

40-
Change the minimum Android sdk version to 23 (or higher) in your `android/app/build.gradle` file.
41-
42-
```groovy
43-
minSdk = 23
44-
```
45-
4640
The endorsed [`camera_android_camerax`][2] implementation of the camera plugin built with CameraX has
4741
better support for more devices than `camera_android`, but has some limitations; please see [this list][3]
4842
for more details. If you wish to use the [`camera_android`][4] implementation of the camera plugin

packages/camera/camera_android/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.10.10+7
2+
3+
* Updates minimum supported SDK version to Flutter 3.35.
4+
* Removes code for supporting API 21-23.
5+
16
## 0.10.10+6
27

38
* Bumps com.android.tools.build:gradle to 8.12.1.

packages/camera/camera_android/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ buildFeatures {
3434
compileSdk = 36
3535

3636
defaultConfig {
37-
minSdkVersion 21
37+
minSdkVersion 24
3838
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3939
}
4040
lintOptions {

packages/camera/camera_android/android/src/main/java/io/flutter/plugins/camera/Camera.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -891,12 +891,7 @@ public void pauseVideoRecording() {
891891
}
892892

893893
try {
894-
if (SdkCapabilityChecker.supportsVideoPause()) {
895-
mediaRecorder.pause();
896-
} else {
897-
throw new Messages.FlutterError(
898-
"videoRecordingFailed", "pauseVideoRecording requires Android API +24.", null);
899-
}
894+
mediaRecorder.pause();
900895
} catch (IllegalStateException e) {
901896
throw new Messages.FlutterError("videoRecordingFailed", e.getMessage(), null);
902897
}
@@ -908,12 +903,7 @@ public void resumeVideoRecording() {
908903
}
909904

910905
try {
911-
if (SdkCapabilityChecker.supportsVideoPause()) {
912-
mediaRecorder.resume();
913-
} else {
914-
throw new Messages.FlutterError(
915-
"videoRecordingFailed", "resumeVideoRecording requires Android API +24.", null);
916-
}
906+
mediaRecorder.resume();
917907
} catch (IllegalStateException e) {
918908
throw new Messages.FlutterError("videoRecordingFailed", e.getMessage(), null);
919909
}

packages/camera/camera_android/android/src/main/java/io/flutter/plugins/camera/CameraApiImpl.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ private Long instantiateCamera(String cameraName, Messages.PlatformMediaSettings
8686
return flutterSurfaceTexture.id();
8787
}
8888

89-
// We move catching CameraAccessException out of onMethodCall because it causes a crash
90-
// on plugin registration for sdks incompatible with Camera2 (< 21). We want this plugin to
91-
// to be able to compile with <21 sdks for apps that want the camera and support earlier version.
9289
@SuppressWarnings("ConstantConditions")
9390
private <T> void handleException(Exception exception, Messages.Result<T> result) {
9491
// The code below exactly preserves the format of the native exceptions generated by pre-Pigeon

packages/camera/camera_android/android/src/main/java/io/flutter/plugins/camera/CameraProperties.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ public interface CameraProperties {
224224
* @return android.graphics.Rect Area of the image sensor which corresponds to active pixels prior
225225
* to the application of any geometric distortion correction.
226226
*/
227-
@RequiresApi(api = VERSION_CODES.M)
228227
@NonNull
229228
Rect getSensorInfoPreCorrectionActiveArraySize();
230229

packages/camera/camera_android/android/src/main/java/io/flutter/plugins/camera/CameraPropertiesImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ public Size getSensorInfoPixelArraySize() {
140140
return cameraCharacteristics.get(CameraCharacteristics.SENSOR_INFO_PIXEL_ARRAY_SIZE);
141141
}
142142

143-
@RequiresApi(api = VERSION_CODES.M)
144143
@NonNull
145144
@Override
146145
public Rect getSensorInfoPreCorrectionActiveArraySize() {

packages/camera/camera_android/android/src/main/java/io/flutter/plugins/camera/SdkCapabilityChecker.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,12 @@ public static boolean supportsEncoderProfiles() {
3434
return SDK_VERSION >= Build.VERSION_CODES.S;
3535
}
3636

37-
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.M)
38-
public static boolean supportsMarshmallowNoiseReductionModes() {
39-
// See https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
40-
return SDK_VERSION >= Build.VERSION_CODES.M;
41-
}
42-
4337
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.P)
4438
public static boolean supportsSessionConfiguration() {
4539
// See https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration
4640
return SDK_VERSION >= Build.VERSION_CODES.P;
4741
}
4842

49-
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.N)
50-
public static boolean supportsVideoPause() {
51-
// See https://developer.android.com/reference/androidx/camera/video/VideoRecordEvent.Pause
52-
return SDK_VERSION >= Build.VERSION_CODES.N;
53-
}
54-
5543
@ChecksSdkIntAtLeast(api = Build.VERSION_CODES.R)
5644
public static boolean supportsZoomRatio() {
5745
// See https://developer.android.com/reference/android/hardware/camera2/CaptureRequest#CONTROL_ZOOM_RATIO

0 commit comments

Comments
 (0)