Keep UIManagerModule as a default renderer
Reviewed By: fkgozali Differential Revision: D8439626 fbshipit-source-id: d761d977c9e6dab38f21e18da72b045483431f79
This commit is contained in:
parent
5230b23130
commit
3bc62f3610
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue