模应用 uint8_t 解析问题

Signed-off-by: 苏嵋岩 <sumeiyan@huawei.com>
This commit is contained in:
苏嵋岩 2024-09-27 10:37:56 +08:00
parent f1f8f205b9
commit 14518ae6cd
2 changed files with 3 additions and 3 deletions

View File

@ -5958,7 +5958,7 @@ napi_value JsWindow::OnSetSubWindowModal(napi_env env, napi_callback_info info)
}
if (type >= static_cast<T>(ApiModalityType::BEGIN) &&
type <= static_cast<T>(ApiModalityType::END)) {
modalityType = JS_TO_NATIVE_MODALITY_TYPE_MAP.at(static_cast<ApiModalityType>(type));
modalityType = JS_TO_NATIVE_MODALITY_TYPE_MAP.at(type);
} else {
TLOGE(WmsLogTag::WMS_SUB, "Failed to convert parameter to modalityType");
return NapiThrowError(env, WmErrorCode::WM_ERROR_INVALID_PARAM);
@ -6037,7 +6037,7 @@ napi_value JsWindow::OnSetWindowDecorHeight(napi_env env, napi_callback_info inf
WLOGFE("Set window decor height failed");
return NapiThrowError(env, ret);
}
WLOGI("Window [%{public}u, %{public}s] OnSetDecorHeight end, height = %{public}u",
WLOGI("Window [%{public}u, %{public}s] OnSetDecorHeight end, height = %{public}d",
windowToken_->GetWindowId(), windowToken_->GetWindowName().c_str(), height);
return NapiGetUndefined(env);
}

View File

@ -1110,7 +1110,7 @@ static bool ParseModalityParam(napi_env env, napi_value jsObject, const sptr<Win
if (modalityType >= static_cast<T>(ApiModalityType::BEGIN) &&
modalityType <= static_cast<T>(ApiModalityType::END)) {
TLOGI(WmsLogTag::WMS_SUB, "Normal subwindow modalityType: %{public}u", modalityType);
auto type = JS_TO_NATIVE_MODALITY_TYPE_MAP.at(static_cast<ApiModalityType>(modalityType));
auto type = JS_TO_NATIVE_MODALITY_TYPE_MAP.at(modalityType);
if (type == ModalityType::APPLICATION_MODALITY) {
windowOption->AddWindowFlag(WindowFlag::WINDOW_FLAG_IS_APPLICATION_MODAL);
}