Skip to content

Commit

Permalink
fix(android): update NativeRenderer log
Browse files Browse the repository at this point in the history
  • Loading branch information
siguangli2018 committed Aug 17, 2023
1 parent 17f9dff commit 046ca8e
Showing 1 changed file with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ public void dispatchEvent(int rootId, int nodeId, @NonNull String eventName,
rootId, nodeId, lowerCaseEventName)) {
return;
}
LogUtils.d(TAG, "dispatchEvent: id " + nodeId + ", eventName " + eventName
+ ", eventType " + eventType + ", params " + params + "\n ");
mRenderProvider.dispatchEvent(rootId, nodeId, lowerCaseEventName, params, useCapture,
useBubble);
}
Expand Down Expand Up @@ -478,9 +480,8 @@ public void createNode(final int rootId, @NonNull List<Object> nodeList)
}
final Map<String, Object> props = MapUtils.getMapValue(node, NODE_PROPS);
LogUtils.d(TAG, "createNode: id " + nodeId + ", pid " + nodePid
+ ", index " + nodeIndex + ", name " + className);
LogUtils.d(TAG, "props " + props);
LogUtils.d(TAG, " ");
+ ", index " + nodeIndex + ", name " + className + "\n props " + props
+ "\n ");
mVirtualNodeManager.createNode(rootId, nodeId, nodePid, nodeIndex, className, props);
// If multiple level are nested, the parent is outermost text node.
VirtualNode parent = mVirtualNodeManager.checkVirtualParent(rootId, nodeId);
Expand Down Expand Up @@ -558,8 +559,8 @@ public void updateNode(final int rootId, @NonNull List<Object> nodeList)
final Map<String, Object> diffProps = MapUtils.getMapValue(node, NODE_PROPS);
final List<Object> delProps = MapUtils.getListValue(node, NODE_DELETE_PROPS);
LogUtils.d(TAG,
"updateNode: id " + nodeId + ", diff " + diffProps + ", delete " + delProps);
LogUtils.d(TAG, " ");
"updateNode: id " + nodeId + ", diff " + diffProps + ", delete " + delProps
+ "\n ");
mVirtualNodeManager.updateNode(rootId, nodeId, diffProps, delProps);
// If multiple level are nested, the parent is outermost text node.
VirtualNode parent = mVirtualNodeManager.checkVirtualParent(rootId, nodeId);
Expand Down Expand Up @@ -589,8 +590,7 @@ public void exec() {
@Override
public void deleteNode(final int rootId, @NonNull int[] ids) throws NativeRenderException {
final List<UITaskExecutor> taskList = new ArrayList<>(ids.length);
LogUtils.d(TAG, "deleteNode " + Arrays.toString(ids));
LogUtils.d(TAG, " ");
LogUtils.d(TAG, "deleteNode " + Arrays.toString(ids) + "\n ");
for (final int nodeId : ids) {
// The node id should not be negative number.
if (nodeId < 0) {
Expand Down Expand Up @@ -635,8 +635,7 @@ public void exec() {

@Override
public void moveNode(final int rootId, final int pid, @NonNull final List<Object> list) {
LogUtils.d(TAG, "moveNode: pid " + pid + ", node list " + list);
LogUtils.d(TAG, " ");
LogUtils.d(TAG, "moveNode: pid " + pid + ", node list " + list + "\n ");
VirtualNode parent = mVirtualNodeManager.getVirtualNode(rootId, pid);
if (parent == null) {
addUITask(new UITaskExecutor() {
Expand Down Expand Up @@ -764,8 +763,7 @@ public void callUIFunction(final int rootId, final int nodeId, final long callba
}
LogUtils.d(TAG,
"callUIFunction: id " + nodeId + ", functionName " + functionName + ", params"
+ params);
LogUtils.d(TAG, " ");
+ params + "\n ");
// If callbackId equal to 0 mean this call does not need to callback.
final UIPromise promise =
(callbackId == 0) ? null : new UIPromise(callbackId, functionName, rootId, nodeId,
Expand Down

0 comments on commit 046ca8e

Please sign in to comment.