Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8aefc71f authored by Felix Stern's avatar Felix Stern
Browse files

Passing statsToken from InputMethodManager#hideSoftInputFromWindow

In InputMethodManager#hideSoftInputFromWindow, we were creating a statsToken, but not passing it to InsetsController#hide. This was the reason for the statsToken to time out.

Bug: 353463205
Change-Id: Ib11cf1c4372a98c945d64efabbf6622e98e69cd4
Flag: android.view.inputmethod.refactor_insets_controller
Test: None, adding logs only
parent 9c9fefec
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2626,10 +2626,12 @@ public final class InputMethodManager {
                        // The view is running on a different thread than our own, so
                        // we need to reschedule our work for over there.
                        if (DEBUG) Log.v(TAG, "Hiding soft input: reschedule to view thread");
                        final var finalStatsToken = statsToken;
                        vh.post(() -> viewRootImpl.getInsetsController().hide(
                                WindowInsets.Type.ime()));
                                WindowInsets.Type.ime(), false /* fromIme */, finalStatsToken));
                    } else {
                        viewRootImpl.getInsetsController().hide(WindowInsets.Type.ime());
                        viewRootImpl.getInsetsController().hide(WindowInsets.Type.ime(),
                                false /* fromIme */, statsToken);
                    }
                }
                return true;