Skip to content

Commit

Permalink
Remove support for Android API < 23 in ReactTextInputLocalData (faceb…
Browse files Browse the repository at this point in the history
…ook#39670)

Summary:
Pull Request resolved: facebook#39670

Since minsdk version was increased to 23, we are deleting code using Android APIs < 23 for class ReactTextInputLocalData

changelog: [Android][Breaking] Remove support for Android API < 23 in ReactTextInputLocalData

Reviewed By: NickGerleman

Differential Revision: D48545510

fbshipit-source-id: a8a6af19a6f89cd466bb484cdeffdc0d57330a93
  • Loading branch information
mdvacca committed Sep 28, 2023
1 parent 373d081 commit b951d48
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
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 b951d48

Please sign in to comment.