Skip to content
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

[camera_android] Upgrading roboelectric from 4.5 to 4.10.3 #4018

Merged
merged 20 commits into from
Jun 15, 2023

Conversation

gmackall
Copy link
Member

@gmackall gmackall commented May 16, 2023

flutter/flutter#119752

Upgrades to allow configurations of sdk >= 31 (4.8.1 was chosen as it is the most common version used in other packages).

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

@gmackall gmackall requested a review from camsim99 as a code owner May 16, 2023 17:24
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@@ -51,6 +51,7 @@ android {
unitTests.includeAndroidResources = true
unitTests.returnDefaultValues = true
unitTests.all {
jvmArgs "-Xmx1g"
Copy link
Contributor

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.

@@ -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());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated fix: remove duplicate line

List<EncoderProfiles.VideoProfile> mockVideoProfilesList = List.of(mockVideoProfile);
List<EncoderProfiles.VideoProfile> mockVideoProfilesList =
new ArrayList<EncoderProfiles.VideoProfile>();
mockVideoProfilesList.add(null);
Copy link
Contributor

@camsim99 camsim99 Jun 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The EncoderProfiles.VideoProfile class is final static so it cannot be mocked. It's not actually tested in this test so I just set it to null so that the tests run properly.

@@ -386,7 +385,7 @@ public void computeBestPreviewSize_shouldUseLegacyBehaviorWhenEncoderProfilesNul
@Config(minSdk = 31)
@Test
public void resolutionFeatureShouldUseLegacyBehaviorWhenEncoderProfilesNull() {
beforeLegacy();
before();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tests non-legacy code so this was incorrect I think.

@camsim99 camsim99 changed the title [camera_android] Upgrading roboelectric from 4.5 to 4.8.1 [camera_android] Upgrading roboelectric from 4.5 to 4.10.3 Jun 7, 2023
@camsim99
Copy link
Contributor

camsim99 commented Jun 7, 2023

This is a test-only change except for an unrelated fix, so I added a NEXT entry. Let me know if I need to actually do a version bump.

@camsim99 camsim99 marked this pull request as ready for review June 7, 2023 19:58
Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one question. I'm fine with not releasing the duplicate line removal since while it technically changes runtime behavior, it's hard to imagine it being anything but a no-op in effect.

@@ -0,0 +1 @@
org.gradle.jvmargs=-Xmx16Gheheheheheh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the heheheheheh?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a test to see if I could change the heap size this way. It didn't impact anything and I forgot to remove it -- oops!

@stuartmorgan stuartmorgan added the override: no versioning needed Override the check requiring version bumps for most changes label Jun 7, 2023
@gmackall
Copy link
Member Author

I am not able to approve (because I am the "author", despite your changes being the majority @camsim99 ) but this LGTM!

@camsim99 camsim99 added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 15, 2023
@auto-submit auto-submit bot merged commit 94706c8 into flutter:main Jun 15, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 16, 2023
flutter/packages@f9314a3...59d93d6

2023-06-16 [email protected] [tool] Add command aliases (flutter/packages#4207)
2023-06-16 [email protected] [google_map_flutter] Fix map object regression due to async changes (flutter/packages#4171)
2023-06-16 [email protected] [url_launcher] Add ignores for deprecated member to test (flutter/packages#4220)
2023-06-15 [email protected] Roll Flutter from 95be76a to b0188cd (10 revisions) (flutter/packages#4221)
2023-06-15 [email protected] [camera_android] Upgrading roboelectric from 4.5 to 4.10.3 (flutter/packages#4018)
2023-06-15 [email protected] [go_router] Fixes bug that GoRouterState in top level redirect doesn'â�¦ (flutter/packages#4173)
2023-06-15 [email protected] [go_router]Updates documentations around GoRouter.of, GoRouter.maybeOf, and BuildContext extension. (flutter/packages#4176)
2023-06-15 [email protected] [tool] Support code excerpts for any .md file (flutter/packages#4212)
2023-06-15 [email protected] [webview_flutter] Add support for limitsNavigationsToAppBoundDomains (flutter/packages#4026)
2023-06-15 [email protected] [webview_flutter][webview_flutter_android] Add android support for handling geolocation permissions (flutter/packages#3795)
2023-06-15 [email protected] [image_picker] add getMedia method (flutter/packages#3892)
2023-06-15 [email protected] [image_picker] getMedia platform implementations (flutter/packages#4175)
2023-06-14 [email protected] Ignore `textScaleFactor` deprecation (flutter/packages#4209)
2023-06-14 [email protected] [pigeon] Enable Obj-C integration tests in CI (flutter/packages#4215)
2023-06-14 [email protected] [flutter_adaptive_scaffold] Support RTL (flutter/packages#4204)
2023-06-14 [email protected] Manual roll Flutter from 09b7e56 to 95be76a (14 revisions) (flutter/packages#4214)
2023-06-14 [email protected] Roll Flutter (stable) from 682aa38 to 796c8ef (5 revisions) (flutter/packages#4213)
2023-06-14 [email protected] Roll Flutter from 353b8bc to 09b7e56 (17 revisions) (flutter/packages#4206)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App needs tests override: no versioning needed Override the check requiring version bumps for most changes p: camera platform-android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants