!1545 修改创建panel时获取SCB使能状态

Merge pull request !1545 from mashaoyin/master
This commit is contained in:
openharmony_ci 2024-10-30 07:51:53 +00:00 committed by Gitee
commit ae3e9fedee
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -71,20 +71,18 @@ int32_t InputMethodPanel::CreatePanel(const std::shared_ptr<AbilityRuntime::Cont
IMSA_HILOGE("create window failed: %{public}d!", wmError);
return ErrorCode::ERROR_OPERATE_PANEL;
}
isScbEnable_ = Rosen::SceneBoardJudgement::IsSceneBoardEnabled();
if (SetPanelProperties() != ErrorCode::NO_ERROR) {
wmError = window_->Destroy();
IMSA_HILOGI("destroy window end, wmError is %{public}d.", wmError);
return ErrorCode::ERROR_OPERATE_PANEL;
}
windowId_ = window_->GetWindowId();
IMSA_HILOGI("success, type/flag/windowId: %{public}d/%{public}d/%{public}u.", static_cast<int32_t>(panelType_),
static_cast<int32_t>(panelFlag_), windowId_);
if (panelInfo.panelType == SOFT_KEYBOARD) {
isScbEnable_ = Rosen::SceneBoardJudgement::IsSceneBoardEnabled();
if (isScbEnable_) {
IMSA_HILOGI("success, type/flag/windowId/isScbEnable_: %{public}d/%{public}d/%{public}u/%{public}d.",
static_cast<int32_t>(panelType_), static_cast<int32_t>(panelFlag_), windowId_, isScbEnable_);
if (panelInfo.panelType == SOFT_KEYBOARD && isScbEnable_) {
RegisterKeyboardPanelInfoChangeListener();
}
}
return ErrorCode::NO_ERROR;
}