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

Commit f243b1f4 authored by Bryce Lee's avatar Bryce Lee Committed by Android (Google) Code Review
Browse files

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

parents b98eeb25 01cffc29
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1214,6 +1214,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 (mLastPausedActivity == topActivity()) {
            // Our top activity is currently paused, we need to ensure we move it to the stopped
            // state.
            stopActivityLocked(mLastPausedActivity);
            shouldSleep = false;
        }

        if (!shuttingDown) {