Return null when requesting constants for nonexistent View Managers in RN Android

Summary:
This diff changes the behavior of UIImplementation.resolveViewManager() to return null instead of throwing an exception when trying to find an unexistent viewManager during the computation of constants for view Managers.

The C++/JS code manages exceptions and null results when a view manager doesn't exists, this diff simplifies the way this method operates.

changeLog: [internal]

Reviewed By: rickhanlonii

Differential Revision: D19624423

fbshipit-source-id: df31dcfae9a588bf325b61d529cec6ead59fb19d
This commit is contained in:
David Vacca
2020-01-31 17:04:02 -08:00
committed by Facebook Github Bot
parent d3b2ac3a84
commit e4194a20a7
2 changed files with 37 additions and 7 deletions
@@ -128,8 +128,8 @@ public class UIImplementation {
return mShadowNodeRegistry.getNode(reactTag);
}
protected final ViewManager resolveViewManager(String className) {
return mViewManagers.get(className);
protected final @Nullable ViewManager resolveViewManager(String className) {
return mViewManagers.getViewManagerIfExists(className);
}
/*package*/ UIViewOperationQueue getUIViewOperationQueue() {