[camera_android_camerax] Prefer higher resolution for max preset (#11956) Updates `camera_android_camerax` so `ResolutionPreset.max` can select Camera2 high-resolution JPEG still capture sizes on Android. For `ResolutionPreset.max`, `ImageCapture` now uses `ResolutionSelector.PREFER_HIGHER_RESOLUTION_OVER_CAPTURE_RATE`; preview and image analysis keep the existing selector without high-resolution mode. Fixes flutter/flutter#188310 ## Problem On some Android devices, Camera2 exposes the largest 4:3 still resolution only through `getHighResolutionOutputSizes(ImageFormat.JPEG)`. The CameraX backend used `ResolutionStrategy.HIGHEST_AVAILABLE_STRATEGY` without `ResolutionSelector.PREFER_HIGHER_RESOLUTION_OVER_CAPTURE_RATE`, so CameraX could pick the largest regular JPEG size instead. ## Observed - Camera2 regular JPEG max: 3264x2448 - Camera2 high-resolution JPEG: 4624x3468 - Flutter `takePicture()`: 2448x3264 ## After fix - CameraX `ImageCapture`: 4624x3468 - Flutter `takePicture()`: 3468x4624 ## Risk / tradeoff High-resolution still capture can be slower and use more memory. Limited to `ResolutionPreset.max` and `ImageCapture` only. ## Note Generated Pigeon files (`camerax_library.g.dart`, `CameraXLibrary.g.kt`) include formatting churn from local pigeon regeneration; functional changes are limited to `ResolutionSelector` allowed resolution mode and max-preset ImageCapture selector behavior. ## Pre-Review Checklist ## Test plan
This repo is a companion repo to the main flutter repo. It contains the source code for Flutter's first-party packages (i.e., packages developed by the core Flutter team). Check the packages directory to see all packages.
These packages are also available on pub.
Please file any issues, bugs, or feature requests in the main flutter repo. Issues pertaining to this repository are labeled “package”.
If you wish to contribute a new package to the Flutter ecosystem, please see the documentation for developing packages. You can store your package source code in any GitHub repository (the present repo is only intended for packages developed by the core Flutter team). Once your package is ready you can publish to the pub repository.
If you wish to contribute a change to any of the existing packages in this repo, please review our contribution guide, and send a pull request.
These are the packages hosted in this repository: