Skip to content

Commit

Permalink
Recreating PR 7062 from flutter/plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
navaronbracke committed Feb 23, 2023
1 parent 2e16733 commit 1f253a7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions packages/camera/camera_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.10.5

* Fixes false positive for CamcorderProfile deprecation warning
that was already fixed.

## 0.10.4

* Temporarily fixes issue with requested video profiles being null by falling back to deprecated behavior in that case.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ static Size computeBestPreviewSize(int cameraId, ResolutionPreset preset)
}
}

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

if (!captureSizeCalculated) {
recordingProfile = null;
@SuppressWarnings("deprecation")
CamcorderProfile camcorderProfile =
getBestAvailableCamcorderProfileForResolutionPresetLegacy(cameraId, resolutionPreset);
recordingProfileLegacy = camcorderProfile;
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera_android
description: Android implementation of the camera plugin.
repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.10.4
version: 0.10.5

environment:
sdk: ">=2.14.0 <3.0.0"
Expand Down

0 comments on commit 1f253a7

Please sign in to comment.