Skip to content
Commit 6e139493 authored by Chavi Weingarten's avatar Chavi Weingarten
Browse files

Modify EmbeddedWindow InputTarget to work with IME

EmbeddedWindow implements InputTarget to allow IME to work for embedded
windows. However, a few methods need to be modified to allow IME to
work.

1. shouldControlIme should return true if there's a host WindowState.
   This doesn't meant the embedded window will control the IME, but
   rather the host for embedded will control the IME. This is needed
   to ensure the IME is reparented to the correct Activity and uses
   the parent WindowState to when determining inset controller.

2. getImeControlTarget should return the host WindowState's control
   target. This ensures the IME has the correct target information and
   not the fallback.

3. getActivityRecord should return the host ActivityRecord. This tells
   IME where to reparent the layer so it's a child of the
   ActivityRecord. Othewise, the IME layer is left where it was
   previously.

Test: SurfaceControlViewHostTests
Bug: 230340812
Change-Id: I8407c3ec7ed6372ed3484f25117db45944855a22
parent 13f25d78
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment