[CP-stable]Ensure resize listener is not added if content sizing is not turned on#182320
Conversation
flutter#182168) Make sure the resize listener is not added if content sizing is not enabled. This should ensure that the resize listener is not causing the flake. While this won't fix the flake if content sizing is enabled - this test was passing before content sizing was checked in therefore this should remove any side effect content sizing is having on the test. Fixes: flutter#179673 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing.
|
@mboetger please fill out the PR description above, afterwards the release team will review this request. |
|
This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter. Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed. |
There was a problem hiding this comment.
Code Review
The pull request addresses an issue where the resize listener was being added and removed unconditionally, even when content sizing was not enabled. The changes correctly gate the addition and removal of the flutterUiResizeListener behind the isContentSizingEnabled flag, ensuring that the listener is only active when necessary. This is a good improvement for correctness and efficiency.
reidbaker
left a comment
There was a problem hiding this comment.
TL approval Up to ewall to approve for the patch release.
87054f6
into
flutter:flutter-3.41-candidate.0
…izing is not turned on (flutter/flutter#182320)
…izing is not turned on (flutter/flutter#182320)
…izing is not turned on (flutter/flutter#182320)
This pull request is created by automatic cherry pick workflow
Issue Link:
What is the link to the issue this cherry-pick is addressing?
#179673
Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.
There is a race condition in the content sizing code that sometimes causes a platform view to not appropriately rotate (as can be seen from the flakey test goldens).
Changelog Description:
Explain this cherry pick:
Android
< Replace with changelog description here >
[flutter/179673] When content sizing is not enabled on Android, a race condition can sometimes make platform views not render correctly.
Workaround:
Is there a workaround for this issue?
No workaround.
Risk:
What is the risk level of this cherry-pick?
Test Coverage:
Are you confident that your fix is well-tested by automated tests?
Validation Steps:
What are the steps to validate that this fix works?
Run the flakey test several times to make sure it passes all the time (as can be seen from the flake being fixed here: https://flutter-dashboard.appspot.com/#/build?taskFilter=Linux_android_emu+android_engine_opengles_tests)