Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53e2c6ec authored by Olawale Ogunwale's avatar Olawale Ogunwale Committed by Android Git Automerger
Browse files

am c0c8d198: Merge "[ActivityManager] Fix activity always visible."

* commit 'c0c8d198':
  [ActivityManager] Fix activity always visible.
parents cb477625 c0c8d198
Loading
Loading
Loading
Loading
+8 −2
Original line number Original line Diff line number Diff line
@@ -780,9 +780,15 @@ 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
                    + " 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);
                completePauseLocked(false);
            }
            }
        }
        ActivityRecord prev = mResumedActivity;
        ActivityRecord prev = mResumedActivity;
        if (prev == null) {
        if (prev == null) {
            if (!resuming) {
            if (!resuming) {