Fix UseRequiresApi: Replace @TargetApi with @RequiresApi (#55507)

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

Replace TargetApi(29) with RequiresApi(29) in BlendModeHelper.kt to fix the
UseRequiresApi lint warning. The RequiresApi annotation from AndroidX properly
propagates the API level requirement to callers, while TargetApi only suppresses
the lint warning locally without providing this safety.

Also updated the import from android.annotation.TargetApi to
androidx.annotation.RequiresApi.

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D92022472

fbshipit-source-id: 775bea90ca96ec28af79a841f9dc36a235eaff85
This commit is contained in:
David Vacca authored and meta-codesync[bot] committed 2026-03-02 19:38:15 -08:00
1 parent 6edbf2ee6f
commit 9450489a44
1 file changed
+2 -2
@@ -7,10 +7,10 @@
package com.facebook.react.uimanager
import android.annotation.TargetApi
import android.graphics.BlendMode
import android.os.Build
import android.view.ViewGroup
import androidx.annotation.RequiresApi
import androidx.core.view.children
import com.facebook.react.R
@@ -20,7 +20,7 @@ import com.facebook.react.R
* This object provides utilities to convert CSS mix-blend-mode string values into Android's
* [BlendMode] enumeration and to determine when views need isolated layers for proper blending.
*/
@TargetApi(29)
@RequiresApi(29)
internal object BlendModeHelper {
/**