Fix unresolved KDoc references (#50403)

Summary:
Static code analysis detected some unresolved KDoc references. In this PR, I’m addressing a few of them.

## Changelog:

[INTERNAL] - Fix some unresolved KDoc references

Pull Request resolved: https://github.com/facebook/react-native/pull/50403

Test Plan:
```sh
yarn test-android
yarn android
```

Reviewed By: cortinico

Differential Revision: D72234349

Pulled By: javache

fbshipit-source-id: 0877992cce5d76124b83c5261ec680683caadc9c
This commit is contained in:
Mateo Guzmán
2025-04-01 12:19:01 -07:00
committed by Facebook GitHub Bot
parent 9eb75d4bd5
commit 1012445ef5
16 changed files with 26 additions and 20 deletions
@@ -93,14 +93,14 @@ public interface CatalystInstance : MemoryPressureListener, JSInstance, JSBundle
@VisibleForTesting public fun setGlobalVariable(propName: String, jsonValue: String)
/**
* Do not use this anymore. Use [getRuntimeExecutor] instead. Get the C pointer (as a long) to the
* Do not use this anymore. Use [runtimeExecutor] instead. Get the C pointer (as a long) to the
* JavaScriptCore context associated with this instance.
*
* <p>Use the following pattern to ensure that the JS context is not cleared while you are using
* it: JavaScriptContextHolder jsContext = reactContext.getJavaScriptContextHolder()
* synchronized(jsContext) { nativeThingNeedingJsContext(jsContext.get()); }
*/
@get:Deprecated("Use getRuntimeExecutor() instead.")
@get:Deprecated("Use runtimeExecutor instead.")
public val javaScriptContextHolder: JavaScriptContextHolder
public val runtimeExecutor: RuntimeExecutor?
@@ -7,6 +7,8 @@
package com.facebook.react.bridge
import android.app.Activity
/**
* Listener for receiving activity lifecycle events.
*
@@ -124,7 +124,8 @@ public interface UIManager : PerformanceCounter {
*
* @param reactTag tag
* @return view if found
* @throws IllegalViewOperationException if tag could not be resolved.
* @throws [com.facebook.react.uimanager.IllegalViewOperationException] if tag could not be
* resolved.
*/
public fun resolveView(reactTag: Int): View?
@@ -7,6 +7,8 @@
package com.facebook.react.common
import android.view.View
/**
* Interface for handling a surface in React Native. In mobile platform a surface can be any
* container that holds some [View]. For example, a Dialog can be a surface to wrap content view
@@ -23,7 +23,7 @@ public object ReactBuildConfig {
@JvmField public val IS_INTERNAL_BUILD: Boolean = BuildConfig.IS_INTERNAL_BUILD
/**
* [true] if Perfetto was enabled on this build (`WITH_PERFETTO=1`), indicating it is a profiling
* `true` if Perfetto was enabled on this build (`WITH_PERFETTO=1`), indicating it is a profiling
* build.
*/
@JvmField public val ENABLE_PERFETTO: Boolean = BuildConfig.ENABLE_PERFETTO
@@ -19,8 +19,8 @@ import java.io.File
/**
* Interface for accessing and interacting with development features. In dev mode, use the
* implementation [BridgeDevSupportManager]. In production mode, use the dummy implementation
* [ReleaseDevSupportManager].
* implementation [com.facebook.react.devsupport.BridgeDevSupportManager]. In production mode, use
* the dummy implementation [com.facebook.react.devsupport.ReleaseDevSupportManager].
*/
public interface DevSupportManager : JSExceptionHandler {
@@ -20,11 +20,7 @@ import com.facebook.react.bridge.WritableMap
* accidentally keeping the device awake for long periods of time because JS crashed or some
* request timed out. A value of 0 means no timeout (should only be used for long-running tasks
* such as music playback).
* @property allowedInForeground whether to allow this task to run while the app is in the
* foreground (i.e. there is a host in resumed mode for the current ReactContext). Only set this
* to true if you really need it. Note that tasks run in the same JS thread as UI code, so doing
* expensive operations would degrade user experience.
* @property allowedInForeground whether to allow this task to run while the app is in the
* @property isAllowedInForeground whether to allow this task to run while the app is in the
* foreground (i.e. there is a host in resumed mode for the current ReactContext). Only set this
* to true if you really need it. Note that tasks run in the same JS thread as UI code, so doing
* expensive operations would degrade user experience.
@@ -18,8 +18,9 @@ public interface HeadlessJsTaskEventListener {
public fun onHeadlessJsTaskStart(taskId: Int)
/**
* Called when a JS task finishes (i.e. when [HeadlessJsTaskSupportModule.notifyTaskFinished] is
* called, or when it times out), on the UI thread.
* Called when a JS task finishes (i.e. when
* [om.facebook.react.modules.core.HeadlessJsTaskSupportModule.notifyTaskFinished] is called, or
* when it times out), on the UI thread.
*/
public fun onHeadlessJsTaskFinish(taskId: Int)
}
@@ -7,6 +7,8 @@
package com.facebook.react.modules.core
import android.app.Activity
/**
* Interface used to denote activities that can forward permission requests and call
* [PermissionListener] with the permission request results.
@@ -17,9 +17,9 @@ import android.view.ViewGroup
public fun interface OnInterceptTouchEventListener {
/**
* Called when a onInterceptTouch is invoked on a view group
* Called when a onInterceptTouch is invoked on a view group.
*
* @param v The view group the onInterceptTouch has been called on
* @param view The view group the onInterceptTouch has been called on.
* @param event The motion event being dispatched down the hierarchy.
* @return Return true to steal motion event from the children and have the dispatched to this
* view, or return false to allow motion event to be delivered to children view
@@ -17,7 +17,7 @@ import com.facebook.react.R
@TargetApi(29)
internal object BlendModeHelper {
/** @see https://www.w3.org/TR/compositing-1/#mix-blend-mode */
/** @see <a href="https://www.w3.org/TR/compositing-1/#mix-blend-mode">mix-blend-mode</a> */
@JvmStatic
fun parseMixBlendMode(mixBlendMode: String?): BlendMode? {
if (mixBlendMode == null || Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
@@ -63,7 +63,7 @@ public object PixelUtil {
return value / DisplayMetricsHolder.getWindowDisplayMetrics().density
}
/** @return [float] that represents the density of the display metrics for device screen. */
/** @return [Float] that represents the density of the display metrics for device screen. */
@JvmStatic
public fun getDisplayMetricDensity(): Float =
DisplayMetricsHolder.getWindowDisplayMetrics().density
@@ -24,10 +24,10 @@ public interface ReactClippingViewGroup {
/**
* Notify view that clipping area may have changed and it should recalculate the list of children
* that should be attached/detached. This method should be called only when property
* `removeClippedSubviews` is set to `true` on a view.
* [removeClippedSubviews] is set to `true` on a view.
*
* CAUTION: Views are responsible for calling [updateClippingRect] on it's children. This should
* happen if child implement [ReactClippingViewGroup], return true from [getRemoveClippedSubviews]
* happen if child implement [ReactClippingViewGroup], return true from [removeClippedSubviews]
* and clipping rect change of the current view may affect clipping rect of this child.
*/
public fun updateClippingRect()
@@ -1053,7 +1053,7 @@ internal class BorderDrawable(
* Multiplies the color with the given alpha.
*
* @param color color to be multiplied
* @param alpha value between 0 and 255
* @param rawAlpha value between 0 and 255
* @return multiplied color
*/
private fun multiplyColorAlpha(color: Int, rawAlpha: Int): Int {
@@ -9,6 +9,7 @@ package com.facebook.react.views.swiperefresh
import android.view.MotionEvent
import android.view.ViewConfiguration
import android.view.ViewGroup
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.facebook.react.bridge.ReactContext
import com.facebook.react.uimanager.PixelUtil
@@ -14,6 +14,7 @@ import android.view.View
import com.facebook.react.bridge.ReactContext
import com.facebook.react.uimanager.UIManagerHelper
import com.facebook.react.views.text.ReactTextView
import com.facebook.react.views.text.TextLayoutManager
import com.facebook.react.views.view.ViewGroupClickEvent
/**