-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert EmptyReactNativeConfig to Kotlin (#42286)
Summary: Pull Request resolved: #42286 Convert EmptyReactNativeConfig to Kotlin Changelog: [Internal] [Changed] - Convert EmptyReactNativeConfig to Kotlin Reviewed By: huntie Differential Revision: D52698594 fbshipit-source-id: c4963ff4edc5054d1b78d1c1858e22eb4ef9279e
- Loading branch information
1 parent
cfef30f
commit 0c7008f
Showing
2 changed files
with
26 additions
and
40 deletions.
There are no files selected for viewing
40 changes: 0 additions & 40 deletions
40
...t-native/ReactAndroid/src/main/java/com/facebook/react/fabric/EmptyReactNativeConfig.java
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
...act-native/ReactAndroid/src/main/java/com/facebook/react/fabric/EmptyReactNativeConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |