修改检视意见

Signed-off-by: Ning Yuanfeng <Nyuanfeng@163.com>
This commit is contained in:
Ning Yuanfeng 2024-09-25 14:55:31 +08:00
parent f4d8d0255a
commit 7af2146cb6
2 changed files with 6 additions and 6 deletions

View File

@ -195,10 +195,10 @@ napi_value JsPipManager::SetPipNodeType(napi_env env, napi_callback_info info)
napi_value JsPipManager::OnSetPipNodeType(napi_env env, napi_callback_info info)
{
TLOGD(WmsLogTag::WMS_PIP, "[NAPI]");
size_t argc = 4;
napi_value argv[4] = {nullptr};
size_t argc = 4; // 4: arg number
napi_value argv[4] = { nullptr };
napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr);
if (argc < NUMBER_TWO) {
if (argc != NUMBER_TWO) {
TLOGE(WmsLogTag::WMS_PIP, "[NAPI]Argc count is invalid: %{public}zu", argc);
return NapiGetUndefined(env);
}

View File

@ -99,12 +99,12 @@ export class PiPContent extends ViewPU {
return;
}
this.useNode = true;
let p = this.xComponent.getParent();
if (p === null || p === undefined) {
let parent = this.xComponent.getParent();
if (parent === null || parent === undefined) {
pip.setPipNodeType(this.xComponent, false);
} else {
pip.setPipNodeType(this.xComponent, true);
p.removeChild(this.xComponent);
parent.removeChild(this.xComponent);
}
pip.setTypeNodeEnabled();
this.mXCNodeController = new XCNodeController(this.xComponent);