update frameworks/asacfwk/src/accessibility_system_ability_client_impl.cpp.

Signed-off-by: zpf <zhupengfei26@huawei.com>
This commit is contained in:
zpf 2024-03-08 07:50:24 +00:00 committed by Gitee
parent b5a558473a
commit 767c84ce13
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -206,14 +206,14 @@ RetError AccessibilitySystemAbilityClientImpl::RegisterElementOperator(
auto iter = elementOperators_.find(windowId);
if (iter != elementOperators_.end()) {
HILOG_ERROR("windowID[%{public}d] is exited", windowId);
return RET_OK;
return RET_ERR_CONNECTION_EXIST;
}
sptr<AccessibilityElementOperatorImpl> aamsInteractionOperator =
new(std::nothrow) AccessibilityElementOperatorImpl(windowId, operation, *this);
if (!aamsInteractionOperator) {
HILOG_ERROR("Failed to create aamsInteractionOperator.");
return RET_OK;
return RET_ERR_NULLPTR;
}
elementOperators_[windowId] = aamsInteractionOperator;
return serviceProxy_->RegisterElementOperator(windowId, aamsInteractionOperator);