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

Commit eb95786f authored by Craig Mautner's avatar Craig Mautner
Browse files

Pause activities when leaving.

Missed a spot where an activity that is launching another was not
being paused. Fixes bug 8640130. At least in one case.

Release mWindowMap as soon as it is no longer needed.

Change-Id: Id2c63d3d715b98741e2ebe3c9985cb1e9ca5ffbc
parent d3c93387
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);