diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/EmptyReactNativeConfig.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/EmptyReactNativeConfig.java deleted file mode 100644 index 57f2856dc35184..00000000000000 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/EmptyReactNativeConfig.java +++ /dev/null @@ -1,40 +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.fabric; - -import androidx.annotation.NonNull; -import com.facebook.jni.HybridData; -import com.facebook.proguard.annotations.DoNotStripAny; - -/** - * An empty {@link ReactNativeConfig} that is backed by the C++ implementation where the defaults - * are store. - */ -@DoNotStripAny -public class EmptyReactNativeConfig implements ReactNativeConfig { - - @NonNull private final HybridData mHybridData; - - private static native HybridData initHybrid(); - - public EmptyReactNativeConfig() { - mHybridData = initHybrid(); - } - - @Override - public native boolean getBool(final String param); - - @Override - public native long getInt64(final String param); - - @Override - public native String getString(final String param); - - @Override - public native double getDouble(final String param); -} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/EmptyReactNativeConfig.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/EmptyReactNativeConfig.kt new file mode 100644 index 00000000000000..71e3930d129341 --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/EmptyReactNativeConfig.kt @@ -0,0 +1,26 @@ +/* + * 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.fabric + +import com.facebook.jni.HybridData +import com.facebook.proguard.annotations.DoNotStripAny + +/** + * An empty [ReactNativeConfig] that is backed by the C++ implementation where the defaults + * are stored. + */ +@DoNotStripAny +class EmptyReactNativeConfig : ReactNativeConfig { + private val mHybridData: HybridData = initHybrid() + + private external fun initHybrid(): HybridData + + external override fun getBool(param: String): Boolean + external override fun getInt64(param: String): Long + external override fun getString(param: String): String + external override fun getDouble(param: String): Double +}