Include instanceHandle in cloning mechanism

Reviewed By: shergin, achen1

Differential Revision: D8072075

fbshipit-source-id: 2fcfdfa5116850ce0bac6c2c86d87e5bf00fd7f0
This commit is contained in:
David Vacca authored and Facebook Github Bot committed 2018-05-30 22:06:40 -07:00
1 parent 40c7248345
commit 23fbd312aa
13 files changed
+126 -73

No files matched your search

@@ -221,16 +221,16 @@ public class NativeViewHierarchyManager {
@Nullable
@TargetApi(Build.VERSION_CODES.DONUT)
public long getInstanceHandle(int targetTag) {
public long getInstanceHandle(int reactTag) {
UiThreadUtil.assertOnUiThread();
View view = mTagsToViews.get(targetTag);
View view = mTagsToViews.get(reactTag);
if (view == null) {
throw new IllegalArgumentException("Unable to find view for tag: " + targetTag);
throw new IllegalArgumentException("Unable to find view for tag: " + reactTag);
}
Long tag = (Long) view.getTag(R.id.view_tag_instance_handle);
if (tag == null) {
throw new IllegalArgumentException("Unable to find instanceHandle for tag: " + targetTag);
throw new IllegalArgumentException("Unable to find instanceHandle for tag: " + reactTag);
}
return tag;
}