diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java index 4af57295d9a..83bacaafb9e 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java @@ -106,9 +106,7 @@ public class ReactTextView extends AppCompatTextView implements ReactCompoundVie // Defaults for these fields: // https://github.com/aosp-mirror/platform_frameworks_base/blob/master/core/java/android/widget/TextView.java#L1061 - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE); - } + setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE); setMovementMethod(getDefaultMovementMethod()); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { setJustificationMode(Layout.JUSTIFICATION_MODE_NONE); @@ -145,10 +143,7 @@ public class ReactTextView extends AppCompatTextView implements ReactCompoundVie setFocusable(View.FOCUSABLE_AUTO); } - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE); - } - + setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE); updateView(); // call after changing ellipsizeLocation in particular } @@ -399,10 +394,8 @@ public class ReactTextView extends AppCompatTextView implements ReactCompoundVie if (nextTextAlign != getGravityHorizontal()) { setGravityHorizontal(nextTextAlign); } - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - if (getBreakStrategy() != update.getTextBreakStrategy()) { - setBreakStrategy(update.getTextBreakStrategy()); - } + if (getBreakStrategy() != update.getTextBreakStrategy()) { + setBreakStrategy(update.getTextBreakStrategy()); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (getJustificationMode() != update.getJustificationMode()) {