Skip to content

Commit 14709f8

Browse files
committed
avoid calling method for API < 21
1 parent 4500095 commit 14709f8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextAnchorViewManager.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
package com.facebook.react.views.text;
99

10+
import android.os.Build;
1011
import android.text.Layout;
1112
import android.text.Spannable;
1213
import android.text.TextUtils;
@@ -99,6 +100,9 @@ public void setSelectionColor(ReactTextView view, @Nullable Integer color) {
99100

100101
@ReactProp(name = "android_hyphenationFrequency")
101102
public void setAndroidHyphenationFrequency(ReactTextView view, @Nullable String frequency) {
103+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
104+
return;
105+
}
102106
if (frequency == null || frequency.equals("none")) {
103107
view.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE);
104108
} else if (frequency.equals("full")) {

0 commit comments

Comments
 (0)