Skip to content

Commit 9450489

Browse files
mdvaccameta-codesync[bot]
authored andcommitted
Fix UseRequiresApi: Replace @TargetApi with @RequiresApi (facebook#55507)
Summary: Pull Request resolved: facebook#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
1 parent 6edbf2e commit 9450489

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BlendModeHelper.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
package com.facebook.react.uimanager
99

10-
import android.annotation.TargetApi
1110
import android.graphics.BlendMode
1211
import android.os.Build
1312
import android.view.ViewGroup
13+
import androidx.annotation.RequiresApi
1414
import androidx.core.view.children
1515
import com.facebook.react.R
1616

@@ -20,7 +20,7 @@ import com.facebook.react.R
2020
* This object provides utilities to convert CSS mix-blend-mode string values into Android's
2121
* [BlendMode] enumeration and to determine when views need isolated layers for proper blending.
2222
*/
23-
@TargetApi(29)
23+
@RequiresApi(29)
2424
internal object BlendModeHelper {
2525

2626
/**

0 commit comments

Comments
 (0)