From bb407fa1ec0bd0367373961fdc0e840150840068 Mon Sep 17 00:00:00 2001 From: Jonathan Lee Date: Tue, 16 Oct 2018 14:42:44 -0700 Subject: [PATCH] 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 --- .../com/facebook/react/views/view/ReactViewGroup.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java index 246db3459f9071..a3a189dc1bb088 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java @@ -238,7 +238,8 @@ public void setBorderRadius(float borderRadius) { 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 void setBorderRadius(float borderRadius) { 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