-
Notifications
You must be signed in to change notification settings - Fork 6k
[CP-stable]Move detection of cutouts in Android engine to onApplyWindowInsets
#56379
Conversation
…lutter#55992) Stop including the translation of window insets cutouts to Flutter cutout DisplayFeatures in the window info listener method, which would not necessarily receive changes in the correct order/state when they update, e.g. when the screen orientation changes. Fixes flutter/flutter#155658 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* ## 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] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [ ] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
@yaakovschectman please fill out the PR description above, afterwards the release team will review this request. |
From android triage: This PR should not land until the framework test for the original change has landed. |
@gmackall & @reidbaker does this need to go into the next release? if so can you review it? |
Per offline discussion, this should NOT be merged now, as the prerequisite framework commit has not yet landed. |
flutter-3.27-candidate.0 is no longer the beta branch. |
we still want to land this in 3.27. Pr with the test that verifies end to end behavior is waiting on review here flutter/flutter#160354 |
onApplyWindowInsets
onApplyWindowInsets
Got it, changed the title to reflect that this is for the stable branch. |
@itsjustkevin this is ready to land into the stable engine repo. |
Submissions are disabled as we are doing the monorepo merge. |
8c48577
into
flutter:flutter-3.27-candidate.0
This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.
Issue Link:
What is the link to the issue this cherry-pick is addressing?
flutter/flutter#158192
Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See best practices for examples
#55992. - Positions of display cutouts on Android may not update - as returned by
MediaQuery
and used bySafeArea
- upon screen orientation change.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 production app (the app crashes on launch)
The positions of display cutouts as reported by
MediaQuery
would not properly update on screen orientation.Workaround:
Is there a workaround for this issue?
N/A
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 code sample provided by flutter/flutter#155658 on Android and change the screen orientation.