Back out "[react-native][PR] Rounded corner rendering fixed on Android N."

Summary:
Original PR: https://github.com/facebook/react-native/pull/21340

The original PR fixed a bug with border radius on Android 7.0, but caused a new bug where no `ReactART` components would render if they were nested within a View with border radius set.

Differential Revision: D10409352

fbshipit-source-id: 0b4e36ae9d4c3bc2f4884a43909f8efdeeb41b74
This commit is contained in:
Jonathan Lee
2018-10-16 14:42:44 -07:00
committed by Facebook Github Bot
parent 764dd511d2
commit bb407fa1ec

View File

@@ -238,7 +238,8 @@ public class ReactViewGroup extends ViewGroup implements
ReactViewBackgroundDrawable backgroundDrawable = getOrCreateReactViewBackground();
backgroundDrawable.setRadius(borderRadius);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2 || Build.VERSION.SDK_INT == Build.VERSION_CODES.N) {
if (Build.VERSION_CODES.HONEYCOMB < Build.VERSION.SDK_INT
&& Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
final int UPDATED_LAYER_TYPE =
backgroundDrawable.hasRoundedBorders()
? View.LAYER_TYPE_SOFTWARE
@@ -253,8 +254,9 @@ public class ReactViewGroup extends ViewGroup implements
public void setBorderRadius(float borderRadius, int position) {
ReactViewBackgroundDrawable backgroundDrawable = getOrCreateReactViewBackground();
backgroundDrawable.setRadius(borderRadius, position);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2 || Build.VERSION.SDK_INT == Build.VERSION_CODES.N) {
if (Build.VERSION_CODES.HONEYCOMB < Build.VERSION.SDK_INT
&& Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
final int UPDATED_LAYER_TYPE =
backgroundDrawable.hasRoundedBorders()
? View.LAYER_TYPE_SOFTWARE