forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make default classes load their own so's
Summary: Make the DefaultTurboModuleManagerDelegate and the DefaultComponentRegistry load their own so's when they're created. **Motivation:** We are going to use these two classes in Meta apps. And Meta apps will not invoke DefaultNewArchitectureEntryPoint.load. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D51036133
- Loading branch information
1 parent
46c8a51
commit 7186374
Showing
4 changed files
with
38 additions
and
7 deletions.
There are no files selected for viewing
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
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
27 changes: 27 additions & 0 deletions
27
...es/react-native/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultSoLoader.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,27 @@ | ||
/* | ||
* 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.defaults | ||
|
||
import com.facebook.soloader.SoLoader | ||
import com.facebook.soloader.SoLoaderDSONotFoundError | ||
|
||
internal class DefaultSoLoader { | ||
companion object { | ||
@Synchronized | ||
@JvmStatic | ||
fun maybeLoadSoLibrary() { | ||
SoLoader.loadLibrary("react_newarchdefaults") | ||
try { | ||
SoLoader.loadLibrary("appmodules") | ||
} catch (e: SoLoaderDSONotFoundError) { | ||
// ignore: DefaultTurboModuleManagerDelegate is still used in apps that don't have | ||
// appmodules.so | ||
} | ||
} | ||
} | ||
} |
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