diff --git a/frameworks/native/backup_ext/src/ext_backup_js.cpp b/frameworks/native/backup_ext/src/ext_backup_js.cpp index 40a07be500f18fc6e2c48397535b0ba86ff853ed..4393c02eb6b890a7cc78d816376e3cf12402d945 100644 --- a/frameworks/native/backup_ext/src/ext_backup_js.cpp +++ b/frameworks/native/backup_ext/src/ext_backup_js.cpp @@ -415,11 +415,7 @@ ErrCode ExtBackupJs::OnRestore(function callback) ErrCode ExtBackupJs::CallJSRestoreEx(napi_env env, napi_value val) { - bool isExist; - napi_status status = napi_has_named_property(env, val, "onRestoreEx", &isExist); - if (status != napi_ok) { - HILOGI("Js method onRestoreEx status err"); - } + HILOGI("Start call app js method onRestoreEx"); auto retParser = [jsRuntime {&jsRuntime_}, callbackInfoEx {callbackInfoEx_}](napi_env envir, napi_value result) -> bool { if (!CheckPromise(envir, result)) { @@ -450,16 +446,7 @@ ErrCode ExtBackupJs::CallJSRestoreEx(napi_env env, napi_value val) ErrCode ExtBackupJs::CallJSRestore(napi_env env, napi_value val) { - bool isExist; - napi_status status = napi_has_named_property(env, val, "onRestore", &isExist); - if (status != napi_ok) { - HILOGI("Js method onRestore status err"); - } - if (!isExist) { - HILOGI("Js method onRestore is not exist"); - return ErrCode(BError::Codes::EXT_METHOD_NOT_EXIST); - } - HILOGI("Js method onRestore is exist"); + HILOGI("Start call app js method onRestore"); auto retParser = [jsRuntime {&jsRuntime_}, callbackInfo {callbackInfo_}](napi_env env, napi_value result) -> bool { if (!CheckPromise(env, result)) { HILOGI("onRestore, CheckPromise false"); diff --git a/frameworks/native/backup_ext/src/ext_extension.cpp b/frameworks/native/backup_ext/src/ext_extension.cpp index 1b4bc623d4ab91e884d1a59be6070ba92b2f6301..156fb8697e09163db0c1f476f36e271d170fe332 100644 --- a/frameworks/native/backup_ext/src/ext_extension.cpp +++ b/frameworks/native/backup_ext/src/ext_extension.cpp @@ -1425,7 +1425,7 @@ static ErrCode IncrementalBigFileReady(const TarMap &pkgInfo, ret = proxy->AppIncrementalFileReady(item.first, std::move(fd), UniqueFd(open(file.data(), O_RDONLY))); if (SUCCEEDED(ret)) { - HILOGI("IncrementalBigFileReady:The application is packaged successfully, package name is %{public}s", + HILOGI("IncrementalBigFileReady: The application is packaged successfully, package name is %{public}s", item.first.c_str()); RemoveFile(file); } else {