diff options
author | Wale Ogunwale <ogunwale@google.com> | 2015-05-12 17:39:58 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-12 17:40:17 +0000 |
commit | 2a857f00110c448d702ffa4ee998dfd78688fa21 (patch) | |
tree | ae21b755c9a85bfec10f699eb79f180b4ec373f5 /services | |
parent | e6c47686f62643d3399218eef4728c22358cbcfb (diff) | |
parent | 5c42e508d1c76d99bb95edd43e1e12a282a05344 (diff) | |
download | frameworks_base-2a857f00110c448d702ffa4ee998dfd78688fa21.zip frameworks_base-2a857f00110c448d702ffa4ee998dfd78688fa21.tar.gz frameworks_base-2a857f00110c448d702ffa4ee998dfd78688fa21.tar.bz2 |
Merge "Move visibleBehind activities into stop state when sleeping/powerDown" into mnc-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/am/ActivityStack.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java index a86df2d..6574538 100644 --- a/services/core/java/com/android/server/am/ActivityStack.java +++ b/services/core/java/com/android/server/am/ActivityStack.java @@ -748,6 +748,14 @@ final class ActivityStack { return true; } + if (hasVisibleBehindActivity()) { + // Stop visible behind activity before going to sleep. + final ActivityRecord r = mActivityContainer.mActivityDisplay.mVisibleBehindActivity; + mStackSupervisor.mStoppingActivities.add(r); + if (DEBUG_STATES) Slog.v(TAG, "Sleep still waiting to stop visible behind " + r); + return true; + } + return false; } @@ -1007,7 +1015,7 @@ final class ActivityStack { // the current instance before starting the new one. if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Destroying after pause: " + prev); destroyActivityLocked(prev, true, "pause-config"); - } else if (!hasVisibleBehindActivity()) { + } else if (!hasVisibleBehindActivity() || mService.isSleepingOrShuttingDown()) { // If we were visible then resumeTopActivities will release resources before // stopping. mStackSupervisor.mStoppingActivities.add(prev); |