Keep UIManagerModule as a default renderer

Reviewed By: fkgozali

Differential Revision: D8439626

fbshipit-source-id: d761d977c9e6dab38f21e18da72b045483431f79
This commit is contained in:
David Vacca 2018-06-14 22:44:57 -07:00 committed by Facebook Github Bot
parent 5230b23130
commit 3bc62f3610
1 changed files with 3 additions and 12 deletions

View File

@ -26,18 +26,9 @@ public class UIManagerHelper {
*/
public static UIManager getUIManager(ReactContext context, @UIManagerType int uiManagerType) {
CatalystInstance catalystInstance = context.getCatalystInstance();
UIManager uiManager;
switch (uiManagerType) {
case FABRIC:
uiManager = catalystInstance.getJSIModule(UIManager.class);
break;
case DEFAULT:
uiManager = catalystInstance.getNativeModule(UIManagerModule.class);
break;
default:
throw new IllegalArgumentException("Invalid UIManagerType: " + uiManagerType);
}
return uiManager;
return uiManagerType == FABRIC ?
catalystInstance.getJSIModule(UIManager.class) :
catalystInstance.getNativeModule(UIManagerModule.class);
}
}