Merge "[ActivityManager] Fix activity always visible."
This commit is contained in:
@@ -780,8 +780,14 @@ final class ActivityStack {
|
|||||||
final boolean startPausingLocked(boolean userLeaving, boolean uiSleeping, boolean resuming,
|
final boolean startPausingLocked(boolean userLeaving, boolean uiSleeping, boolean resuming,
|
||||||
boolean dontWait) {
|
boolean dontWait) {
|
||||||
if (mPausingActivity != null) {
|
if (mPausingActivity != null) {
|
||||||
Slog.wtf(TAG, "Going to pause when pause is already pending for " + mPausingActivity);
|
Slog.wtf(TAG, "Going to pause when pause is already pending for " + mPausingActivity
|
||||||
completePauseLocked(false);
|
+ " 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;
|
ActivityRecord prev = mResumedActivity;
|
||||||
if (prev == null) {
|
if (prev == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user