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

Commit a0acfc25 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [2891132] into oc-mr1-release

Change-Id: I95a2a3c5dabbf0260302a14f0234ed19534adcb3
parents 207c11db f39bcddd
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1190,6 +1190,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
     * process of going to sleep (checkReadyForSleep will be called when that process finishes).
     */
    boolean goToSleepIfPossible(boolean shuttingDown) {
        final ActivityRecord topActivity = topActivity();
        boolean shouldSleep = true;

        if (mResumedActivity != null) {
@@ -1214,10 +1215,10 @@ 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) {
        } 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);
            stopActivityLocked(topActivity);
            shouldSleep = false;
        }