mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Kotlinify ComponentFactory (#43783)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43783 Changelog: [Internal] As part of the Sustainability Week (see [post](https://fb.workplace.com/groups/251759413609061/permalink/742797531171911/)). Reviewed By: alanleedev Differential Revision: D55643354 fbshipit-source-id: de6b676ae138f823c0521f1dcc48f3bcb7fd4e04
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3856a46946
commit
08af9eaa29
@@ -2488,7 +2488,7 @@ public class com/facebook/react/fabric/BindingImpl : com/facebook/react/fabric/B
|
||||
public fun unregisterSurface (Lcom/facebook/react/fabric/SurfaceHandlerBinding;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/fabric/ComponentFactory {
|
||||
public final class com/facebook/react/fabric/ComponentFactory {
|
||||
public fun <init> ()V
|
||||
}
|
||||
|
||||
|
||||
-32
@@ -1,32 +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.infer.annotation.Nullsafe;
|
||||
import com.facebook.jni.HybridData;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
@Nullsafe(Nullsafe.Mode.LOCAL)
|
||||
@DoNotStrip
|
||||
public class ComponentFactory {
|
||||
|
||||
static {
|
||||
FabricSoLoader.staticInit();
|
||||
}
|
||||
|
||||
@NonNull @DoNotStrip private final HybridData mHybridData;
|
||||
|
||||
@DoNotStrip
|
||||
private static native HybridData initHybrid();
|
||||
|
||||
@DoNotStrip
|
||||
public ComponentFactory() {
|
||||
mHybridData = initHybrid();
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
@DoNotStripAny
|
||||
public class ComponentFactory {
|
||||
|
||||
@Suppress("NoHungarianNotation") private val mHybridData: HybridData = initHybrid()
|
||||
|
||||
private companion object {
|
||||
init {
|
||||
FabricSoLoader.staticInit()
|
||||
}
|
||||
|
||||
@JvmStatic private external fun initHybrid(): HybridData
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user