Detach stale IME leash for orientation change with gesture navigation
Once computeImeTarget is called that updates mImeLayeringTarget, the IME surface container will reparent to the new target when starting input connection (reportStartInput). When there is an orientation change, the insets source control may take time to be ready (drawn). If IME surface container is reparented before the new insets control target updates the insets leash, the IME in previous rotation will show on the app in new rotation. e.g. Top: PortraitApp (visible) > ImeContainer > Ime leash for LandscapeApp LandscapeApp (invisible) And LandscapeApp may still update visibility/position to the leash. So simply detach the leash to avoid showing inconsistent content. The new leash for PortraitApp will be created once IME is drawn. Bug: 335204769 Test: Launch chrome, click search bar to show IME. Rotate device to landscape. Swipe from landscape to portrait home. A landscape IME should not flicker on portrait home. Change-Id: Iac6edc569330b0d89c0ee03fbd1143573babe228
Loading
Please register or sign in to comment