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

Commit e765320b authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Skip transfer starting window from above if current activity has drawn." into udc-dev

parents b9df9a61 14b30bd4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -4550,6 +4550,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
     * immediately finishes after, so we have to transfer T to M.
     */
    void transferStartingWindowFromHiddenAboveTokenIfNeeded() {
        final WindowState mainWin = findMainWindow(false);
        if (mainWin != null && mainWin.mWinAnimator.getShown()) {
            // This activity already has a visible window, so doesn't need to transfer the starting
            // window from above activity to here. The starting window will be removed with above
            // activity.
            return;
        }
        task.forAllActivities(fromActivity -> {
            if (fromActivity == this) return true;
            return !fromActivity.isVisibleRequested() && transferStartingWindow(fromActivity);