Skip to content

Commit

Permalink
change default privateimeoptions to null
Browse files Browse the repository at this point in the history
Summary: Following up the comment here https://www.internalfb.com/diff/D60190252?dst_version_fbid=1187004342629649&transaction_fbid=410116234830975

Reviewed By: adityasharat

Differential Revision: D60642328

fbshipit-source-id: 83cf6616f58a9091a48dffa00e3f9458a6b8a66c
  • Loading branch information
Sophia Zhu authored and facebook-github-bot committed Aug 2, 2024
1 parent ce9a8c3 commit 6dc6dca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ class MaterialTextInputSpec {
@PropDefault protected static final int inputType = TextInputSpec.inputType;
@PropDefault protected static final int rawInputType = TextInputSpec.rawInputType;
@PropDefault protected static final int imeOptions = TextInputSpec.imeOptions;
@PropDefault protected static final String privateImeOptions = TextInputSpec.privateImeOptions;
@PropDefault protected static final int cursorDrawableRes = TextInputSpec.cursorDrawableRes;
@PropDefault static final boolean multiline = TextInputSpec.multiline;
@PropDefault protected static final int minLines = TextInputSpec.minLines;
Expand Down Expand Up @@ -159,7 +158,7 @@ static void onMeasure(
@Prop(optional = true) int inputType,
@Prop(optional = true) int rawInputType,
@Prop(optional = true) int imeOptions,
@Prop(optional = true) String privateImeOptions,
@Prop(optional = true) @Nullable String privateImeOptions,
@Prop(optional = true, varArg = "inputFilter") List<InputFilter> inputFilters,
@Prop(optional = true) boolean multiline,
@Prop(optional = true) TextUtils.TruncateAt ellipsize,
Expand Down Expand Up @@ -364,7 +363,7 @@ static void onMount(
@Prop(optional = true) int inputType,
@Prop(optional = true) int rawInputType,
@Prop(optional = true) int imeOptions,
@Prop(optional = true) String privateImeOptions,
@Prop(optional = true) @Nullable String privateImeOptions,
@Prop(optional = true, varArg = "inputFilter") List<InputFilter> inputFilters,
@Prop(optional = true) boolean multiline,
@Prop(optional = true) int minLines,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ class TextInputSpec {
@PropDefault protected static final int inputType = EditorInfo.TYPE_CLASS_TEXT;
@PropDefault protected static final int rawInputType = EditorInfo.TYPE_NULL;
@PropDefault protected static final int imeOptions = EditorInfo.IME_NULL;
@PropDefault protected static final String privateImeOptions = "";
@PropDefault protected static final int cursorDrawableRes = -1;
@PropDefault static final boolean multiline = false;
@PropDefault protected static final int minLines = 1;
Expand Down Expand Up @@ -291,7 +290,7 @@ static void onMeasure(
@Prop(optional = true) int inputType,
@Prop(optional = true) int rawInputType,
@Prop(optional = true) int imeOptions,
@Prop(optional = true) String privateImeOptions,
@Prop(optional = true) @Nullable String privateImeOptions,
@Prop(optional = true, varArg = "inputFilter") List<InputFilter> inputFilters,
@Prop(optional = true) boolean multiline,
@Prop(optional = true) TextUtils.TruncateAt ellipsize,
Expand Down Expand Up @@ -534,7 +533,9 @@ static void setParams(
editText.setTypeface(typeface, 0);
editText.setGravity(gravity);
editText.setImeOptions(imeOptions);
editText.setPrivateImeOptions(privateImeOptions);
if (privateImeOptions != null) {
editText.setPrivateImeOptions(privateImeOptions);
}
editText.setFocusable(editable);
editText.setFocusableInTouchMode(editable);
editText.setLongClickable(editable);
Expand Down Expand Up @@ -831,7 +832,7 @@ static void onMount(
@Prop(optional = true) int inputType,
@Prop(optional = true) int rawInputType,
@Prop(optional = true) int imeOptions,
@Prop(optional = true) String privateImeOptions,
@Prop(optional = true) @Nullable String privateImeOptions,
@Prop(optional = true, varArg = "inputFilter") List<InputFilter> inputFilters,
@Prop(optional = true) boolean multiline,
@Prop(optional = true) int minLines,
Expand Down Expand Up @@ -954,6 +955,7 @@ static void onUnmount(
}
editText.setTextState(null);
editText.removeOnWindowFocusChangeListener();
editText.setPrivateImeOptions(null);
mountedView.set(null);
}

Expand Down

0 comments on commit 6dc6dca

Please sign in to comment.