From dc74975c5faad1a5f4d3685679394308ca8f6b24 Mon Sep 17 00:00:00 2001 From: "Andrew Chen (Eng)" Date: Wed, 24 Oct 2018 13:06:48 -0700 Subject: [PATCH] Remove hard crash when root view is reused Summary: Alternative to D10499861. If an app does not have an exception handler, context.handleException will still hard crash. Since this error is just saying that we're reusing an unexpected RootView, it might be safe to continue execution. Let's remove the exception for now while we investigate further Reviewed By: mmmulani Differential Revision: D10560413 fbshipit-source-id: 6c08a16cd250a019d2aef5afcaf3ba61534d29f7 --- .../react/uimanager/NativeViewHierarchyManager.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java index 280034983eb..0176c529048 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java @@ -543,12 +543,12 @@ public class NativeViewHierarchyManager { ViewGroup view, ThemedReactContext themedContext) { if (view.getId() != View.NO_ID) { - themedContext.handleException( - new IllegalViewOperationException( - "Trying to add a root view with an explicit id (" + view.getId() + ") already " + - "set. React Native uses the id field to track react tags and will overwrite this field. " + - "If that is fine, explicitly overwrite the id field to View.NO_ID before calling " + - "addRootView.")); + FLog.e( + TAG, + "Trying to add a root view with an explicit id (" + view.getId() + ") already " + + "set. React Native uses the id field to track react tags and will overwrite this field. " + + "If that is fine, explicitly overwrite the id field to View.NO_ID before calling " + + "addRootView."); } mTagsToViews.put(tag, view);