Skip to content

Commit

Permalink
Fix lint warnings and code duplication
Browse files Browse the repository at this point in the history
Reviewed By: muraziz

Differential Revision: D16709380

fbshipit-source-id: 554e006f4da879391d77b47bd9567d3247201b4a
  • Loading branch information
colriot authored and facebook-github-bot committed Aug 9, 2019
1 parent ac513f3 commit fa3466b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -1802,10 +1801,7 @@ private void updateWith(ComponentContext c, YogaNode node, List<Component> compo
mComponentsNeedingPreviousRenderData = null;
for (Component component : components) {
if (component.needsPreviousRenderData()) {
if (mComponentsNeedingPreviousRenderData == null) {
mComponentsNeedingPreviousRenderData = new ArrayList<>(1);
}
mComponentsNeedingPreviousRenderData.add(component);
addComponentNeedingPreviousRenderData(component);
}
}

Expand Down
6 changes: 3 additions & 3 deletions litho-core/src/main/java/com/facebook/litho/NodeInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit fa3466b

Please sign in to comment.