diff --git a/litho-core/src/main/java/com/facebook/litho/DefaultInternalNode.java b/litho-core/src/main/java/com/facebook/litho/DefaultInternalNode.java index d0d9ecc5f07..5bbc2ac00dd 100644 --- a/litho-core/src/main/java/com/facebook/litho/DefaultInternalNode.java +++ b/litho-core/src/main/java/com/facebook/litho/DefaultInternalNode.java @@ -82,7 +82,7 @@ public class DefaultInternalNode implements InternalNode, Cloneable { private static final boolean SUPPORTS_RTL = (SDK_INT >= JELLY_BEAN_MR1); // Flags used to indicate that a certain attribute was explicitly set on the node. - private static final long PFLAG_LAYOUT_DIRECTION_IS_SET = 1L << 0; + private static final long PFLAG_LAYOUT_DIRECTION_IS_SET = 1L; private static final long PFLAG_ALIGN_SELF_IS_SET = 1L << 1; private static final long PFLAG_POSITION_TYPE_IS_SET = 1L << 2; private static final long PFLAG_FLEX_IS_SET = 1L << 3; @@ -1760,7 +1760,6 @@ private void setIsPaddingPercent(YogaEdge edge, boolean isPaddingPercent) { } private void setPaddingFromBackground(Drawable drawable) { - if (drawable != null) { final Rect backgroundPadding = new Rect(); if (getDrawablePadding(drawable, backgroundPadding)) { @@ -1802,10 +1801,7 @@ private void updateWith(ComponentContext c, YogaNode node, List compo mComponentsNeedingPreviousRenderData = null; for (Component component : components) { if (component.needsPreviousRenderData()) { - if (mComponentsNeedingPreviousRenderData == null) { - mComponentsNeedingPreviousRenderData = new ArrayList<>(1); - } - mComponentsNeedingPreviousRenderData.add(component); + addComponentNeedingPreviousRenderData(component); } } diff --git a/litho-core/src/main/java/com/facebook/litho/NodeInfo.java b/litho-core/src/main/java/com/facebook/litho/NodeInfo.java index 1f1faa814c3..114f50fcfa6 100644 --- a/litho-core/src/main/java/com/facebook/litho/NodeInfo.java +++ b/litho-core/src/main/java/com/facebook/litho/NodeInfo.java @@ -64,9 +64,9 @@ public interface NodeInfo { @Retention(RetentionPolicy.SOURCE) @interface SelectedState {} - static final int ACCESSIBILITY_HEADING_UNSET = 0; - static final int ACCESSIBILITY_HEADING_SET_TRUE = 1; - static final int ACCESSIBILITY_HEADING_SET_FALSE = 2; + int ACCESSIBILITY_HEADING_UNSET = 0; + int ACCESSIBILITY_HEADING_SET_TRUE = 1; + int ACCESSIBILITY_HEADING_SET_FALSE = 2; @IntDef({ ACCESSIBILITY_HEADING_UNSET,