mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Convert CxxCallbackImpl to Kotlin (#49004)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49004 This just converts yet another class to Kotlin. Changelog: [Internal] [Changed] - Reviewed By: tdn120 Differential Revision: D68772336 fbshipit-source-id: 428cb3a0d54bf7a22f0e4eb07268cdc27ef6f2c3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
156ee5bee7
commit
362a191aee
@@ -716,7 +716,7 @@ public class com/facebook/react/bridge/ColorPropConverter {
|
||||
public static fun resolveResourcePath (Landroid/content/Context;Ljava/lang/String;)Ljava/lang/Integer;
|
||||
}
|
||||
|
||||
public class com/facebook/react/bridge/CxxCallbackImpl : com/facebook/jni/HybridClassBase, com/facebook/react/bridge/Callback {
|
||||
public final class com/facebook/react/bridge/CxxCallbackImpl : com/facebook/jni/HybridClassBase, com/facebook/react/bridge/Callback {
|
||||
public fun invoke ([Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.bridge;
|
||||
|
||||
import static com.facebook.react.bridge.Arguments.*;
|
||||
|
||||
import com.facebook.jni.HybridClassBase;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
/** Callback impl that calls directly into the cxx bridge. Created from C++. */
|
||||
@DoNotStrip
|
||||
public class CxxCallbackImpl extends HybridClassBase implements Callback {
|
||||
|
||||
@DoNotStrip
|
||||
private CxxCallbackImpl() {}
|
||||
|
||||
@Override
|
||||
public void invoke(Object... args) {
|
||||
nativeInvoke(fromJavaArgs(args));
|
||||
}
|
||||
|
||||
private native void nativeInvoke(NativeArray arguments);
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.bridge
|
||||
|
||||
import com.facebook.jni.HybridClassBase
|
||||
import com.facebook.proguard.annotations.DoNotStrip
|
||||
|
||||
/** Callback impl that calls directly into the cxx bridge. Created from C++. */
|
||||
@DoNotStrip
|
||||
public class CxxCallbackImpl @DoNotStrip private constructor() : HybridClassBase(), Callback {
|
||||
override fun invoke(vararg args: Any?) {
|
||||
nativeInvoke(Arguments.fromJavaArgs(args))
|
||||
}
|
||||
|
||||
private external fun nativeInvoke(arguments: NativeArray)
|
||||
}
|
||||
Reference in New Issue
Block a user