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] Fix Java lints in camerax version #3966

Merged
merged 3 commits into from
May 17, 2023

Conversation

stuartmorgan
Copy link
Contributor

Removes list-baseline.xml and fixes all violations. Includes a few minor opporunistic fixes of warnings surfaced in Android Studio but not by the linter.

Part of flutter/flutter#88011

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.

Removes list-baseline.xml and fixes all violations. Includes a few minor
opporunistic fixes of warnings surfaced in Android Studio but not by the
linter.

Part of flutter/flutter#88011
@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.

Copy link
Contributor

@camsim99 camsim99 left a comment

Choose a reason for hiding this comment

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

Annotations look right to me -- thanks!

@@ -236,6 +237,8 @@ static void handleOrientationChange(
*
* @return The current user interface orientation.
*/
// Configuration.ORIENTATION_SQUARE is deprecated.
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this no longer is supported or used, could you go ahead and delete that case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem is that then we get a lint about missing coverage in the switch, and if I suppress that instead of deprecation then we won't get notified via lints if new orientation values are added in the future.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh gotcha!

@stuartmorgan stuartmorgan added the autosubmit Merge PR when tree becomes green via auto submit App label May 17, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented May 17, 2023

auto label is removed for flutter/packages, pr: 3966, due to - The status or check suite Mac_arm64 ios_platform_tests_shard_4 master has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label May 17, 2023
@stuartmorgan stuartmorgan added autosubmit Merge PR when tree becomes green via auto submit App and removed needs tests labels May 17, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label May 17, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented May 17, 2023

auto label is removed for flutter/packages, pr: 3966, due to - The status or check suite Mac_arm64 ios_platform_tests_shard_4 master has failed. Please fix the issues identified (or deflake) before re-applying this label.

@stuartmorgan stuartmorgan added the autosubmit Merge PR when tree becomes green via auto submit App label May 17, 2023
@auto-submit auto-submit bot merged commit b5ba619 into flutter:main May 17, 2023
@stuartmorgan stuartmorgan deleted the lint-android-camerax branch May 17, 2023 17:48
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 18, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request May 18, 2023
flutter/packages@5c69914...b31a128

2023-05-18 stuartmorgan@google.com [flutter_plugin_android_lifecycle] Fix lints (flutter/packages#4030)
2023-05-18 ian@hixie.ch [rfw] Fix a typo in the API documentation (flutter/packages#4023)
2023-05-18 ditman@gmail.com [ci] Manual flutter roll (flutter/packages#4033)
2023-05-17 4195507+fmt-Println-MKO@users.noreply.github.com [flutter_adaptive_scaffold] exchange BottomNavigationBar with NavigationBar (flutter/packages#3746)
2023-05-17 stuartmorgan@google.com [tools] Ignore comments in federated safety check (flutter/packages#4028)
2023-05-17 reidbaker@google.com Revert "[url_launcher] Set broadcast reciever visability as required by target api 34" (flutter/packages#4027)
2023-05-17 stuartmorgan@google.com [camera] Fix Java lints in camerax version (flutter/packages#3966)
2023-05-17 34871572+gmackall@users.noreply.github.com [image_picker] Upgrade androidx.activity to 1.7.0 and add a dependency on kotlin-bom to align kotlin transitive dependencies (flutter/packages#3968)
2023-05-17 49699333+dependabot[bot]@users.noreply.github.com [espresso]: Bump com.squareup.okhttp3:okhttp from 4.10.0 to 4.11.0 in /packages/espresso/android (flutter/packages#3804)

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 flutter-ecosystem@google.com,rmistry@google.com 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
CaseyHillers pushed a commit to CaseyHillers/flutter that referenced this pull request May 24, 2023
flutter/packages@5c69914...b31a128

2023-05-18 stuartmorgan@google.com [flutter_plugin_android_lifecycle] Fix lints (flutter/packages#4030)
2023-05-18 ian@hixie.ch [rfw] Fix a typo in the API documentation (flutter/packages#4023)
2023-05-18 ditman@gmail.com [ci] Manual flutter roll (flutter/packages#4033)
2023-05-17 4195507+fmt-Println-MKO@users.noreply.github.com [flutter_adaptive_scaffold] exchange BottomNavigationBar with NavigationBar (flutter/packages#3746)
2023-05-17 stuartmorgan@google.com [tools] Ignore comments in federated safety check (flutter/packages#4028)
2023-05-17 reidbaker@google.com Revert "[url_launcher] Set broadcast reciever visability as required by target api 34" (flutter/packages#4027)
2023-05-17 stuartmorgan@google.com [camera] Fix Java lints in camerax version (flutter/packages#3966)
2023-05-17 34871572+gmackall@users.noreply.github.com [image_picker] Upgrade androidx.activity to 1.7.0 and add a dependency on kotlin-bom to align kotlin transitive dependencies (flutter/packages#3968)
2023-05-17 49699333+dependabot[bot]@users.noreply.github.com [espresso]: Bump com.squareup.okhttp3:okhttp from 4.10.0 to 4.11.0 in /packages/espresso/android (flutter/packages#3804)

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 flutter-ecosystem@google.com,rmistry@google.com 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
nploi pushed a commit to nploi/packages that referenced this pull request Jul 16, 2023
Removes list-baseline.xml and fixes all violations. Includes a few minor opporunistic fixes of warnings surfaced in Android Studio but not by the linter.

Part of flutter/flutter#88011
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 p: camera platform-android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants