diff options
| author | 2016-09-22 03:54:10 +0000 | |
|---|---|---|
| committer | 2016-09-22 03:54:10 +0000 | |
| commit | 273acdcefa5854eeb655bfa83efa71fe25ce78cd (patch) | |
| tree | a0e3030fad4d97a4e66891a1d961209d417f2f04 | |
| parent | 4a8e15410900f90a450b35cd3c4f042fe559774e (diff) | |
| parent | ee05681139f2eb5a9994d7294441d694a309407f (diff) | |
Fix stopping activity when removed from waiting visible
am: ee05681139
Change-Id: Iefa95af94e488fbd33c567e268ab7fb7a1e09f51
| -rw-r--r-- | services/core/java/com/android/server/am/ActivityStackSupervisor.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java index 17670f8c5669..c6ab9186456d 100644 --- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java +++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java @@ -3139,11 +3139,14 @@ public final class ActivityStackSupervisor implements DisplayListener { final boolean nowVisible = allResumedActivitiesVisible(); for (int activityNdx = mStoppingActivities.size() - 1; activityNdx >= 0; --activityNdx) { ActivityRecord s = mStoppingActivities.get(activityNdx); + // TODO: Remove mWaitingVisibleActivities list and just remove activity from + // mStoppingActivities when something else comes up. boolean waitingVisible = mWaitingVisibleActivities.contains(s); if (DEBUG_STATES) Slog.v(TAG, "Stopping " + s + ": nowVisible=" + nowVisible + " waitingVisible=" + waitingVisible + " finishing=" + s.finishing); if (waitingVisible && nowVisible) { mWaitingVisibleActivities.remove(s); + waitingVisible = false; if (s.finishing) { // If this activity is finishing, it is sitting on top of // everyone else but we now know it is no longer needed... @@ -3152,7 +3155,6 @@ public final class ActivityStackSupervisor implements DisplayListener { // hidden by the activities in front of it. if (DEBUG_STATES) Slog.v(TAG, "Before stopping, can hide: " + s); mWindowManager.setAppVisibility(s.appToken, false); - waitingVisible = false; } } if ((!waitingVisible || mService.isSleepingOrShuttingDownLocked()) && remove) { |