Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/camera/camera_android_camerax/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.6.9

* Corrects assumption about automatic preview correction happening on API >= 29 to API > 29,
based on the fact that the `ImageReader` Impeller backend is not used for the most part on
devices running API 29+.

## 0.6.8+3

* Removes dependency on org.jetbrains.kotlin:kotlin-bom.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,16 @@ public String getTempFilePath(@NonNull String prefix, @NonNull String suffix) {
}

/**
* Returns whether or not a {@code SurfaceTexture} backs the {@code Surface} provided to CameraX
* to build the camera preview. If it is backed by a {@code Surface}, then the transformation
* needed to correctly rotate the preview has already been applied.
* Returns whether or not Impeller uses an {@code ImageReader} backend to provide a {@code
* Surface} to CameraX to build the preview. If it is backed by an {@code ImageReader}, then
* CameraX will not automatically apply the transformation needed to correct the preview.
*
* <p>This is determined by the engine, who uses {@code SurfaceTexture}s on Android SDKs 29 and
* below.
* <p>This is determined by the engine, which approximately uses {@code SurfaceTexture}s on
* Android SDKs below 29.
*/
@Override
@NonNull
public Boolean isPreviewPreTransformed() {
return Build.VERSION.SDK_INT <= 29;
return Build.VERSION.SDK_INT < 29;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,16 @@ public void isPreviewPreTransformed_returnsTrueWhenRunningBelowSdk29() {
}

@Test
@Config(sdk = 29)
public void isPreviewPreTransformed_returnsTrueWhenRunningSdk29() {
@Config(sdk = 28)
public void isPreviewPreTransformed_returnsTrueWhenRunningSdk28() {
final SystemServicesHostApiImpl systemServicesHostApi =
new SystemServicesHostApiImpl(mockBinaryMessenger, mockInstanceManager, mockContext);
assertTrue(systemServicesHostApi.isPreviewPreTransformed());
}

@Test
@Config(sdk = 30)
public void isPreviewPreTransformed_returnsFalseWhenRunningAboveSdk29() {
@Config(sdk = 29)
public void isPreviewPreTransformed_returnsFalseWhenRunningAboveSdk28() {
final SystemServicesHostApiImpl systemServicesHostApi =
new SystemServicesHostApiImpl(mockBinaryMessenger, mockInstanceManager, mockContext);
assertFalse(systemServicesHostApi.isPreviewPreTransformed());
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_android_camerax/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera_android_camerax
description: Android implementation of the camera plugin using the CameraX library.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android_camerax
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.6.8+3
version: 0.6.9

environment:
sdk: ^3.5.0
Expand Down