Merge "Prevent exception when quick switching between two split pairs" into udc-dev

This commit is contained in:
Jerry Chang
2023-06-27 17:42:42 +00:00
committed by Android (Google) Code Review

View File

@@ -473,16 +473,14 @@ public final class TaskViewUtils {
throw new IllegalStateException(
"Expected task to be showing, but it is " + mode);
}
if (change.getParent() == null) {
throw new IllegalStateException("Initiating multi-split launch but the split"
+ "root of " + taskId + " is already visible or has broken hierarchy.");
}
}
if (taskId == initialTaskId) {
splitRoot1 = transitionInfo.getChange(change.getParent());
splitRoot1 = change.getParent() == null ? change :
transitionInfo.getChange(change.getParent());
}
if (taskId == secondTaskId) {
splitRoot2 = transitionInfo.getChange(change.getParent());
splitRoot2 = change.getParent() == null ? change :
transitionInfo.getChange(change.getParent());
}
}