Remove unused feature flag: logDroppedViews

Summary:
Remove unused internal feature flag, logDroppedViews.

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D20797353

fbshipit-source-id: 1bfea7fcce9e80cdb92cda59a89c7dd817d4a581
This commit is contained in:
Joshua Gross 2020-04-01 17:04:00 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 00ed57eb91
Коммит eab7fc008f
2 изменённых файлов: 1 добавлений и 27 удалений

Просмотреть файл

@ -23,12 +23,6 @@ public class ReactFeatureFlags {
*/
public static volatile boolean useTurboModules = false;
/**
* Log tags of when a view deleted on the native side {@link
* com.facebook.react.uimanager.NativeViewHierarchyManager dropView}
*/
public static boolean logDroppedViews = false;
/*
* This feature flag enables logs for Fabric
*/

Просмотреть файл

@ -29,13 +29,11 @@ import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.RetryableMountingLayerException;
import com.facebook.react.bridge.SoftAssertions;
import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.config.ReactFeatureFlags;
import com.facebook.react.touch.JSResponderHandler;
import com.facebook.react.uimanager.layoutanimation.LayoutAnimationController;
import com.facebook.react.uimanager.layoutanimation.LayoutAnimationListener;
import com.facebook.systrace.Systrace;
import com.facebook.systrace.SystraceMessage;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
@ -78,12 +76,10 @@ public class NativeViewHierarchyManager {
private final JSResponderHandler mJSResponderHandler = new JSResponderHandler();
private final RootViewManager mRootViewManager;
private final LayoutAnimationController mLayoutAnimator = new LayoutAnimationController();
private final int[] mDroppedViewArray = new int[100];
private final RectF mBoundingBox = new RectF();
private boolean mLayoutAnimationEnabled;
private PopupMenu mPopupMenu;
private int mDroppedViewIndex = 0;
private HashMap<Integer, Set<Integer>> mPendingDeletionsForTag;
public NativeViewHierarchyManager(ViewManagerRegistry viewManagers) {
@ -110,16 +106,8 @@ public class NativeViewHierarchyManager {
public final synchronized ViewManager resolveViewManager(int tag) {
ViewManager viewManager = mTagsToViewManagers.get(tag);
if (viewManager == null) {
boolean alreadyDropped = Arrays.asList(mDroppedViewArray).contains(tag);
throw new IllegalViewOperationException(
"ViewManager for tag "
+ tag
+ " could not be found.\n View already dropped? "
+ alreadyDropped
+ ".\nLast index "
+ mDroppedViewIndex
+ " in last 100 views"
+ mDroppedViewArray.toString());
"ViewManager for tag " + tag + " could not be found.\n");
}
return viewManager;
}
@ -591,11 +579,6 @@ public class NativeViewHierarchyManager {
view.setId(tag);
}
private void cacheDroppedTag(int tag) {
mDroppedViewArray[mDroppedViewIndex] = tag;
mDroppedViewIndex = (mDroppedViewIndex + 1) % 100;
}
/** Releases all references to given native View. */
protected synchronized void dropView(View view) {
UiThreadUtil.assertOnUiThread();
@ -603,9 +586,6 @@ public class NativeViewHierarchyManager {
// Ignore this drop operation when view is null.
return;
}
if (ReactFeatureFlags.logDroppedViews) {
cacheDroppedTag(view.getId());
}
if (mTagsToViewManagers.get(view.getId()) == null) {
// This view has already been dropped (likely due to a threading issue caused by async js
// execution). Ignore this drop operation.