[camera_android_camerax] Updates internal API wrapper to use ProxyApis - #8618
Conversation
stuartmorgan-g
left a comment
There was a problem hiding this comment.
LGTM with a couple of minor nits. (I didn't review all the Java tests since the PR had already been reviewed.)
| public void onFailure(@NonNull Throwable t) { | ||
| ResultCompat.failure(t, callback); | ||
| } | ||
| }, |
There was a problem hiding this comment.
Optional: Is it worth making a helper factory for this void result compat shim? It looks like it's used in a fair number of places, so being able to replace this boilerplate with a new VoidResultCallback() or something along those lines might help readability.
There was a problem hiding this comment.
I guess the downside is that it would be less parallel with the ones that aren't just a trivial void callback passthrough.
There was a problem hiding this comment.
I attempted to make a subclass of FutureCallback<Void>, but got a RestrictedApi warning. I think it is expected to create the class inline as per the example: https://developer.android.com/develop/background-work/background-tasks/asynchronous/listenablefuture#getting_the_result_of_a_listenablefuture.
flutter/packages@f26b681...2fcc403 2025-04-15 10687576+bparrishMines@users.noreply.github.com [camera_android_camerax] Updates internal API wrapper to use ProxyApis (flutter/packages#8618) 2025-04-14 stuartmorgan@google.com [tool] Run a config-only build before Xcode analyze (flutter/packages#9075) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_android] Adds internal wrapper methods for native `WebViewClient`. (flutter/packages#8964) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_wkwebview] Fixes `loadFlutterAsset` exception and updates native wrapper for `SecTrust` and `SecCertificate` (flutter/packages#9016) 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 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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@f26b681...2fcc403 2025-04-15 10687576+bparrishMines@users.noreply.github.com [camera_android_camerax] Updates internal API wrapper to use ProxyApis (flutter/packages#8618) 2025-04-14 stuartmorgan@google.com [tool] Run a config-only build before Xcode analyze (flutter/packages#9075) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_android] Adds internal wrapper methods for native `WebViewClient`. (flutter/packages#8964) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_wkwebview] Fixes `loadFlutterAsset` exception and updates native wrapper for `SecTrust` and `SecCertificate` (flutter/packages#9016) 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 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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@f26b681...2fcc403 2025-04-15 10687576+bparrishMines@users.noreply.github.com [camera_android_camerax] Updates internal API wrapper to use ProxyApis (flutter/packages#8618) 2025-04-14 stuartmorgan@google.com [tool] Run a config-only build before Xcode analyze (flutter/packages#9075) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_android] Adds internal wrapper methods for native `WebViewClient`. (flutter/packages#8964) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_wkwebview] Fixes `loadFlutterAsset` exception and updates native wrapper for `SecTrust` and `SecCertificate` (flutter/packages#9016) 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 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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@f26b681...2fcc403 2025-04-15 10687576+bparrishMines@users.noreply.github.com [camera_android_camerax] Updates internal API wrapper to use ProxyApis (flutter/packages#8618) 2025-04-14 stuartmorgan@google.com [tool] Run a config-only build before Xcode analyze (flutter/packages#9075) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_android] Adds internal wrapper methods for native `WebViewClient`. (flutter/packages#8964) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_wkwebview] Fixes `loadFlutterAsset` exception and updates native wrapper for `SecTrust` and `SecCertificate` (flutter/packages#9016) 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 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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter#8618) Also Fixes flutter/flutter#164132 by passing a `TestInstanceManager` when needed.
flutter#8618) Also Fixes flutter/flutter#164132 by passing a `TestInstanceManager` when needed.
flutter#8618) Also Fixes flutter/flutter#164132 by passing a `TestInstanceManager` when needed.
flutter#8618) Also Fixes flutter/flutter#164132 by passing a `TestInstanceManager` when needed.
flutter/packages@f26b681...2fcc403 2025-04-15 10687576+bparrishMines@users.noreply.github.com [camera_android_camerax] Updates internal API wrapper to use ProxyApis (flutter/packages#8618) 2025-04-14 stuartmorgan@google.com [tool] Run a config-only build before Xcode analyze (flutter/packages#9075) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_android] Adds internal wrapper methods for native `WebViewClient`. (flutter/packages#8964) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_wkwebview] Fixes `loadFlutterAsset` exception and updates native wrapper for `SecTrust` and `SecCertificate` (flutter/packages#9016) 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 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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter#8618) Also Fixes flutter/flutter#164132 by passing a `TestInstanceManager` when needed.
flutter#8618) Also Fixes flutter/flutter#164132 by passing a `TestInstanceManager` when needed.
Deletes `GeneratedCameraxLibrary.java` which is the pre-#8618 (migration to `ProxyApis`) pigeon code that the plugin used. It appears to no longer be used. ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^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.
Also Fixes flutter/flutter#164132 by passing a
TestInstanceManagerwhen needed.Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.