-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[camera] Allow logical cameras to use all physical cameras via zoom on android 11+ #6150
Changes from 3 commits
de19f2c
60cc465
54ec6b4
af4fb8b
90e04fc
ecfb985
7a0cb03
b0e1ea9
85ed31a
e828549
b932713
d1826ce
96b3a3f
459f49f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ public void before() { | |
mockSensorArray = mock(Rect.class); | ||
|
||
mockedStaticCameraZoom | ||
.when(() -> ZoomUtils.computeZoom(anyFloat(), any(), anyFloat(), anyFloat())) | ||
.when(() -> ZoomUtils.computeZoomRect(anyFloat(), any(), anyFloat(), anyFloat())) | ||
.thenReturn(mockZoomArea); | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you think we can add a test here that utilizes Robolectric to make sure the proper There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So Robolectric has some major issues mocking this call
Seems it can only be mocked using our standard test runner - checking the rest of the project nothing mocks this while using mockito. I did however create a small method to help mock which version of the SDK_INT is running in our code and was able to write a few more tests using this to set our build SDK to R or Q depending on the test. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh gotcha. Okay thanks! |
||
|
Uh oh!
There was an error while loading. Please reload this page.