Merge "Do not stop paused activity when sleeping." into oc-mr1-dev

am: af17d47351

Change-Id: I67a82290d737949a60a69d55aabacde51407a007
This commit is contained in:
Bryce Lee
2017-09-16 19:42:38 +00:00
committed by android-build-merger

View File

@@ -1190,7 +1190,6 @@ 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) {
@@ -1215,11 +1214,6 @@ 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(topActivity);
shouldSleep = false;
}
if (!shuttingDown) {