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

Commit c4dcd4bc authored by Jiaquan He's avatar Jiaquan He
Browse files

Ensures a not-focused on-top launcher is invisible.

This commit makes sure that an on-top launcher is visible only when it's
focused.

Bug: 30507027
Bug: 30499741
Change-Id: I135048c3f52b9ef47ab578cd2d5231b376004052
(cherry picked from commit e8f7b9c5b315baf288dc0cfaabfd634c2cbe71d2)
parent dad10333
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1635,6 +1635,16 @@ final class ActivityStack {
                }
            }
        }
        // If an on-top launcher is on the top of the home stack but the home stack is not focused,
        // then the whole stack should be invisible.
        TaskRecord topTask = topTask();
        if (mStackId != focusedStackId && topTask != null && topTask.isOnTopLauncher()) {
            // We're here mostly because the on-top launcher didn't have a chance to move itself to
            // back. We should move it to back as soon as possible to avoid other activities
            // returning to it or other visibility issues.
            moveTaskToBackLocked(topTask.taskId);
            return STACK_INVISIBLE;
        }

        if (mStackId == FULLSCREEN_WORKSPACE_STACK_ID
                && hasVisibleBehindActivity() && focusedStackId == HOME_STACK_ID