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

Commit 9ccda2e6 authored by Andrii Kulian's avatar Andrii Kulian Committed by android-build-merger
Browse files

Fix stopping activity when removed from waiting visible am: ee056811 am: 273acdce

am: a646e8d6

Change-Id: I95c7e449d49ea87f3d3352f0bc100dfdbe66deba
parents fc8f6940 a646e8d6
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3038,11 +3038,14 @@ public final class ActivityStackSupervisor implements DisplayListener {
        final boolean nowVisible = allResumedActivitiesVisible();
        for (int activityNdx = mStoppingActivities.size() - 1; activityNdx >= 0; --activityNdx) {
            ActivityRecord s = mStoppingActivities.get(activityNdx);
            // TODO: Remove mWaitingVisibleActivities list and just remove activity from
            // mStoppingActivities when something else comes up.
            boolean waitingVisible = mWaitingVisibleActivities.contains(s);
            if (DEBUG_STATES) Slog.v(TAG, "Stopping " + s + ": nowVisible=" + nowVisible
                    + " waitingVisible=" + waitingVisible + " finishing=" + s.finishing);
            if (waitingVisible && nowVisible) {
                mWaitingVisibleActivities.remove(s);
                waitingVisible = false;
                if (s.finishing) {
                    // If this activity is finishing, it is sitting on top of
                    // everyone else but we now know it is no longer needed...
@@ -3051,7 +3054,6 @@ public final class ActivityStackSupervisor implements DisplayListener {
                    // hidden by the activities in front of it.
                    if (DEBUG_STATES) Slog.v(TAG, "Before stopping, can hide: " + s);
                    mWindowManager.setAppVisibility(s.appToken, false);
                    waitingVisible = false;
                }
            }
            if ((!waitingVisible || mService.isSleepingOrShuttingDownLocked()) && remove) {