diff --git a/packages/react-native/ReactAndroid/api/ReactAndroid.api b/packages/react-native/ReactAndroid/api/ReactAndroid.api index 26e4ff81bdf..29da2733ae0 100644 --- a/packages/react-native/ReactAndroid/api/ReactAndroid.api +++ b/packages/react-native/ReactAndroid/api/ReactAndroid.api @@ -7009,17 +7009,6 @@ public abstract interface class com/facebook/react/views/textinput/ContentSizeWa public abstract fun onLayout ()V } -public final class com/facebook/react/views/textinput/ReactContentSizeChangedEvent : com/facebook/react/uimanager/events/Event { - public static final field Companion Lcom/facebook/react/views/textinput/ReactContentSizeChangedEvent$Companion; - public static final field EVENT_NAME Ljava/lang/String; - public fun (IFF)V - public fun (IIFF)V - public fun getEventName ()Ljava/lang/String; -} - -public final class com/facebook/react/views/textinput/ReactContentSizeChangedEvent$Companion { -} - public class com/facebook/react/views/textinput/ReactEditText : androidx/appcompat/widget/AppCompatEditText { public static final field DEBUG_MODE Z protected field mContainsImages Z @@ -7043,7 +7032,6 @@ public class com/facebook/react/views/textinput/ReactEditText : androidx/appcomp public fun invalidateDrawable (Landroid/graphics/drawable/Drawable;)V public fun isLayoutRequested ()Z public fun maybeSetSelection (III)V - public fun maybeSetText (Lcom/facebook/react/views/text/ReactTextUpdate;)V public fun maybeSetTextFromJS (Lcom/facebook/react/views/text/ReactTextUpdate;)V public fun maybeSetTextFromState (Lcom/facebook/react/views/text/ReactTextUpdate;)V public fun maybeUpdateTypeface ()V @@ -7099,17 +7087,6 @@ public class com/facebook/react/views/textinput/ReactEditText : androidx/appcomp protected fun verifyDrawable (Landroid/graphics/drawable/Drawable;)Z } -public final class com/facebook/react/views/textinput/ReactTextChangedEvent : com/facebook/react/uimanager/events/Event { - public static final field Companion Lcom/facebook/react/views/textinput/ReactTextChangedEvent$Companion; - public static final field EVENT_NAME Ljava/lang/String; - public fun (IILjava/lang/String;I)V - public fun (ILjava/lang/String;I)V - public fun getEventName ()Ljava/lang/String; -} - -public final class com/facebook/react/views/textinput/ReactTextChangedEvent$Companion { -} - public final class com/facebook/react/views/textinput/ReactTextInputLocalData { public fun (Landroid/widget/EditText;)V public final fun apply (Landroid/widget/EditText;)V diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextUpdate.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextUpdate.kt index 7fccd893152..08e46397c64 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextUpdate.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextUpdate.kt @@ -11,10 +11,7 @@ import android.text.Layout import android.text.Spannable import com.facebook.react.common.ReactConstants -/** - * Class that contains the data needed for a text update. Used by both and - * VisibleForTesting from [TextInputEventsTestCase]. - */ +/** Class that contains the data needed for a text update. Used by both and . */ public class ReactTextUpdate( public val text: Spannable, public val jsEventCounter: Int, diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactContentSizeChangedEvent.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactContentSizeChangedEvent.kt index 4c39cf2d547..f1023156063 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactContentSizeChangedEvent.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactContentSizeChangedEvent.kt @@ -13,7 +13,7 @@ import com.facebook.react.uimanager.common.ViewUtil import com.facebook.react.uimanager.events.Event /** Event emitted by EditText native view when content size changes. */ -public class ReactContentSizeChangedEvent( +internal class ReactContentSizeChangedEvent( surfaceId: Int, viewId: Int, private val contentWidth: Float, @@ -23,7 +23,7 @@ public class ReactContentSizeChangedEvent( "Use the constructor with surfaceId instead", ReplaceWith( "ReactContentSizeChangedEvent(surfaceId, viewId, contentSizeWidth, contentSizeHeight)")) - public constructor( + constructor( viewId: Int, contentSizeWidth: Float, contentSizeHeight: Float @@ -44,7 +44,7 @@ public class ReactContentSizeChangedEvent( } } - public companion object { - public const val EVENT_NAME: String = "topContentSizeChange" + companion object { + const val EVENT_NAME: String = "topContentSizeChange" } } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java index 6b654bdf449..c1f41389bb3 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java @@ -93,7 +93,6 @@ import java.util.concurrent.CopyOnWriteArrayList; * *

The wrapper stops the EditText from triggering *TextChanged events, in the case where JS has * called this explicitly. This is the default behavior on other platforms as well. - * VisibleForTesting from {@link TextInputEventsTestCase}. */ public class ReactEditText extends AppCompatEditText { @@ -654,7 +653,6 @@ public class ReactEditText extends AppCompatEditText { } } - // VisibleForTesting from {@link TextInputEventsTestCase}. public void requestFocusFromJS() { if (ReactNativeFeatureFlags.useEditTextStockAndroidFocusBehavior()) { requestFocusProgramatically(); @@ -667,7 +665,6 @@ public class ReactEditText extends AppCompatEditText { clearFocus(); } - // VisibleForTesting from {@link TextInputEventsTestCase}. public int incrementAndGetEventCounter() { return ++mNativeEventCount; } @@ -688,8 +685,7 @@ public class ReactEditText extends AppCompatEditText { return eventCounter >= mNativeEventCount; } - // VisibleForTesting from {@link TextInputEventsTestCase}. - public void maybeSetText(ReactTextUpdate reactTextUpdate) { + private void maybeSetText(ReactTextUpdate reactTextUpdate) { if (isSecureText() && TextUtils.equals(getText(), reactTextUpdate.getText())) { return; } diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextChangedEvent.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextChangedEvent.kt index 969efcf45e5..ce863d3cc74 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextChangedEvent.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextChangedEvent.kt @@ -12,11 +12,8 @@ import com.facebook.react.bridge.WritableMap import com.facebook.react.uimanager.common.ViewUtil import com.facebook.react.uimanager.events.Event -/** - * Event emitted by EditText native view when text changes. VisibleForTesting from - * [TextInputEventsTestCase]. - */ -public class ReactTextChangedEvent( +/** Event emitted by EditText native view when text changes. */ +internal class ReactTextChangedEvent( surfaceId: Int, viewId: Int, private val text: String, @@ -25,7 +22,7 @@ public class ReactTextChangedEvent( @Deprecated( "Use the constructor with surfaceId instead", ReplaceWith("ReactTextChangedEvent(surfaceId, viewId, text, eventCount)")) - public constructor( + constructor( viewId: Int, text: String, eventCount: Int @@ -41,7 +38,7 @@ public class ReactTextChangedEvent( } } - public companion object { - public const val EVENT_NAME: String = "topChange" + companion object { + const val EVENT_NAME: String = "topChange" } }