You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5b1f975
Browse filesBrowse the repository at this point in the historyBrowse files
[camera]fix resolution test failure due to hardware restriction (flutter#13356)
This fixes a failure when running on iPhone 17.
The reason is:
```
case .low:
if videoCaptureSession.canSetSessionPreset(.cif352x288) { ... break }
fallthrough
default:
if videoCaptureSession.canSetSessionPreset(.low) {
videoCaptureSession.sessionPreset = .low // size is up to the device
```
On iPhone 17, `.cif352x288` is not supported, so it falls back to `.low`, which is 480p (480x640). This actually fails even before iOS 27, but we didn't catch it because it requires hardware device.
To prevent similar failures in the future, we shouldn't assume hardware capabilities (e.g. photo resolution). So I updated the test to verify photos in higher settings have relatively higher resolutions.
Note that I did not change Android - I think it was as fragile as iOS and could break in the future. However, unlike iOS, the Android tests do run on real devices in our CI, so we should be able to catch any failure if that happens, so I wouldn't be concerned about it.
*List which issues are fixed by this PR. You must list at least one issue.*
Fixesflutter/flutter#191202
## Pre-Review Checklist
- [ x I updated/added any relevant documentation (doc comments with `///`).
**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.
0 commit comments