Merge "Fix an edge case of IME surface overlapped on the overview" into udc-dev
This commit is contained in:
@@ -419,8 +419,12 @@ final class InputMonitor {
|
|||||||
if (mInputFocus != recentsAnimationInputConsumer.mWindowHandle.token) {
|
if (mInputFocus != recentsAnimationInputConsumer.mWindowHandle.token) {
|
||||||
requestFocus(recentsAnimationInputConsumer.mWindowHandle.token,
|
requestFocus(recentsAnimationInputConsumer.mWindowHandle.token,
|
||||||
recentsAnimationInputConsumer.mName);
|
recentsAnimationInputConsumer.mName);
|
||||||
|
}
|
||||||
|
if (mDisplayContent.mInputMethodWindow != null
|
||||||
|
&& mDisplayContent.mInputMethodWindow.isVisible()) {
|
||||||
// Hiding IME/IME icon when recents input consumer gain focus.
|
// Hiding IME/IME icon when recents input consumer gain focus.
|
||||||
if (!mDisplayContent.isImeAttachedToApp()) {
|
final boolean isImeAttachedToApp = mDisplayContent.isImeAttachedToApp();
|
||||||
|
if (!isImeAttachedToApp) {
|
||||||
// Hiding IME if IME window is not attached to app since it's not proper to
|
// Hiding IME if IME window is not attached to app since it's not proper to
|
||||||
// snapshot Task with IME window to animate together in this case.
|
// snapshot Task with IME window to animate together in this case.
|
||||||
final InputMethodManagerInternal inputMethodManagerInternal =
|
final InputMethodManagerInternal inputMethodManagerInternal =
|
||||||
@@ -429,6 +433,14 @@ final class InputMonitor {
|
|||||||
inputMethodManagerInternal.hideCurrentInputMethod(
|
inputMethodManagerInternal.hideCurrentInputMethod(
|
||||||
SoftInputShowHideReason.HIDE_RECENTS_ANIMATION);
|
SoftInputShowHideReason.HIDE_RECENTS_ANIMATION);
|
||||||
}
|
}
|
||||||
|
// Ensure removing the IME snapshot when the app no longer to show on the
|
||||||
|
// task snapshot (also taking the new task snaphot to update the overview).
|
||||||
|
final ActivityRecord app = mDisplayContent.getImeInputTarget() != null
|
||||||
|
? mDisplayContent.getImeInputTarget().getActivityRecord() : null;
|
||||||
|
if (app != null) {
|
||||||
|
mDisplayContent.removeImeSurfaceImmediately();
|
||||||
|
mDisplayContent.mAtmService.takeTaskSnapshot(app.getTask().mTaskId);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Disable IME icon explicitly when IME attached to the app in case
|
// Disable IME icon explicitly when IME attached to the app in case
|
||||||
// IME icon might flickering while swiping to the next app task still
|
// IME icon might flickering while swiping to the next app task still
|
||||||
|
|||||||
Reference in New Issue
Block a user