Merge "Fix potential NPE when callback remote animator"
This commit is contained in:
@@ -3339,8 +3339,9 @@ class Task extends TaskFragment {
|
|||||||
ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS,
|
ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS,
|
||||||
"applyAnimationUnchecked, control: %s, task: %s, transit: %s",
|
"applyAnimationUnchecked, control: %s, task: %s, transit: %s",
|
||||||
control, asTask(), AppTransition.appTransitionOldToString(transit));
|
control, asTask(), AppTransition.appTransitionOldToString(transit));
|
||||||
|
final int size = sources != null ? sources.size() : 0;
|
||||||
control.addTaskToTargets(this, (type, anim) -> {
|
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);
|
sources.get(i).onAnimationFinished(type, anim);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user