From f2e0a9e3f29904bdc17f753a7b6e2f620f576079 Mon Sep 17 00:00:00 2001 From: Garfield Tan Date: Tue, 16 Oct 2018 09:42:02 -0700 Subject: [PATCH] Only skip stacks behind home when not in multi-window mode. Split screen primary stack is behind home (though visible to user), and needs to respond to user tapping when out of touch region. This doesn't cover the case where split screen stacks and freeform stacks both exist in the display, but that's not a very common case on any form factor. Bug: 117777954 Bug: 117824834 Test: IME is brought up when Gmail is in split screen primary stack. Tapping on home won't focus on home stack. atest android.autofillservice.cts.MultiWindowLoginActivityTest#testSplitWindow Change-Id: I44e17d9a0eba3ab6669ef75223c982ae0e811fc6 --- services/core/java/com/android/server/wm/DisplayContent.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 642f57814c618..d8fd198fe143c 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -2077,9 +2077,9 @@ class DisplayContent extends WindowContainer= 0; --stackNdx) { final TaskStack stack = mTaskStackContainers.getChildAt(stackNdx); - if (stack.isActivityTypeHome()) { + if (stack.isActivityTypeHome() && !stack.inMultiWindowMode()) { // We skip not only home stack, but also everything behind home because user can't - // see them. + // see them when home stack is isn't in multi-window mode. break; } final int taskId = stack.taskIdFromPoint(x, y);