Merge "Fix stopping activity when removed from waiting visible" into nyc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3904e1bc34
@@ -3139,11 +3139,14 @@ public final class ActivityStackSupervisor implements DisplayListener {
|
|||||||
final boolean nowVisible = allResumedActivitiesVisible();
|
final boolean nowVisible = allResumedActivitiesVisible();
|
||||||
for (int activityNdx = mStoppingActivities.size() - 1; activityNdx >= 0; --activityNdx) {
|
for (int activityNdx = mStoppingActivities.size() - 1; activityNdx >= 0; --activityNdx) {
|
||||||
ActivityRecord s = mStoppingActivities.get(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);
|
boolean waitingVisible = mWaitingVisibleActivities.contains(s);
|
||||||
if (DEBUG_STATES) Slog.v(TAG, "Stopping " + s + ": nowVisible=" + nowVisible
|
if (DEBUG_STATES) Slog.v(TAG, "Stopping " + s + ": nowVisible=" + nowVisible
|
||||||
+ " waitingVisible=" + waitingVisible + " finishing=" + s.finishing);
|
+ " waitingVisible=" + waitingVisible + " finishing=" + s.finishing);
|
||||||
if (waitingVisible && nowVisible) {
|
if (waitingVisible && nowVisible) {
|
||||||
mWaitingVisibleActivities.remove(s);
|
mWaitingVisibleActivities.remove(s);
|
||||||
|
waitingVisible = false;
|
||||||
if (s.finishing) {
|
if (s.finishing) {
|
||||||
// If this activity is finishing, it is sitting on top of
|
// If this activity is finishing, it is sitting on top of
|
||||||
// everyone else but we now know it is no longer needed...
|
// 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.
|
// hidden by the activities in front of it.
|
||||||
if (DEBUG_STATES) Slog.v(TAG, "Before stopping, can hide: " + s);
|
if (DEBUG_STATES) Slog.v(TAG, "Before stopping, can hide: " + s);
|
||||||
mWindowManager.setAppVisibility(s.appToken, false);
|
mWindowManager.setAppVisibility(s.appToken, false);
|
||||||
waitingVisible = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((!waitingVisible || mService.isSleepingOrShuttingDownLocked()) && remove) {
|
if ((!waitingVisible || mService.isSleepingOrShuttingDownLocked()) && remove) {
|
||||||
|
|||||||
Reference in New Issue
Block a user