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

Commit 5682f565 authored by Louis Chang's avatar Louis Chang Committed by Android (Google) Code Review
Browse files

Merge "Stop passing UserLeaving around"

parents ed6d8358 2470c90a
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -2749,8 +2749,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A

            if (ensureVisibility) {
                mDisplayContent.ensureActivitiesVisible(null /* starting */, 0 /* configChanges */,
                        false /* preserveWindows */, true /* notifyClients */,
                        mTaskSupervisor.mUserLeaving);
                        false /* preserveWindows */, true /* notifyClients */);
            }
        }

@@ -4823,7 +4822,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        handleAlreadyVisible();
    }

    void makeInvisible(boolean userLeaving) {
    void makeInvisible() {
        if (!mVisibleRequested) {
            if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Already invisible: " + this);
            return;
@@ -4864,7 +4863,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                    // If the app is capable of entering PIP, we should try pausing it now
                    // so it can PIP correctly.
                    if (deferHidingClient) {
                        task.startPausingLocked(userLeaving, false /* uiSleeping */,
                        task.startPausingLocked(false /* uiSleeping */,
                                null /* resuming */, "makeInvisible");
                        break;
                    }
+1 −0
Original line number Diff line number Diff line
@@ -1588,6 +1588,7 @@ class ActivityStarter {
            Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
            startedActivityStack = handleStartResult(r, result);
            mService.continueWindowLayout();
            mSupervisor.mUserLeaving = false;

            // Transition housekeeping
            if (!ActivityManager.isStartResultSuccessful(result)) {
+1 −1
Original line number Diff line number Diff line
@@ -1940,7 +1940,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                } else {
                    stack.setWindowingMode(windowingMode);
                    stack.mDisplayContent.ensureActivitiesVisible(null, 0, PRESERVE_WINDOWS,
                            true /* notifyClients */, mTaskSupervisor.mUserLeaving);
                            true /* notifyClients */);
                }
                return true;
            } finally {
+48 −43
Original line number Diff line number Diff line
@@ -1361,6 +1361,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
            return;
        }

        try {
            if ((flags & ActivityManager.MOVE_TASK_NO_USER_ACTION) == 0) {
                mUserLeaving = true;
            }
@@ -1407,7 +1408,11 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
                    "findTaskToMoveToFront: moved to front of stack=" + currentStack);

            handleNonResizableTaskIfNeeded(task, WINDOWING_MODE_UNDEFINED,
                mRootWindowContainer.getDefaultTaskDisplayArea(), currentStack, forceNonResizeable);
                    mRootWindowContainer.getDefaultTaskDisplayArea(), currentStack,
                    forceNonResizeable);
        } finally {
            mUserLeaving = false;
        }
    }

    private void moveHomeRootTaskToFrontIfNeeded(int flags, TaskDisplayArea taskDisplayArea,
@@ -2209,7 +2214,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
                        .notifyActivityDismissingDockedStack();
                taskDisplayArea.onSplitScreenModeDismissed(task);
                taskDisplayArea.mDisplayContent.ensureActivitiesVisible(null, 0, PRESERVE_WINDOWS,
                        true /* notifyClients */, mUserLeaving);
                        true /* notifyClients */);
            }
            return;
        }
+2 −2
Original line number Diff line number Diff line
@@ -5543,7 +5543,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp


    void ensureActivitiesVisible(ActivityRecord starting, int configChanges,
            boolean preserveWindows, boolean notifyClients, boolean userLeaving) {
            boolean preserveWindows, boolean notifyClients) {
        if (mInEnsureActivitiesVisible) {
            // Don't do recursive work.
            return;
@@ -5553,7 +5553,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        try {
            forAllRootTasks(rootTask -> {
                rootTask.ensureActivitiesVisible(starting, configChanges, preserveWindows,
                        notifyClients, userLeaving);
                        notifyClients);
            });
        } finally {
            mAtmService.mTaskSupervisor.endActivityVisibilityUpdate();
Loading