Fix render of ARTShape using null paths

Summary:
This diff fixes the rendering of ART Shapes that uses null paths

changelog: [internal] internal fix

Reviewed By: JoshuaGross

Differential Revision: D22780163

fbshipit-source-id: 2aded726ad47fce243ec1c28fbd4c39dd71820ef
This commit is contained in:
David Vacca
2020-07-27 17:35:37 -07:00
committed by Facebook GitHub Bot
parent 07722cf746
commit 7ccb67a49c
@@ -7,6 +7,9 @@
package com.facebook.react.views.view;
import static android.os.Build.VERSION_CODES.KITKAT;
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
@@ -1244,6 +1247,7 @@ public class ReactViewBackgroundDrawable extends Drawable {
return ReactViewBackgroundDrawable.colorFromAlphaAndRGBComponents(alpha, rgb);
}
@TargetApi(KITKAT)
public RectF getDirectionAwareBorderInsets() {
final float borderWidth = getBorderWidthOrDefaultTo(0, Spacing.ALL);
final float borderTopWidth = getBorderWidthOrDefaultTo(borderWidth, Spacing.TOP);