mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Include instanceHandle in cloning mechanism
Reviewed By: shergin, achen1 Differential Revision: D8072075 fbshipit-source-id: 2fcfdfa5116850ce0bac6c2c86d87e5bf00fd7f0
This commit is contained in:
1 parent
40c7248345
commit
23fbd312aa
13 files changed
+126
-73
No files matched your search
+4
-4
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user