Merge "Fix potential NPE when callback remote animator"

This commit is contained in:
Treehugger Robot
2022-09-23 11:19:12 +00:00
committed by Gerrit Code Review

View File

@@ -3339,8 +3339,9 @@ class Task extends TaskFragment {
ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS,
"applyAnimationUnchecked, control: %s, task: %s, transit: %s",
control, asTask(), AppTransition.appTransitionOldToString(transit));
final int size = sources != null ? sources.size() : 0;
control.addTaskToTargets(this, (type, anim) -> {
for (int i = 0; i < sources.size(); ++i) {
for (int i = 0; i < size; ++i) {
sources.get(i).onAnimationFinished(type, anim);
}
});