Loading services/core/java/com/android/server/am/ActivityStack.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -1190,6 +1190,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai * process of going to sleep (checkReadyForSleep will be called when that process finishes). * process of going to sleep (checkReadyForSleep will be called when that process finishes). */ */ boolean goToSleepIfPossible(boolean shuttingDown) { boolean goToSleepIfPossible(boolean shuttingDown) { final ActivityRecord topActivity = topActivity(); boolean shouldSleep = true; boolean shouldSleep = true; if (mResumedActivity != null) { if (mResumedActivity != null) { Loading @@ -1214,10 +1215,10 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai // Still waiting for something to pause; can't sleep yet. // Still waiting for something to pause; can't sleep yet. if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Sleep still waiting to pause " + mPausingActivity); if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Sleep still waiting to pause " + mPausingActivity); shouldSleep = false; 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 // Our top activity is currently paused, we need to ensure we move it to the stopped // state. // state. stopActivityLocked(mLastPausedActivity); stopActivityLocked(topActivity); shouldSleep = false; shouldSleep = false; } } Loading Loading
services/core/java/com/android/server/am/ActivityStack.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -1190,6 +1190,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai * process of going to sleep (checkReadyForSleep will be called when that process finishes). * process of going to sleep (checkReadyForSleep will be called when that process finishes). */ */ boolean goToSleepIfPossible(boolean shuttingDown) { boolean goToSleepIfPossible(boolean shuttingDown) { final ActivityRecord topActivity = topActivity(); boolean shouldSleep = true; boolean shouldSleep = true; if (mResumedActivity != null) { if (mResumedActivity != null) { Loading @@ -1214,10 +1215,10 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai // Still waiting for something to pause; can't sleep yet. // Still waiting for something to pause; can't sleep yet. if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Sleep still waiting to pause " + mPausingActivity); if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Sleep still waiting to pause " + mPausingActivity); shouldSleep = false; 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 // Our top activity is currently paused, we need to ensure we move it to the stopped // state. // state. stopActivityLocked(mLastPausedActivity); stopActivityLocked(topActivity); shouldSleep = false; shouldSleep = false; } } Loading