Merge "Fix Stay on 'SELECT INPUT METHOD' page after choosing input method" into sc-dev am: 0077be7bfa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15424959 Change-Id: I6e6da5210238d602f4b2d8a25867cd1a421d4f39
This commit is contained in:
@@ -733,16 +733,16 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
|
|||||||
// dismissing during the task switching to keep the window focus because IME window has
|
// dismissing during the task switching to keep the window focus because IME window has
|
||||||
// higher window hierarchy, we don't give it focus if the next IME layering target
|
// higher window hierarchy, we don't give it focus if the next IME layering target
|
||||||
// doesn't request IME visible.
|
// doesn't request IME visible.
|
||||||
if (w.mIsImWindow && (mImeLayeringTarget == null
|
if (w.mIsImWindow && w.isChildWindow() && (mImeLayeringTarget == null
|
||||||
|| !mImeLayeringTarget.getRequestedVisibility(ITYPE_IME))) {
|
|| !mImeLayeringTarget.getRequestedVisibility(ITYPE_IME))) {
|
||||||
if (w.mAttrs.type == TYPE_INPUT_METHOD_DIALOG) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (w.mAttrs.type == TYPE_INPUT_METHOD_DIALOG && mImeLayeringTarget != null
|
||||||
if (w.isChildWindow()) {
|
&& !mImeLayeringTarget.getRequestedVisibility(ITYPE_IME)
|
||||||
|
&& mImeLayeringTarget.isAnimating(PARENTS | TRANSITION,
|
||||||
|
ANIMATION_TYPE_APP_TRANSITION)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
final ActivityRecord activity = w.mActivityRecord;
|
final ActivityRecord activity = w.mActivityRecord;
|
||||||
|
|
||||||
|
|||||||
@@ -2223,6 +2223,9 @@ public class DisplayContentTests extends WindowTestsBase {
|
|||||||
// request IME visible.
|
// request IME visible.
|
||||||
final WindowState nextImeAppTarget =
|
final WindowState nextImeAppTarget =
|
||||||
createWindow(null, TYPE_BASE_APPLICATION, mDisplayContent, "nextImeAppTarget");
|
createWindow(null, TYPE_BASE_APPLICATION, mDisplayContent, "nextImeAppTarget");
|
||||||
|
spyOn(nextImeAppTarget);
|
||||||
|
doReturn(true).when(nextImeAppTarget).isAnimating(PARENTS | TRANSITION,
|
||||||
|
ANIMATION_TYPE_APP_TRANSITION);
|
||||||
mDisplayContent.setImeLayeringTarget(nextImeAppTarget);
|
mDisplayContent.setImeLayeringTarget(nextImeAppTarget);
|
||||||
assertNotEquals(imeMenuDialog, mDisplayContent.findFocusedWindow());
|
assertNotEquals(imeMenuDialog, mDisplayContent.findFocusedWindow());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user