Skip to content

[camera_android_camerax] Java style improvements #9234

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

camsim99
Copy link
Contributor

@camsim99 camsim99 commented May 9, 2025

Makes Java style improvements that roughly follow https://google.github.io/styleguide/javaguide.html.

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

@camsim99 camsim99 marked this pull request as ready for review May 15, 2025 18:00
@camsim99 camsim99 requested review from reidbaker and a team May 15, 2025 18:01
@camsim99 camsim99 added the triage-android Should be looked at in Android triage label May 27, 2025
Copy link
Contributor

@ash2moon ash2moon left a comment

Choose a reason for hiding this comment

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

Nice refactor :)

@@ -33,7 +34,7 @@ static class AnalyzerImpl implements Analyzer {
}

@Override
public void analyze(@NonNull androidx.camera.core.ImageProxy image) {
public void analyze(@NonNull ImageProxy image) {
api.getPigeonRegistrar()
.runOnMainThread(
new ProxyApiRegistrar.FlutterMethodRunnable() {
Copy link
Contributor

@ash2moon ash2moon May 30, 2025

Choose a reason for hiding this comment

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

I think this could be simplified using a lambda instead of an anonymous inner class. Maybe consider using a class level method you can just pass to further reduce nesting too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p: camera platform-android triage-android Should be looked at in Android triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants