OSDN Git Service

Revert "Make sure top activity is stopped on sleep if paused."
authorBryce Lee <brycelee@google.com>
Mon, 11 Sep 2017 16:31:15 +0000 (16:31 +0000)
committerandroid-build-team Robot <android-build-team-robot@google.com>
Wed, 13 Sep 2017 17:25:29 +0000 (17:25 +0000)
This reverts commit 01cffc296b1c40c3fbc7533c9ef885807a8dbc6c.

Reason for revert: causing b/65498626

Bug: 65457314
Fixes: 65498626
Change-Id: I47ddfcccaf94ceadf2104973402b3cdc50876a36
(cherry picked from commit 8ec884258c509860dc35e7061e1b206384b48e2a)

services/core/java/com/android/server/am/ActivityStack.java

index 56ae57b..791b2c0 100644 (file)
@@ -1214,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 (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) {