Merge cherrypicks of [12212499, 12213565, 12213741, 12213742, 12213743, 12213702, 12213319, 12213491, 12213118, 12213065, 12213602, 12213603] into rvc-release
Change-Id: I64fc3baa2e76b9f22537a753eb52dff8e2c9fa34
This commit is contained in:
@@ -3606,18 +3606,6 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
|
||||
== mRemoteInsetsControlTarget)) {
|
||||
return mRemoteInsetsControlTarget;
|
||||
} else {
|
||||
// Now, a special case -- if the last target's window is in the process of exiting, but
|
||||
// not removed, keep on the last target to avoid IME flicker.
|
||||
final WindowState cur = InsetsControlTarget.asWindowOrNull(mInputMethodControlTarget);
|
||||
if (cur != null && !cur.mRemoved && cur.isDisplayedLw() && cur.isClosing()
|
||||
&& !cur.isActivityTypeHome()) {
|
||||
if (DEBUG_INPUT_METHOD) {
|
||||
Slog.v(TAG_WM, "Not changing control while current window"
|
||||
+ " is closing and not removed");
|
||||
}
|
||||
return cur;
|
||||
}
|
||||
// Otherwise, we just use the ime target as received from IME.
|
||||
return mInputMethodInputTarget;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2173,9 +2173,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
||||
if (dc.mInputMethodInputTarget == this) {
|
||||
dc.setInputMethodInputTarget(null);
|
||||
}
|
||||
if (dc.mInputMethodControlTarget == this) {
|
||||
dc.updateImeControlTarget();
|
||||
}
|
||||
|
||||
final int type = mAttrs.type;
|
||||
if (WindowManagerService.excludeWindowTypeFromTapOutTask(type)) {
|
||||
|
||||
@@ -913,26 +913,6 @@ public class DisplayContentTests extends WindowTestsBase {
|
||||
assertEquals(dc.mInputMethodInputTarget, dc.computeImeControlTarget());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testComputeImeControlTarget_exitingApp() throws Exception {
|
||||
final DisplayContent dc = createNewDisplay();
|
||||
|
||||
WindowState exitingWin = createWindow(null, TYPE_BASE_APPLICATION, "exiting app");
|
||||
makeWindowVisible(exitingWin);
|
||||
exitingWin.mWinAnimator.mDrawState = WindowStateAnimator.HAS_DRAWN;
|
||||
exitingWin.mAnimatingExit = true;
|
||||
|
||||
dc.mInputMethodControlTarget = exitingWin;
|
||||
dc.mInputMethodTarget = dc.mInputMethodInputTarget =
|
||||
createWindow(null, TYPE_BASE_APPLICATION, "starting app");
|
||||
|
||||
assertEquals(exitingWin, dc.computeImeControlTarget());
|
||||
|
||||
exitingWin.removeImmediately();
|
||||
|
||||
assertEquals(dc.mInputMethodInputTarget, dc.computeImeControlTarget());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testComputeImeControlTarget_splitscreen() throws Exception {
|
||||
final DisplayContent dc = createNewDisplay();
|
||||
|
||||
Reference in New Issue
Block a user