Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
496ca83
Add code needed from proof of concept
camsim99 Jan 20, 2023
c9593ba
Add test files, delete unecessary method
camsim99 Jan 27, 2023
8e8779e
Merge remote-tracking branch 'upstream/main' into camx_s3
camsim99 Jan 27, 2023
6e5bc8e
Add tests, remove unecessary code
camsim99 Jan 27, 2023
268d9f5
Fix analyze
camsim99 Jan 30, 2023
2001c33
Update changelog
camsim99 Jan 30, 2023
7552ad9
Merge remote-tracking branch 'upstream/main' into camx_s3
camsim99 Jan 30, 2023
7ff2a94
Cleanup:
camsim99 Jan 30, 2023
dfc3071
Cleanup and add switch
camsim99 Jan 30, 2023
4ba07e2
Finish todo
camsim99 Jan 30, 2023
754939c
Merge remote-tracking branch 'upstream/main' into camx_s3
camsim99 Jan 31, 2023
fb44db3
Add onCameraError
camsim99 Jan 31, 2023
858815d
Fix pigeon file
camsim99 Jan 31, 2023
78edaa2
Add method for releasing flutter texture and cleanup surface logic
camsim99 Jan 31, 2023
3527322
Add test for release method
camsim99 Jan 31, 2023
335372b
Add dart test
camsim99 Jan 31, 2023
4dd9c4c
Update changelog
camsim99 Jan 31, 2023
24b1bdb
Modify flutter api names to avoid stack overflow
camsim99 Jan 31, 2023
e0efef2
Cleanup
camsim99 Jan 31, 2023
e90f45c
Fix tests
camsim99 Feb 1, 2023
73cb5f8
Delete space
camsim99 Feb 1, 2023
abf4e58
Address review 1
camsim99 Feb 1, 2023
659c2e0
Update switch
camsim99 Feb 2, 2023
5f269c7
Add annotations and constants in tests
camsim99 Feb 3, 2023
a6fe15c
Merge remote-tracking branch 'upstream/main' into camx_s3
camsim99 Feb 3, 2023
78e0d0f
Reset verification behavior
camsim99 Feb 6, 2023
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
Prev Previous commit
Next Next commit
Add test for release method
  • Loading branch information
camsim99 committed Jan 31, 2023
commit 352732213685e91c8d36e6cbe04ca18d214c8d0d
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class PreviewHostApiImpl implements PreviewHostApi {

@VisibleForTesting public CameraXProxy cameraXProxy = new CameraXProxy();

private TextureRegistry.SurfaceTextureEntry flutterSurfaceTexture;
@VisibleForTesting public TextureRegistry.SurfaceTextureEntry flutterSurfaceTexture;

public PreviewHostApiImpl(
BinaryMessenger binaryMessenger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,19 @@ public void setSurfaceProviderTest() {
verify(mockSystemServicesFlutterApi, times(4)).onCameraError(anyString(), any(Reply.class));
}

@Test
public void releaseFlutterSurfaceTextureTest() {
final PreviewHostApiImpl previewHostApi =
new PreviewHostApiImpl(mockBinaryMessenger, testInstanceManager, mockTextureRegistry);
final TextureRegistry.SurfaceTextureEntry mockSurfaceTextureEntry =
mock(TextureRegistry.SurfaceTextureEntry.class);

previewHostApi.flutterSurfaceTexture = mockSurfaceTextureEntry;

previewHostApi.releaseFlutterSurfaceTexture();
verify(mockSurfaceTextureEntry).release();
}

@Test
public void getResolutionInfo() {
final PreviewHostApiImpl previewHostApi =
Expand Down