Merge "Allow multiple close transactions for task view" into udc-qpr-dev

This commit is contained in:
Mady Mellor
2023-07-06 17:49:58 +00:00
committed by Android (Google) Code Review

View File

@@ -202,15 +202,10 @@ public class TaskViewTransitions implements Transitions.TransitionHandler {
if (taskView == null) return null; if (taskView == null) return null;
// Opening types should all be initiated by shell // Opening types should all be initiated by shell
if (!TransitionUtil.isClosingType(request.getType())) return null; if (!TransitionUtil.isClosingType(request.getType())) return null;
PendingTransition pending = findPendingCloseTransition(taskView); PendingTransition pending = new PendingTransition(request.getType(), null,
if (pending == null) { taskView, null /* cookie */);
pending = new PendingTransition(request.getType(), null, taskView, null /* cookie */);
}
if (pending.mClaimed != null) {
throw new IllegalStateException("Task is closing in 2 collecting transitions?"
+ " This state doesn't make sense");
}
pending.mClaimed = transition; pending.mClaimed = transition;
mPending.add(pending);
return new WindowContainerTransaction(); return new WindowContainerTransaction();
} }