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

Commit e200df02 authored by Bryce Lee's avatar Bryce Lee Committed by android-build-merger
Browse files

Merge "Make sure top activity is stopped on sleep if paused." into oc-mr1-dev am: 8c8ae38e

am: a61fc4ff

Change-Id: Ia879bc9ddf0cb11764e0669aa05be93da89d6f2e
parents bf2889f4 a61fc4ff
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1223,6 +1223,11 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
            // Still waiting for something to pause; can't sleep yet.
            if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Sleep still waiting to pause " + mPausingActivity);
            shouldSleep = false;
        } else if (topActivity() != null && topActivity().state == ActivityState.PAUSED) {
            // Our top activity is currently paused, we need to ensure we move it to the stopped
            // state.
            stopActivityLocked(mLastPausedActivity);
            shouldSleep = false;
        }

        if (!shuttingDown) {