Merge "Fix empty CompositePositionUpdateListener"

This commit is contained in:
TreeHugger Robot
2019-03-26 17:37:22 +00:00
committed by Android (Google) Code Review

View File

@@ -284,9 +284,10 @@ public final class RenderNode {
private static final class CompositePositionUpdateListener implements PositionUpdateListener {
private final PositionUpdateListener[] mListeners;
private static final PositionUpdateListener[] sEmpty = new PositionUpdateListener[0];
CompositePositionUpdateListener(PositionUpdateListener... listeners) {
mListeners = listeners;
mListeners = listeners != null ? listeners : sEmpty;
}
public CompositePositionUpdateListener with(PositionUpdateListener listener) {