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

Commit eff92acf authored by riddle_hsu's avatar riddle_hsu Committed by Steve Kondik
Browse files

[ActivityManager] Fix activity always visible.

Sample code, symptom video and detail:
http://code.google.com/p/android/issues/detail?id=87909

If the activity state was stopping or later state,
it should not apply paused flow again.

Issue flow:
1.At home stack and screen off.
2.A task T contains one activity Z and its process was died.
3.Launch new activity X on T.
4.Before activity Z complete resume, any process
  bound and died trigger update visibility and resume top.
5.X calls finish.
6.Turn on screen, X will be always visible.

Change-Id: I8ca1845fd100e13ec58382c8c0105bf0a9f8137d
parent f77a690f
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -784,9 +784,12 @@ 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);
            Slog.wtf(TAG, "Going to pause when pause is already pending for " + mPausingActivity
                    + " state=" + mPausingActivity.state);
            if (mPausingActivity.state == ActivityState.PAUSING) {
                completePauseLocked(false);
            }
        }
        ActivityRecord prev = mResumedActivity;
        if (prev == null) {
            if (!resuming) {