-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[camera_android] Upgrading roboelectric from 4.5 to 4.10.3 #4018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
451505d
54534e0
b87408b
5f14861
041fc97
0afa57a
2cc831c
b7710d2
3eaf0b4
ae75de2
051eb23
4e8254a
5f4af40
57c66bb
7021ee8
8dbfb2a
cf705fd
2024f1f
442acd7
ba936a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,7 +92,6 @@ public MediaRecorder build() throws IOException, NullPointerException, IndexOutO | |
mediaRecorder.setVideoEncodingBitRate(videoProfile.getBitrate()); | ||
mediaRecorder.setVideoFrameRate(videoProfile.getFrameRate()); | ||
mediaRecorder.setVideoSize(videoProfile.getWidth(), videoProfile.getHeight()); | ||
mediaRecorder.setVideoSize(videoProfile.getWidth(), videoProfile.getHeight()); | ||
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. Unrelated fix: remove duplicate line |
||
} else if (camcorderProfile != null) { | ||
mediaRecorder.setOutputFormat(camcorderProfile.fileFormat); | ||
if (enableAudio) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,8 +91,9 @@ public void beforeLegacy() { | |
public void before() { | ||
mockProfileLow = mock(EncoderProfiles.class); | ||
EncoderProfiles mockProfile = mock(EncoderProfiles.class); | ||
EncoderProfiles.VideoProfile mockVideoProfile = mock(EncoderProfiles.VideoProfile.class); | ||
List<EncoderProfiles.VideoProfile> mockVideoProfilesList = List.of(mockVideoProfile); | ||
List<EncoderProfiles.VideoProfile> mockVideoProfilesList = | ||
new ArrayList<EncoderProfiles.VideoProfile>(); | ||
mockVideoProfilesList.add(null); | ||
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. The |
||
|
||
mockedStaticProfile | ||
.when(() -> CamcorderProfile.getAll("1", CamcorderProfile.QUALITY_HIGH)) | ||
|
@@ -117,8 +118,6 @@ public void before() { | |
.thenReturn(mockProfileLow); | ||
|
||
when(mockProfile.getVideoProfiles()).thenReturn(mockVideoProfilesList); | ||
when(mockVideoProfile.getHeight()).thenReturn(100); | ||
when(mockVideoProfile.getWidth()).thenReturn(100); | ||
} | ||
|
||
@After | ||
|
@@ -386,7 +385,7 @@ public void computeBestPreviewSize_shouldUseLegacyBehaviorWhenEncoderProfilesNul | |
@Config(minSdk = 31) | ||
@Test | ||
public void resolutionFeatureShouldUseLegacyBehaviorWhenEncoderProfilesNull() { | ||
beforeLegacy(); | ||
before(); | ||
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. This tests non-legacy code so this was incorrect I think. |
||
try (MockedStatic<ResolutionFeature> mockedResolutionFeature = | ||
mockStatic(ResolutionFeature.class)) { | ||
mockedResolutionFeature | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumped to fix OOM errors.