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

Commit e4e7d6fd authored by Adrian Roos's avatar Adrian Roos Committed by Ming-Shin Lu
Browse files

IME: make WindowInsetsController.show(ime()) more robust

We need to make sure the served view is up-to-date, otherwise we might
erroneously reject or allow a request to show the IME via WindowInsetsController.

Fixes: 190217891
Bug: 200051968
Test: atest WindowInsetsControllerTests#\
        testShowIme_immediatelyAfterDetachAndReattach
Merged-In: Ib41412d5d5636bdc236aa94c4ee4702686b6d10f
Change-Id: Ib41412d5d5636bdc236aa94c4ee4702686b6d10f
(cherry picked from commit e6b4e24b)
parent a7efb5e0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2154,6 +2154,7 @@ public final class InputMethodManager {
     * @hide
     */
    public boolean requestImeShow(IBinder windowToken) {
        checkFocus();
        synchronized (mH) {
            final View servedView = getServedViewLocked();
            if (servedView == null || servedView.getWindowToken() != windowToken) {