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

Commit 56ccb89e authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Use current IME target to update IME request state if no insets target" into main

parents 34c706fb dfc5564a
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -282,7 +282,14 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider {
            // TODO(b/353463205) investigate if we should fail the statsToken, or if it's only
            //  temporary null.
            if (target != null) {
                invokeOnImeRequestedChangedListener(target.getWindow(), statsToken);
                // If insets target is not available (e.g. RemoteInsetsControlTarget), use current
                // IME input target to update IME request state. For example, switch from a task
                // with showing IME to a split-screen task without showing IME.
                InsetsTarget insetsTarget = target.getWindow();
                if (insetsTarget == null && mServerVisible) {
                    insetsTarget = mDisplayContent.getImeInputTarget();
                }
                invokeOnImeRequestedChangedListener(insetsTarget, statsToken);
            }
        }
    }