mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
TurboModule Android: Remove RNTester module lookup override
Summary: The manual lookup logic was needed before we properly parse the module names from the spec js files. This is no longer necessary after the commit stack starting with https://github.com/facebook/react-native/commit/3a75b376cc3c44f9693d99b33046cf76d6fafa89 Changelog: [Internal] Reviewed By: RSNara Differential Revision: D24370567 fbshipit-source-id: fc307d93cdda240a977e37dfe602502bd3f7c2a4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
28e9528c4d
commit
3ed38df175
@@ -25,53 +25,6 @@ std::shared_ptr<TurboModule> RNTesterAppModuleProvider(const std::string moduleN
|
||||
return module;
|
||||
}
|
||||
|
||||
// TODO: fix up the ReactAndroidSpec_ModuleProvider() to avoid the Android prefix.
|
||||
if (moduleName == "DatePicker") {
|
||||
return std::make_shared<NativeDatePickerAndroidSpecJSI>(params);
|
||||
}
|
||||
if (moduleName == "DialogManager") {
|
||||
return std::make_shared<NativeDialogManagerAndroidSpecJSI>(params);
|
||||
}
|
||||
if (moduleName == "ImageLoader") {
|
||||
return std::make_shared<NativeImageLoaderAndroidSpecJSI>(params);
|
||||
}
|
||||
if (moduleName == "Networking") {
|
||||
return std::make_shared<NativeNetworkingAndroidSpecJSI>(params);
|
||||
}
|
||||
if (moduleName == "Permissions") {
|
||||
return std::make_shared<NativePermissionsAndroidSpecJSI>(params);
|
||||
}
|
||||
if (moduleName == "PlatformConstants") {
|
||||
return std::make_shared<NativePlatformConstantsAndroidSpecJSI>(params);
|
||||
}
|
||||
if (moduleName == "StatusBarManager") {
|
||||
return std::make_shared<NativeStatusBarManagerAndroidSpecJSI>(params);
|
||||
}
|
||||
if (moduleName == "Toast") {
|
||||
return std::make_shared<NativeToastAndroidSpecJSI>(params);
|
||||
}
|
||||
|
||||
// TODO: handle some special case naming.
|
||||
if (moduleName == "IntentAndroid") {
|
||||
return std::make_shared<NativeLinkingSpecJSI>(params);
|
||||
}
|
||||
|
||||
// TODO: Animated module has special cases.
|
||||
if ("NativeAnimatedModule" == moduleName) {
|
||||
return std::make_shared<NativeAnimatedModuleSpecJSI>(params);
|
||||
}
|
||||
if ("NativeAnimatedTurboModule" == moduleName) {
|
||||
return std::make_shared<NativeAnimatedTurboModuleSpecJSI>(params);
|
||||
}
|
||||
|
||||
// TODO: handle multiple names for one spec.
|
||||
if ("AsyncLocalStorage" == moduleName) {
|
||||
return std::make_shared<NativeAsyncStorageSpecJSI>(params);
|
||||
}
|
||||
if ("AsyncSQLiteDBStorage" == moduleName) {
|
||||
return std::make_shared<NativeAsyncStorageSpecJSI>(params);
|
||||
}
|
||||
|
||||
return ReactAndroidSpec_ModuleProvider(moduleName, params);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user