-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[camera_android_camerax] Updates internal API wrapper to use ProxyApis #8618
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
Conversation
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.
LGTM with a couple of minor nits. (I didn't review all the Java tests since the PR had already been reviewed.)
...oid_camerax/android/src/main/java/io/flutter/plugins/camerax/CameraAndroidCameraxPlugin.java
Outdated
Show resolved
Hide resolved
public void onFailure(@NonNull Throwable t) { | ||
ResultCompat.failure(t, callback); | ||
} | ||
}, |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
..._android_camerax/android/src/main/java/io/flutter/plugins/camerax/SystemServicesManager.java
Show resolved
Hide resolved
flutter/packages@f26b681...2fcc403 2025-04-15 [email protected] [camera_android_camerax] Updates internal API wrapper to use ProxyApis (flutter/packages#8618) 2025-04-14 [email protected] [tool] Run a config-only build before Xcode analyze (flutter/packages#9075) 2025-04-14 [email protected] [webview_flutter_android] Adds internal wrapper methods for native `WebViewClient`. (flutter/packages#8964) 2025-04-14 [email protected] [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 [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://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 [email protected] [camera_android_camerax] Updates internal API wrapper to use ProxyApis (flutter/packages#8618) 2025-04-14 [email protected] [tool] Run a config-only build before Xcode analyze (flutter/packages#9075) 2025-04-14 [email protected] [webview_flutter_android] Adds internal wrapper methods for native `WebViewClient`. (flutter/packages#8964) 2025-04-14 [email protected] [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 [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://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
…r#167218) flutter/packages@f26b681...2fcc403 2025-04-15 [email protected] [camera_android_camerax] Updates internal API wrapper to use ProxyApis (flutter/packages#8618) 2025-04-14 [email protected] [tool] Run a config-only build before Xcode analyze (flutter/packages#9075) 2025-04-14 [email protected] [webview_flutter_android] Adds internal wrapper methods for native `WebViewClient`. (flutter/packages#8964) 2025-04-14 [email protected] [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 [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://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
…r#167218) flutter/packages@f26b681...2fcc403 2025-04-15 [email protected] [camera_android_camerax] Updates internal API wrapper to use ProxyApis (flutter/packages#8618) 2025-04-14 [email protected] [tool] Run a config-only build before Xcode analyze (flutter/packages#9075) 2025-04-14 [email protected] [webview_flutter_android] Adds internal wrapper methods for native `WebViewClient`. (flutter/packages#8964) 2025-04-14 [email protected] [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 [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://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.
Also Fixes flutter/flutter#164132 by passing a
TestInstanceManager
when needed.Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to 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.