mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Deprecate Legacy Architecture class CallbackImpl (#53105)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53105 Deprecate Legacy Architecture class CallbackImpl changelog: [Android][Changed] Deprecate Legacy Architecture class CallbackImpl Reviewed By: mlord93 Differential Revision: D79672292 fbshipit-source-id: d35ae53093f464f2bb088a8247dbbde8591572c6
This commit is contained in:
committed by
Facebook GitHub Bot
parent
19a99dd088
commit
718126fcf0
+3
@@ -13,6 +13,9 @@ import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger
|
||||
|
||||
/** Implementation of javascript callback function that uses Bridge to schedule method execution. */
|
||||
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
|
||||
@Deprecated(
|
||||
message = "This class is part of Legacy Architecture and will be removed in a future release",
|
||||
level = DeprecationLevel.WARNING)
|
||||
internal class CallbackImpl(private val jsInstance: JSInstance, private val callbackId: Int) :
|
||||
Callback {
|
||||
private var invoked = false
|
||||
|
||||
+1
-1
@@ -324,7 +324,7 @@ internal class JavaMethodWrapper(
|
||||
null
|
||||
} else {
|
||||
val id = jsArguments.getDouble(atIndex).toInt()
|
||||
CallbackImpl(jsInstance, id)
|
||||
@Suppress("DEPRECATION") CallbackImpl(jsInstance, id)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user