Merge "Do not call setReady(false) when finishing" into sc-v2-dev

This commit is contained in:
Chris Li
2021-07-30 16:09:30 +00:00
committed by Android (Google) Code Review
2 changed files with 14 additions and 2 deletions

View File

@@ -3453,7 +3453,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
if (stopped) {
abortAndClearOptionsAnimation();
}
mAtmService.getTransitionController().requestTransitionIfNeeded(TRANSIT_CLOSE, this);
if (mAtmService.getTransitionController().isCollecting()) {
// We don't want the finishing to change the transition ready state since there will not
// be corresponding setReady for finishing.
mAtmService.getTransitionController().collectExistenceChange(this);
} else {
mAtmService.getTransitionController().requestTransitionIfNeeded(TRANSIT_CLOSE, this);
}
}
/**

View File

@@ -1551,7 +1551,13 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
return;
}
if (task.isVisible()) {
mService.getTransitionController().requestTransitionIfNeeded(TRANSIT_CLOSE, task);
if (mService.getTransitionController().isCollecting()) {
// We don't want the finishing to change the transition ready state since there will
// not be corresponding setReady for finishing.
mService.getTransitionController().collectExistenceChange(task);
} else {
mService.getTransitionController().requestTransitionIfNeeded(TRANSIT_CLOSE, task);
}
} else {
// Removing a non-visible task doesn't require a transition, but if there is one
// collecting, this should be a member just in case.