Skip to content

Commit 1f253a7

Browse files
committed
Recreating PR 7062 from flutter/plugins
1 parent 2e16733 commit 1f253a7

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

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.5
2+
3+
* Fixes false positive for CamcorderProfile deprecation warning
4+
that was already fixed.
5+
16
## 0.10.4
27

38
* Temporarily fixes issue with requested video profiles being null by falling back to deprecated behavior in that case.

packages/camera/camera_android/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ static Size computeBestPreviewSize(int cameraId, ResolutionPreset preset)
125125
}
126126
}
127127

128-
@SuppressWarnings("deprecation")
129-
// TODO(camsim99): Suppression is currently safe because legacy code is used as a fallback for SDK >= S.
128+
// TODO(camsim99): Suppression is currently safe because legacy code is used as a fallback for SDK < S.
130129
// This should be removed when reverting that fallback behavior: https://github.com/flutter/flutter/issues/119668.
131130
CamcorderProfile profile =
132131
getBestAvailableCamcorderProfileForResolutionPresetLegacy(cameraId, preset);
@@ -144,6 +143,8 @@ static Size computeBestPreviewSize(int cameraId, ResolutionPreset preset)
144143
* @return The best possible {@link android.media.CamcorderProfile} that matches the supplied
145144
* {@link ResolutionPreset}.
146145
*/
146+
@TargetApi(Build.VERSION_CODES.R)
147+
@SuppressWarnings("deprecation")
147148
public static CamcorderProfile getBestAvailableCamcorderProfileForResolutionPresetLegacy(
148149
int cameraId, ResolutionPreset preset) {
149150
if (cameraId < 0) {
@@ -256,7 +257,6 @@ private void configureResolution(ResolutionPreset resolutionPreset, int cameraId
256257

257258
if (!captureSizeCalculated) {
258259
recordingProfile = null;
259-
@SuppressWarnings("deprecation")
260260
CamcorderProfile camcorderProfile =
261261
getBestAvailableCamcorderProfileForResolutionPresetLegacy(cameraId, resolutionPreset);
262262
recordingProfileLegacy = camcorderProfile;

packages/camera/camera_android/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: camera_android
22
description: Android implementation of the camera plugin.
33
repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera_android
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
5-
version: 0.10.4
5+
version: 0.10.5
66

77
environment:
88
sdk: ">=2.14.0 <3.0.0"

0 commit comments

Comments
 (0)