diff options
author | Olawale Ogunwale <ogunwale@google.com> | 2015-04-17 16:23:40 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-17 16:23:40 +0000 |
commit | 2051bded279f2d81e89b2a3731d1ba164ff9054a (patch) | |
tree | 4210fb4c6cf253391aa0600f671daf1c1a2ee8e2 /services | |
parent | 14e24b4b4495484c05f38cab1b5b3ae8443394a6 (diff) | |
parent | 53e2c6ec87e6969b5f0db2ab92a9fa133317bd29 (diff) | |
download | frameworks_base-2051bded279f2d81e89b2a3731d1ba164ff9054a.zip frameworks_base-2051bded279f2d81e89b2a3731d1ba164ff9054a.tar.gz frameworks_base-2051bded279f2d81e89b2a3731d1ba164ff9054a.tar.bz2 |
am 53e2c6ec: am c0c8d198: Merge "[ActivityManager] Fix activity always visible."
* commit '53e2c6ec87e6969b5f0db2ab92a9fa133317bd29':
[ActivityManager] Fix activity always visible.
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/am/ActivityStack.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java index ada16e7..d89fa15 100644 --- a/services/core/java/com/android/server/am/ActivityStack.java +++ b/services/core/java/com/android/server/am/ActivityStack.java @@ -780,8 +780,14 @@ final class ActivityStack { final boolean startPausingLocked(boolean userLeaving, boolean uiSleeping, boolean resuming, boolean dontWait) { if (mPausingActivity != null) { - Slog.wtf(TAG, "Going to pause when pause is already pending for " + mPausingActivity); - completePauseLocked(false); + Slog.wtf(TAG, "Going to pause when pause is already pending for " + mPausingActivity + + " state=" + mPausingActivity.state); + if (!mService.isSleeping()) { + // Avoid recursion among check for sleep and complete pause during sleeping. + // Because activity will be paused immediately after resume, just let pause + // be completed by the order of activity paused from clients. + completePauseLocked(false); + } } ActivityRecord prev = mResumedActivity; if (prev == null) { |