Fix IME being shifted when the app setRequestedOrientation
Fix an edge case happens on large-screen devices that
DisplayContent#updateImeParent may not be called to update IME surface
parent from the activity to the display area when the app actvitity is
letterboxed by
1) activity handles configChange without being relaunched
by window configuration change
2) calling setRequestedOrientation to fix orientation as portrait
In this case, if the activity bounds size is not suitable to attach
IME surface, we need to recompute the IME surface parent in
WindowState#onConfigurationChanged to make IME surface can be placed on
the display area to avoid IME position being shifted by
letterboxed activity.
Fix: 249081451
Test: atest FlickerTests:OpenImeWindowToFixedPortraitAppTest
Change-Id: I7a66fd84e4094be249714c2597706ee25938adbe
7 files changed