Skip to content
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

Add a note in ImeSyncDeferringInsetsCallback explaining the reason behind capturing the latest final inset state #43109

Merged
merged 2 commits into from Jun 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -68,6 +68,12 @@ class ImeSyncDeferringInsetsCallback {
// When an animation begins, android sends a WindowInset with the final
// state of the animation. When needsSave is true, we know to capture this
// initial WindowInset.
//
// Certain actions, like dismissing the keyboard, can trigger multiple
// animations that are slightly offset in start time. To capture the
// correct final insets in these situations we update needsSave to true
// in each onPrepare callback, so that we save the latest final state
// to apply in onEnd.
private boolean needsSave = false;

ImeSyncDeferringInsetsCallback(@NonNull View view) {
Expand Down