Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 25f9d52

Browse files
committed
Fix docs
1 parent 53791d0 commit 25f9d52

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,16 +177,17 @@ public void sendAppPrivateCommand(String action, Bundle data) {
177177
//
178178
// The WindowInsetsAnimation.Callback extension forwards the new state of the
179179
// IME inset from onProgress() to the framework. We also make use of the
180-
// onPrepare and onStart callbacks to detect which calls to onApplyWindowInsets
181-
// would interrupt the animation and defer it.
180+
// onStart callback to detect which calls to onApplyWindowInsets would
181+
// interrupt the animation and defer it.
182182
//
183183
// By implementing OnApplyWindowInsetsListener, we are able to capture Android's
184-
// attempts to call the FlutterView's onApplyWindowInsets. When a call to onPrepare
185-
// and subsequently onStart occurs, we can mark any non-animation calls to
186-
// onApplyWindowInsets() that occurs between prepare and start as deferred by
187-
// using this class' custom implementation to cache the WindowInsets passed in.
188-
// When onEnd indicates the end of the animation, the deferred call is dispatched
189-
// again, this time avoiding any flicker since the animation is now complete.
184+
// attempts to call the FlutterView's onApplyWindowInsets. When a call to onStart
185+
// occurs, we can mark any non-animation calls to onApplyWindowInsets() that
186+
// occurs between prepare and start as deferred by using this class' wrapper
187+
// implementation to cache the WindowInsets passed in and turn the current call into
188+
// a no-op. When onEnd indicates the end of the animation, the deferred call is
189+
// dispatched again, this time avoiding any flicker since the animation is now
190+
// complete.
190191
@VisibleForTesting
191192
@TargetApi(30)
192193
@RequiresApi(30)
@@ -259,8 +260,8 @@ public WindowInsets onProgress(
259260
// The IME insets passed in by onProgress assumes that the entire animation
260261
// occurs above any present navigation and status bars. This causes the
261262
// IME inset to be too large for the animation. To remedy this, we merge the
262-
// IME inset with other insets present via a subtract, which causes the IME
263-
// inset to be overlaid with any bars present.
263+
// IME inset with other insets present via a subtract + reLu, which causes the
264+
// IME inset to be overlaid with any bars present.
264265
Insets newImeInsets =
265266
Insets.of(
266267
0,

0 commit comments

Comments
 (0)