!896 无障碍修改PRIu

Merge pull request !896 from wangjin_123/0108duandi
This commit is contained in:
openharmony_ci 2024-01-19 07:27:05 +00:00 committed by Gitee
commit 42e4b36ab7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
8 changed files with 34 additions and 34 deletions

View File

@ -81,7 +81,7 @@ RetError AccessibleAbilityChannelProxy::SearchElementInfoByAccessibilityId(const
return RET_ERR_IPC_FAILED;
}
if (!data.WriteInt64(elementId)) {
HILOG_ERROR("elementId write error: %{public}" PRIu64 "", elementId);
HILOG_ERROR("elementId write error: %{public}" PRId64 "", elementId);
return RET_ERR_IPC_FAILED;
}
if (!data.WriteInt32(requestId)) {
@ -128,7 +128,7 @@ RetError AccessibleAbilityChannelProxy::SearchElementInfosByText(const int32_t a
return RET_ERR_IPC_FAILED;
}
if (!data.WriteInt64(elementId)) {
HILOG_ERROR("elementId write error: %{public}" PRIu64 "", elementId);
HILOG_ERROR("elementId write error: %{public}" PRId64 "", elementId);
return RET_ERR_IPC_FAILED;
}
if (!data.WriteString(text)) {
@ -174,7 +174,7 @@ RetError AccessibleAbilityChannelProxy::FindFocusedElementInfo(const int32_t acc
return RET_ERR_IPC_FAILED;
}
if (!data.WriteInt64(elementId)) {
HILOG_ERROR("elementId write error: %{public}" PRIu64 "", elementId);
HILOG_ERROR("elementId write error: %{public}" PRId64 "", elementId);
return RET_ERR_IPC_FAILED;
}
if (!data.WriteInt32(focusType)) {
@ -218,7 +218,7 @@ RetError AccessibleAbilityChannelProxy::FocusMoveSearch(const int32_t accessibil
return RET_ERR_IPC_FAILED;
}
if (!data.WriteInt64(elementId)) {
HILOG_ERROR("elementId write error: %{public}" PRIu64 "", elementId);
HILOG_ERROR("elementId write error: %{public}" PRId64 "", elementId);
return RET_ERR_IPC_FAILED;
}
if (!data.WriteInt32(direction)) {
@ -259,7 +259,7 @@ RetError AccessibleAbilityChannelProxy::ExecuteAction(const int32_t accessibilit
return RET_ERR_IPC_FAILED;
}
if (!data.WriteInt64(elementId)) {
HILOG_ERROR("elementId write error: %{public}" PRIu64 "", elementId);
HILOG_ERROR("elementId write error: %{public}" PRId64 "", elementId);
return RET_ERR_IPC_FAILED;
}
if (!data.WriteInt32(action)) {

View File

@ -84,7 +84,7 @@ RetError AccessibleAbilityChannelClient::FindFocusedElementInfo(int32_t accessib
HILOG_ERROR("FindFocusedElementInfo failed. ret[%{public}d]", ret);
return ret;
}
HILOG_DEBUG("channelId:%{public}d, windowId:%{public}d, elementId:%{public}" PRIu64 ", focusType:%{public}d",
HILOG_DEBUG("channelId:%{public}d, windowId:%{public}d, elementId:%{public}" PRId64 ", focusType:%{public}d",
channelId_, windowId, elementId, focusType);
std::future_status wait = promiseFuture.wait_for(std::chrono::milliseconds(TIME_OUT_OPERATOR));

View File

@ -330,7 +330,7 @@ RetError AccessibleAbilityClientImpl::GetFocusByElementInfo(const AccessibilityE
int32_t windowId = sourceInfo.GetWindowId();
int64_t elementId = sourceInfo.GetAccessibilityId();
HILOG_DEBUG("windowId[%{public}d], elementId[%{public}" PRIu64 "], focusType[%{public}d]",
HILOG_DEBUG("windowId[%{public}d], elementId[%{public}" PRId64 "], focusType[%{public}d]",
windowId, elementId, focusType);
return channelClient_->FindFocusedElementInfo(windowId, elementId, focusType, elementInfo);
@ -582,7 +582,7 @@ RetError AccessibleAbilityClientImpl::GetWindows(const uint64_t displayId,
RetError AccessibleAbilityClientImpl::GetNext(const AccessibilityElementInfo &elementInfo,
const FocusMoveDirection direction, AccessibilityElementInfo &nextElementInfo)
{
HILOG_DEBUG("windowId[%{public}d], elementId[%{public}" PRIu64 "], direction[%{public}d]",
HILOG_DEBUG("windowId[%{public}d], elementId[%{public}" PRId64 "], direction[%{public}d]",
elementInfo.GetWindowId(), elementInfo.GetAccessibilityId(), direction);
if (!isConnected_) {
HILOG_ERROR("connection is broken");
@ -619,9 +619,9 @@ RetError AccessibleAbilityClientImpl::GetChildElementInfo(const int32_t index, c
int32_t windowId = parent.GetWindowId();
int64_t childId = parent.GetChildId(index);
HILOG_DEBUG("windowId[%{public}d], childId[%{public}" PRIu64 "]", windowId, childId);
HILOG_DEBUG("windowId[%{public}d], childId[%{public}" PRId64 "]", windowId, childId);
if (childId == -1) {
HILOG_ERROR("childId[%{public}" PRIu64 "] is invalid", childId);
HILOG_ERROR("childId[%{public}" PRId64 "] is invalid", childId);
return RET_ERR_INVALID_PARAM;
}
if (GetCacheElementInfo(windowId, childId, child)) {
@ -651,7 +651,7 @@ RetError AccessibleAbilityClientImpl::GetChildren(const AccessibilityElementInfo
std::vector<int64_t> childIds = parent.GetChildIds();
HILOG_DEBUG("windowId[%{public}d], childIds.size[%{public}zu]", windowId, childIds.size());
for (auto &childId : childIds) {
HILOG_DEBUG("childId[%{public}" PRIu64 "]", childId);
HILOG_DEBUG("childId[%{public}" PRId64 "]", childId);
if (childId == -1) {
HILOG_ERROR("childId is invalid");
return RET_ERR_INVALID_PARAM;
@ -691,7 +691,7 @@ RetError AccessibleAbilityClientImpl::GetByContent(const AccessibilityElementInf
int32_t windowId = elementInfo.GetWindowId();
int64_t elementId = elementInfo.GetAccessibilityId();
HILOG_DEBUG("windowId %{public}d, elementId %{public}" PRIu64 ", text %{public}s",
HILOG_DEBUG("windowId %{public}d, elementId %{public}" PRId64 ", text %{public}s",
windowId, elementId, text.c_str());
if (text != "") { // find element condition is null, so we will search all element info
return channelClient_->SearchElementInfosByText(windowId, elementId, text, elementInfos);
@ -721,7 +721,7 @@ RetError AccessibleAbilityClientImpl::GetSource(const AccessibilityEventInfo &ev
}
int32_t windowId = eventInfo.GetWindowId();
int64_t elementId = eventInfo.GetAccessibilityId();
HILOG_DEBUG("windowId[%{public}d], elementId[%{public}" PRIu64 "]", windowId, elementId);
HILOG_DEBUG("windowId[%{public}d], elementId[%{public}" PRId64 "]", windowId, elementId);
if (GetCacheElementInfo(windowId, elementId, elementInfo)) {
HILOG_DEBUG("get element info from cache");
return RET_OK;
@ -745,7 +745,7 @@ RetError AccessibleAbilityClientImpl::GetParentElementInfo(const AccessibilityEl
}
int32_t windowId = child.GetWindowId();
int64_t elementId = child.GetParentNodeId();
HILOG_DEBUG("windowId[%{public}d], parentId[%{public}" PRIu64 "]", windowId, elementId);
HILOG_DEBUG("windowId[%{public}d], parentId[%{public}" PRId64 "]", windowId, elementId);
if (GetCacheElementInfo(windowId, elementId, parent)) {
HILOG_DEBUG("get element info from cache");
return RET_OK;
@ -774,7 +774,7 @@ RetError AccessibleAbilityClientImpl::ExecuteAction(const AccessibilityElementIn
}
int32_t windowId = elementInfo.GetWindowId();
int64_t elementId = elementInfo.GetAccessibilityId();
HILOG_DEBUG("windowId[%{public}d], elementId[%{public}" PRIu64 "], action[%{public}d", windowId, elementId, action);
HILOG_DEBUG("windowId[%{public}d], elementId[%{public}" PRId64 "], action[%{public}d", windowId, elementId, action);
return channelClient_->ExecuteAction(windowId, elementId, action,
const_cast<std::map<std::string, std::string> &>(actionArguments));
}
@ -876,7 +876,7 @@ bool AccessibleAbilityClientImpl::GetCacheElementInfo(const int32_t windowId,
auto iter = cacheElementInfos_.find(elementId);
if (iter == cacheElementInfos_.end()) {
HILOG_DEBUG("the element id[%{public}" PRIu64 "] is not in cache", elementId);
HILOG_DEBUG("the element id[%{public}" PRId64 "] is not in cache", elementId);
return false;
}
@ -908,7 +908,7 @@ RetError AccessibleAbilityClientImpl::SearchElementInfoFromAce(const int32_t win
RetError ret = channelClient_->SearchElementInfosByAccessibilityId(
windowId, elementId, static_cast<int32_t>(mode), elementInfos);
if (ret != RET_OK) {
HILOG_ERROR("search element info failed. windowId[%{public}d] elementId[%{public}" PRIu64 "] mode[%{public}d]",
HILOG_ERROR("search element info failed. windowId[%{public}d] elementId[%{public}" PRId64 "] mode[%{public}d]",
windowId, elementId, mode);
return ret;
}
@ -957,7 +957,7 @@ void AccessibleAbilityClientImpl::AddWindowElementMapByWMS(int32_t windowId, int
int32_t realWindowId = windowId;
int64_t realElementId = elementId;
serviceProxy_->GetRealWindowAndElementId(realWindowId, realElementId);
HILOG_DEBUG("windowId %{public}d, real windowId %{public}d, real elementId %{public}" PRIu64 "",
HILOG_DEBUG("windowId %{public}d, real windowId %{public}d, real elementId %{public}" PRId64 "",
windowId, realWindowId, realElementId);
if (windowId != realElementId) {
windowElementMap_.AddWindowElementIdPair(windowId, realElementId);
@ -970,7 +970,7 @@ void AccessibleAbilityClientImpl::AddWindowElementMapByAce(int32_t windowId, int
if (windowId == SCENE_BOARD_WINDOW_ID) {
int32_t innerWid = INVALID_SCENE_BOARD_INNER_WINDOW_ID;
serviceProxy_->GetSceneBoardInnerWinId(windowId, elementId, innerWid);
HILOG_DEBUG("windowId %{public}d, elementId %{public}" PRIu64 ", innerWid %{public}d",
HILOG_DEBUG("windowId %{public}d, elementId %{public}" PRId64 ", innerWid %{public}d",
windowId, elementId, innerWid);
if (innerWid != INVALID_SCENE_BOARD_INNER_WINDOW_ID) {
windowElementMap_.AddWindowElementIdPair(innerWid, elementId);
@ -1010,7 +1010,7 @@ RetError AccessibleAbilityClientImpl::SearchElementInfoRecursive(int32_t windowI
RetError ret = channelClient_->SearchElementInfosByAccessibilityId(windowId, elementId,
mode, elementInfos);
if (ret != RET_OK) {
HILOG_ERROR("search element info failed. windowId %{public}d elementId %{public}" PRIu64 "",
HILOG_ERROR("search element info failed. windowId %{public}d elementId %{public}" PRId64 "",
windowId, elementId);
return ret;
}
@ -1138,7 +1138,7 @@ bool AccessibleAbilityClientImpl::ElementCacheInfo::GetElementByWindowId(const i
}
if (cache.find(elementId) == cache.end() && elementId != ROOT_NONE_ID) {
HILOG_DEBUG("elementId %{public}" PRIu64 " is not existed", elementId);
HILOG_DEBUG("elementId %{public}" PRId64 " is not existed", elementId);
return false;
}
@ -1147,14 +1147,14 @@ bool AccessibleAbilityClientImpl::ElementCacheInfo::GetElementByWindowId(const i
for (auto iter = cache.begin(); iter != cache.end(); iter++) {
if (iter->second->GetComponentType() == "root") {
realElementId = iter->first;
HILOG_DEBUG("find realElementId %{public}" PRIu64 "", realElementId);
HILOG_DEBUG("find realElementId %{public}" PRId64 "", realElementId);
break;
}
}
}
if (realElementId == ROOT_NONE_ID) {
HILOG_ERROR("elementId %{public}" PRIu64 " is not existed", realElementId);
HILOG_ERROR("elementId %{public}" PRId64 " is not existed", realElementId);
return false;
}

View File

@ -309,7 +309,7 @@ bool AccessibilitySystemAbilityClientImpl::CheckEventType(EventType eventType)
RetError AccessibilitySystemAbilityClientImpl::SendEvent(const EventType eventType, const int64_t componentId)
{
HILOG_DEBUG("componentId[%{public}" PRIu64 "], eventType[%{public}d]", componentId, eventType);
HILOG_DEBUG("componentId[%{public}" PRId64 "], eventType[%{public}d]", componentId, eventType);
std::lock_guard<std::mutex> lock(mutex_);
if (!CheckEventType(eventType)) {
return RET_ERR_INVALID_PARAM;

View File

@ -47,7 +47,7 @@ void AccessibilityElementInfo::AddChild(const int64_t childId)
{
for (int32_t i = 0; i < childCount_; i++) {
if (childNodeIds_[i] == childId) {
HILOG_ERROR("childId[%{public}" PRIu64 "] is exited", childId);
HILOG_ERROR("childId[%{public}" PRId64 "] is exited", childId);
return;
}
}
@ -64,7 +64,7 @@ bool AccessibilityElementInfo::RemoveChild(const int64_t childId)
return true;
}
}
HILOG_ERROR("Not find childId[%{public}" PRIu64 "]", childId);
HILOG_ERROR("Not find childId[%{public}" PRId64 "]", childId);
return false;
}

View File

@ -23,20 +23,20 @@ namespace OHOS {
namespace Accessibility {
void AccessibilityMemo::SetSource(const int64_t componentId)
{
HILOG_DEBUG("componentId[%{public}" PRIu64 "]", componentId);
HILOG_DEBUG("componentId[%{public}" PRId64 "]", componentId);
componentId_ = componentId;
elementId_ = componentId;
}
int64_t AccessibilityMemo::GetViewId() const
{
HILOG_DEBUG("componentId_[%{public}" PRIu64 "]", componentId_);
HILOG_DEBUG("componentId_[%{public}" PRId64 "]", componentId_);
return componentId_;
}
int64_t AccessibilityMemo::GetAccessibilityId() const
{
HILOG_DEBUG("called] elementId_[%{public}" PRIu64 "]", elementId_);
HILOG_DEBUG("called] elementId_[%{public}" PRId64 "]", elementId_);
return elementId_;
}

View File

@ -173,12 +173,12 @@ int32_t AccessibilityWindowInfo::GetInnerWid() const
void AccessibilityWindowInfo::SetUiNodeId(const int64_t nodeId)
{
uiNodeId_ = nodeId;
HILOG_DEBUG("uiNodeId_[%{public}" PRIu64 "]", uiNodeId_);
HILOG_DEBUG("uiNodeId_[%{public}" PRId64 "]", uiNodeId_);
}
int64_t AccessibilityWindowInfo::GetUiNodeId() const
{
HILOG_DEBUG("uiNodeId_[%{public}" PRIu64 "]", uiNodeId_);
HILOG_DEBUG("uiNodeId_[%{public}" PRId64 "]", uiNodeId_);
return uiNodeId_;
}

View File

@ -587,7 +587,7 @@ int64_t AccessibilityWindowManager::GetSceneBoardElementId(const int32_t windowI
if (subWindows_.count(windowId)) {
auto iter = a11yWindows_.find(windowId);
if (iter != a11yWindows_.end()) {
HILOG_DEBUG("GetSceneBoardElementId [%{public}" PRIu64 "]", iter->second.GetUiNodeId());
HILOG_DEBUG("GetSceneBoardElementId [%{public}" PRId64 "]", iter->second.GetUiNodeId());
return iter->second.GetUiNodeId();
}
}
@ -599,7 +599,7 @@ void AccessibilityWindowManager::GetRealWindowAndElementId(int32_t& windowId, in
// sceneboard window id, element id is not equal -1
if (subWindows_.count(windowId) && elementId != INVALID_SCENE_BOARD_ELEMENT_ID) {
windowId = SCENE_BOARD_WINDOW_ID;
HILOG_INFO("windowId %{public}d, elementId %{public}" PRIu64 "", windowId, elementId);
HILOG_INFO("windowId %{public}d, elementId %{public}" PRId64 "", windowId, elementId);
return;
}
@ -610,7 +610,7 @@ void AccessibilityWindowManager::GetRealWindowAndElementId(int32_t& windowId, in
if (subWindows_.count(windowId)) {
auto iter = a11yWindows_.find(windowId);
if (iter != a11yWindows_.end()) {
HILOG_DEBUG("GetRealWindowAndElementId [%{public}" PRIu64 "]", iter->second.GetUiNodeId());
HILOG_DEBUG("GetRealWindowAndElementId [%{public}" PRId64 "]", iter->second.GetUiNodeId());
windowId = SCENE_BOARD_WINDOW_ID;
elementId = iter->second.GetUiNodeId();
return;