Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2e0a9e3 authored by Garfield Tan's avatar Garfield Tan
Browse files

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
parent 03fc4a7f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2077,9 +2077,9 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
    int taskForTapOutside(int x, int y) {
        for (int stackNdx = mTaskStackContainers.getChildCount() - 1; stackNdx >= 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);