Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -3906,7 +3906,7 @@ public abstract interface class com/facebook/react/touch/ReactInterceptingViewGr
public final class com/facebook/react/turbomodule/core/CallInvokerHolderImpl : com/facebook/react/turbomodule/core/interfaces/CallInvokerHolder {
}

public class com/facebook/react/turbomodule/core/NativeMethodCallInvokerHolderImpl : com/facebook/react/turbomodule/core/interfaces/NativeMethodCallInvokerHolder {
public final class com/facebook/react/turbomodule/core/NativeMethodCallInvokerHolderImpl : com/facebook/react/turbomodule/core/interfaces/NativeMethodCallInvokerHolder {
}

public abstract interface class com/facebook/react/turbomodule/core/interfaces/CallInvokerHolder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,27 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.turbomodule.core;
package com.facebook.react.turbomodule.core

import com.facebook.infer.annotation.Nullsafe;
import com.facebook.jni.HybridData;
import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.react.common.annotations.FrameworkAPI;
import com.facebook.react.internal.turbomodule.core.NativeModuleSoLoader;
import com.facebook.react.turbomodule.core.interfaces.NativeMethodCallInvokerHolder;
import com.facebook.jni.HybridData
import com.facebook.proguard.annotations.DoNotStrip
import com.facebook.react.common.annotations.FrameworkAPI
import com.facebook.react.internal.turbomodule.core.NativeModuleSoLoader
import com.facebook.react.turbomodule.core.interfaces.NativeMethodCallInvokerHolder

/**
* NativeMethodCallInvokerHolder is created at a different time/place (i.e: in CatalystInstance)
* than TurboModuleManager. Therefore, we need to wrap NativeMethodCallInvokerHolder within a hybrid
* class so that we may pass it from CatalystInstance, through Java, to
* TurboModuleManager::initHybrid.
*/
@Nullsafe(Nullsafe.Mode.LOCAL)
@FrameworkAPI
public class NativeMethodCallInvokerHolderImpl implements NativeMethodCallInvokerHolder {

@DoNotStrip private final HybridData mHybridData;

static {
NativeModuleSoLoader.maybeLoadSoLibrary();
}

private NativeMethodCallInvokerHolderImpl(HybridData hd) {
mHybridData = hd;
public class NativeMethodCallInvokerHolderImpl
private constructor(@field:DoNotStrip private val mHybridData: HybridData) :
NativeMethodCallInvokerHolder {
private companion object {
init {
NativeModuleSoLoader.maybeLoadSoLibrary()
}
}
}