Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,27 @@ public ViewManagerRegistry(Map<String, ViewManager> viewManagerMap) {
* @return the {@link ViewManager} registered to the className received as a parameter
*/
public synchronized ViewManager get(String className) {
// 1. Try to get the manager without the prefix.
ViewManager viewManager = mViewManagers.get(className);
if (viewManager != null) {
return viewManager;
}

// 2. Try to get the manager with the RCT prefix.
String rctViewManagerName = "RCT" + className;
viewManager = mViewManagers.get(rctViewManagerName);
if (viewManager != null) {
return viewManager;
}
if (mViewManagerResolver != null) {
// 1. Try to get the manager without the prefix.
viewManager = getViewManagerFromResolver(className);
if (viewManager != null) return viewManager;

// 2. Try to get the manager with the RCT prefix.
viewManager = getViewManagerFromResolver(rctViewManagerName);
if (viewManager != null) return viewManager;

throw new IllegalViewOperationException(
"ViewManagerResolver returned null for "
+ className
Expand Down