mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Reduce visibility of NativeModule methods in ReactHost (#37692)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37692 In this diff I'm reducing visibility of NativeModule methods in ReactHost (from public to package) bypass-github-export-checks changelog: [internal] ineternal Reviewed By: cortinico, philIip, RSNara Differential Revision: D46296987 fbshipit-source-id: d50ff9f855c71ee9565f0bc81ffe8be2fd0e2368
This commit is contained in:
committed by
Facebook GitHub Bot
parent
579d11ca9e
commit
f821797e51
+4
-3
@@ -452,7 +452,7 @@ public class ReactHost {
|
||||
return reactInstance.getUIManager();
|
||||
}
|
||||
|
||||
public <T extends NativeModule> boolean hasNativeModule(Class<T> nativeModuleInterface) {
|
||||
/* package */ <T extends NativeModule> boolean hasNativeModule(Class<T> nativeModuleInterface) {
|
||||
final ReactInstance reactInstance = mReactInstanceTaskRef.get().getResult();
|
||||
if (reactInstance != null) {
|
||||
return reactInstance.hasNativeModule(nativeModuleInterface);
|
||||
@@ -460,7 +460,7 @@ public class ReactHost {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Collection<NativeModule> getNativeModules() {
|
||||
/* package */ Collection<NativeModule> getNativeModules() {
|
||||
final ReactInstance reactInstance = mReactInstanceTaskRef.get().getResult();
|
||||
if (reactInstance != null) {
|
||||
return reactInstance.getNativeModules();
|
||||
@@ -468,7 +468,8 @@ public class ReactHost {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
public @Nullable <T extends NativeModule> T getNativeModule(Class<T> nativeModuleInterface) {
|
||||
/* package */ @Nullable
|
||||
<T extends NativeModule> T getNativeModule(Class<T> nativeModuleInterface) {
|
||||
if (nativeModuleInterface == UIManagerModule.class) {
|
||||
ReactSoftExceptionLogger.logSoftExceptionVerbose(
|
||||
TAG,
|
||||
|
||||
Reference in New Issue
Block a user