diff options
author | Olawale Ogunwale <ogunwale@google.com> | 2015-04-17 16:36:02 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-17 16:36:02 +0000 |
commit | 5c75f0fbe34ae11058d2afbfcd5de23a3e13a2da (patch) | |
tree | cb6523cc21f01c4f54fc733c9cf1532cd7683407 /services | |
parent | f645f9420c63df9863a869f60186c86dfebaca85 (diff) | |
parent | 2051bded279f2d81e89b2a3731d1ba164ff9054a (diff) | |
download | frameworks_base-5c75f0fbe34ae11058d2afbfcd5de23a3e13a2da.zip frameworks_base-5c75f0fbe34ae11058d2afbfcd5de23a3e13a2da.tar.gz frameworks_base-5c75f0fbe34ae11058d2afbfcd5de23a3e13a2da.tar.bz2 |
am 2051bded: am 53e2c6ec: am c0c8d198: Merge "[ActivityManager] Fix activity always visible."
* commit '2051bded279f2d81e89b2a3731d1ba164ff9054a':
[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 b22e390..33f915f 100644 --- a/services/core/java/com/android/server/am/ActivityStack.java +++ b/services/core/java/com/android/server/am/ActivityStack.java @@ -808,8 +808,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) { |