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

Commit c90d2b6b authored by Chong Zhang's avatar Chong Zhang Committed by Android (Google) Code Review
Browse files

Merge "Consider stack invisible if it got no running apps."

parents 51c28927 b16cf34d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1338,7 +1338,12 @@ final class ActivityStack {
            return topHomeActivity == null || !topHomeActivity.isHomeActivity();
        }

        final int belowFocusedIndex = mStacks.indexOf(focusedStack) - 1;
        // Find the first stack below focused stack that actually got something visible.
        int belowFocusedIndex = mStacks.indexOf(focusedStack) - 1;
        while (belowFocusedIndex >= 0 &&
                mStacks.get(belowFocusedIndex).topRunningActivityLocked() == null) {
            belowFocusedIndex--;
        }
        if ((focusedStackId == DOCKED_STACK_ID || focusedStackId == PINNED_STACK_ID)
                && stackIndex == belowFocusedIndex) {
            // Stacks directly behind the docked or pinned stack are always visible.