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

Commit 6de39ee1 authored by Craig Mautner's avatar Craig Mautner Committed by Android (Google) Code Review
Browse files

Merge "Pause activities when leaving."

parents 490d0c44 eb95786f
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1302,7 +1302,12 @@ final class ActivityStack {

        // We need to start pausing the current activity so the top one
        // can be resumed...
        if (mStackSupervisor.pauseBackStacks(userLeaving)) {
        boolean pausing = mStackSupervisor.pauseBackStacks(userLeaving);
        if (mResumedActivity != null) {
            pausing = true;
            startPausingLocked(userLeaving, false);
        }
        if (pausing) {
            if (DEBUG_SWITCH) Slog.v(TAG, "Skip resume: need to start pausing");
            // At this point we want to put the upcoming activity's process
            // at the top of the LRU list, since we know we will be needing it
+9 −8
Original line number Diff line number Diff line
@@ -7341,10 +7341,11 @@ public class WindowManagerService extends IWindowManager.Stub
                    }
                    break;

                case TAP_OUTSIDE_STACK:
                case TAP_OUTSIDE_STACK: {
                    int stackId;
                    synchronized (mWindowMap) {
                        int stackId =
                                ((DisplayContent)msg.obj).stackIdFromPoint(msg.arg1, msg.arg2);
                        stackId = ((DisplayContent)msg.obj).stackIdFromPoint(msg.arg1, msg.arg2);
                    }
                    if (stackId >= 0) {
                        try {
                            mActivityManager.setFocusedStack(stackId);