Skip to content

Commit

Permalink
Remove support for Android API < 23 in ReactTextInputLocalData (#39670)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mdvacca authored and facebook-github-bot committed Sep 29, 2023
1 parent 1904e80 commit b968cb6
Showing 1 changed file with 2 additions and 10 deletions.
Expand Up @@ -7,7 +7,6 @@

package com.facebook.react.views.textinput;

import android.os.Build;
import android.text.SpannableStringBuilder;
import android.util.TypedValue;
import android.widget.EditText;
Expand All @@ -30,12 +29,7 @@ public ReactTextInputLocalData(EditText editText) {
mPlaceholder = editText.getHint();
mMinLines = editText.getMinLines();
mMaxLines = editText.getMaxLines();

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
mBreakStrategy = editText.getBreakStrategy();
} else {
mBreakStrategy = 0;
}
mBreakStrategy = editText.getBreakStrategy();
}

public void apply(EditText editText) {
Expand All @@ -45,8 +39,6 @@ public void apply(EditText editText) {
editText.setMaxLines(mMaxLines);
editText.setInputType(mInputType);
editText.setHint(mPlaceholder);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
editText.setBreakStrategy(mBreakStrategy);
}
editText.setBreakStrategy(mBreakStrategy);
}
}

0 comments on commit b968cb6

Please sign in to comment.