diff --git a/ipc/native/src/mock/include/dbinder_base_invoker_object.h b/ipc/native/src/mock/include/dbinder_base_invoker_object.h index e7874828..04d1cead 100644 --- a/ipc/native/src/mock/include/dbinder_base_invoker_object.h +++ b/ipc/native/src/mock/include/dbinder_base_invoker_object.h @@ -200,10 +200,12 @@ bool DBinderBaseInvoker::IRemoteObjectTranslateWhenRcv(char *dataBuffer, bind ZLOGE(LOG_LABEL, "fail to translate big raw data"); // do nothing } + binderObject->handle = -1; break; } default: { ZLOGE(LOG_LABEL, "do not support this type:%{public}u of translation", binderObject->hdr.type); + binderObject->hdr.type = BINDER_TYPE_INVALID_TYPE; // do nothing break; } diff --git a/ipc/native/src/mock/include/sys_binder.h b/ipc/native/src/mock/include/sys_binder.h index a5e71e4f..7e928892 100644 --- a/ipc/native/src/mock/include/sys_binder.h +++ b/ipc/native/src/mock/include/sys_binder.h @@ -282,6 +282,7 @@ enum { BINDER_TYPE_FDR = B_PACK_CHARS('f', 'd', 'r', B_TYPE_LARGE), BINDER_TYPE_INVALID_HANDLE = B_PACK_CHARS('r', 'h', 'e', B_TYPE_LARGE), BINDER_TYPE_INVALID_BINDER = B_PACK_CHARS('r', 'b', 'e', B_TYPE_LARGE), + BINDER_TYPE_INVALID_TYPE = B_PACK_CHARS('r', 't', 'e', B_TYPE_LARGE), }; struct binder_ptr_count {