Skip to content

Commit b968cb6

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Remove support for Android API < 23 in ReactTextInputLocalData (#39670)
Summary: Pull Request resolved: #39670 Since minsdk version was increased to 23, we are deleting code using Android APIs < 23 for class ReactTextInputLocalData bypass-github-export-checks changelog: [Android][Breaking] Remove support for Android API < 23 in ReactTextInputLocalData Reviewed By: NickGerleman Differential Revision: D48545510 fbshipit-source-id: 8601a30a58d0e74c51b7d5dc8cec9e92e65344d8
1 parent 1904e80 commit b968cb6

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputLocalData.java

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

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

10-
import android.os.Build;
1110
import android.text.SpannableStringBuilder;
1211
import android.util.TypedValue;
1312
import android.widget.EditText;
@@ -30,12 +29,7 @@ public ReactTextInputLocalData(EditText editText) {
3029
mPlaceholder = editText.getHint();
3130
mMinLines = editText.getMinLines();
3231
mMaxLines = editText.getMaxLines();
33-
34-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
35-
mBreakStrategy = editText.getBreakStrategy();
36-
} else {
37-
mBreakStrategy = 0;
38-
}
32+
mBreakStrategy = editText.getBreakStrategy();
3933
}
4034

4135
public void apply(EditText editText) {
@@ -45,8 +39,6 @@ public void apply(EditText editText) {
4539
editText.setMaxLines(mMaxLines);
4640
editText.setInputType(mInputType);
4741
editText.setHint(mPlaceholder);
48-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
49-
editText.setBreakStrategy(mBreakStrategy);
50-
}
42+
editText.setBreakStrategy(mBreakStrategy);
5143
}
5244
}

0 commit comments

Comments
 (0)