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 @@ -7,6 +7,7 @@

package com.facebook.react.uimanager;

import android.annotation.SuppressLint;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.graphics.RectF;
Expand Down Expand Up @@ -76,6 +77,9 @@ public class NativeViewHierarchyManager {
}

private static final String TAG = NativeViewHierarchyManager.class.getSimpleName();

// Debug mode is intentionally disabled (false). To enable, change to just ReactBuildConfig.DEBUG
@SuppressLint("ClownyBooleanExpression")
private final boolean DEBUG_MODE = ReactBuildConfig.DEBUG && false;

private final SparseArray<View> mTagsToViews;
Expand Down Expand Up @@ -248,7 +252,6 @@ private void updateInstanceHandle(View viewToUpdate, long instanceHandle) {
viewToUpdate.setTag(R.id.view_tag_instance_handle, instanceHandle);
}

@Nullable
public synchronized long getInstanceHandle(int reactTag) {
View view = mTagsToViews.get(reactTag);
if (view == null) {
Expand Down Expand Up @@ -523,18 +526,6 @@ public synchronized void manageChildren(
}
}

private boolean arrayContains(@Nullable int[] array, int ele) {
if (array == null) {
return false;
}
for (int curEle : array) {
if (curEle == ele) {
return true;
}
}
return false;
}

/**
* Simplified version of constructManageChildrenErrorMessage that only deals with adding children
* views
Expand Down Expand Up @@ -851,18 +842,6 @@ public synchronized void dispatchCommand(
viewManager.receiveCommand(view, commandId, args);
}

/**
* @return Themed React context for view with a given {@param reactTag} - it gets the context
* directly from the view using {@link View#getContext}.
*/
private ThemedReactContext getReactContextForView(int reactTag) {
View view = mTagsToViews.get(reactTag);
if (view == null) {
throw new JSApplicationIllegalArgumentException("Could not find view with tag " + reactTag);
}
return (ThemedReactContext) view.getContext();
}

public synchronized void sendAccessibilityEvent(int tag, int eventType) {
View view = mTagsToViews.get(tag);
if (view == null) {
Expand Down
Loading