mirror of
https://gitee.com/openharmony/accessibility
synced 2024-11-23 06:50:30 +00:00
commit
8a1067f169
2
BUILD.gn
2
BUILD.gn
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
5
OAT.xml
5
OAT.xml
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
<!-- Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@ -12,9 +12,6 @@
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Notes:
|
||||
This is project config file for OpenHarmony OSS Audit Tool, if you have any questions or concerns, please email chenyaxun@huawei.com.
|
||||
-->
|
||||
<!-- OAT(OSS Audit Tool) configuration guide:
|
||||
basedir: Root dir, the basedir + project path is the real source file location.
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
# Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -52,14 +52,14 @@ bool AccessibilityExtensionContext::GestureSimulate(uint32_t sequence,
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t totalDurationTime = 0;
|
||||
int64_t totalDurationTime = 0;
|
||||
for (auto gesturePath : gesturePathDefineList) {
|
||||
totalDurationTime += gesturePath.GetDurationTime();
|
||||
}
|
||||
HILOG_DEBUG("The total duration time is %{public}d.", totalDurationTime);
|
||||
HILOG_DEBUG("The total duration time is %{public}lld.", totalDurationTime);
|
||||
|
||||
if (totalDurationTime > gesturePathDefineList.front().GetMaxStrokeDuration()) {
|
||||
HILOG_ERROR("The total duration time : [%{public}d] is not allowed.", totalDurationTime);
|
||||
HILOG_ERROR("The total duration time : [%{public}lld] is not allowed.", totalDurationTime);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -134,6 +134,7 @@ void AccessibleAbilityClientStubImpl::Disconnect(const int channelId)
|
||||
}
|
||||
} else {
|
||||
AccessibilityUITestAbility::GetInstance()->SetChannelId(channelId_);
|
||||
uiTestListener_->OnAbilityDisconnected();
|
||||
uiTestListener_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -23,29 +23,38 @@ namespace OHOS {
|
||||
namespace Accessibility {
|
||||
bool AccessibilityElementInfo::ReadFromParcel(Parcel &parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::Marshalling(Parcel &parcel) const
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
};
|
||||
|
||||
sptr<AccessibilityElementInfo> AccessibilityElementInfo::Unmarshalling(Parcel& parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetComponentId(const int componentId)
|
||||
{}
|
||||
{
|
||||
(void)componentId;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::GetFocus(const int focus, AccessibilityElementInfo &elementInfo)
|
||||
{
|
||||
(void)focus;
|
||||
(void)elementInfo;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::GetNext(const FocusMoveDirection direction, AccessibilityElementInfo &elementInfo)
|
||||
{
|
||||
(void)direction;
|
||||
(void)elementInfo;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -60,6 +69,8 @@ int AccessibilityElementInfo::GetChildCount() const
|
||||
|
||||
bool AccessibilityElementInfo::GetChild(const int index, AccessibilityElementInfo &elementInfo)
|
||||
{
|
||||
(void)index;
|
||||
(void)elementInfo;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -69,10 +80,13 @@ std::vector<int> AccessibilityElementInfo::GetChildIds() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::AddChild(const int childId)
|
||||
{}
|
||||
{
|
||||
(void)childId;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::RemoveChild(const int childId)
|
||||
{
|
||||
(void)childId;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -82,13 +96,18 @@ std::vector<AccessibleAction> AccessibilityElementInfo::GetActionList() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::AddAction(AccessibleAction &operation)
|
||||
{}
|
||||
{
|
||||
(void)operation;
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::DeleteAction(AccessibleAction &operation)
|
||||
{}
|
||||
{
|
||||
(void)operation;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::DeleteAction(ActionType &operationType)
|
||||
{
|
||||
(void)operationType;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -96,7 +115,9 @@ void AccessibilityElementInfo::DeleteAllActions()
|
||||
{}
|
||||
|
||||
void AccessibilityElementInfo::SetTextLengthLimit(const int max)
|
||||
{}
|
||||
{
|
||||
(void)max;
|
||||
}
|
||||
|
||||
int AccessibilityElementInfo::GetTextLengthLimit() const
|
||||
{
|
||||
@ -106,18 +127,25 @@ int AccessibilityElementInfo::GetTextLengthLimit() const
|
||||
bool AccessibilityElementInfo::ExecuteAction(const ActionType &operation,
|
||||
const std::map<std::string, std::string> &actionArguments)
|
||||
{
|
||||
(void)operation;
|
||||
(void)actionArguments;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::GetByContent(const std::string &text,
|
||||
std::vector<AccessibilityElementInfo> &elementInfos)
|
||||
{
|
||||
(void)text;
|
||||
(void)elementInfos;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::GetElementInfosById(const int elementId, int mode,
|
||||
std::vector<AccessibilityElementInfo> &elementInfos)
|
||||
{
|
||||
(void)elementId;
|
||||
(void)mode;
|
||||
(void)elementInfos;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -127,10 +155,13 @@ int AccessibilityElementInfo::GetWindowId() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetWindowId(const int windowId)
|
||||
{}
|
||||
{
|
||||
(void)windowId;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::GetParent(AccessibilityElementInfo &elementInfo)
|
||||
{
|
||||
(void)elementInfo;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -140,7 +171,9 @@ int AccessibilityElementInfo::GetParentNodeId() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetParent(const int parentId)
|
||||
{}
|
||||
{
|
||||
(void)parentId;
|
||||
}
|
||||
|
||||
Rect AccessibilityElementInfo::GetRectInScreen() const
|
||||
{
|
||||
@ -148,7 +181,9 @@ Rect AccessibilityElementInfo::GetRectInScreen() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetRectInScreen(Rect &bounds)
|
||||
{}
|
||||
{
|
||||
(void)bounds;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsCheckable() const
|
||||
{
|
||||
@ -156,7 +191,9 @@ bool AccessibilityElementInfo::IsCheckable() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetCheckable(const bool checkable)
|
||||
{}
|
||||
{
|
||||
(void)checkable;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsChecked() const
|
||||
{
|
||||
@ -164,7 +201,9 @@ bool AccessibilityElementInfo::IsChecked() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetChecked(const bool checked)
|
||||
{}
|
||||
{
|
||||
(void)checked;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsFocusable() const
|
||||
{
|
||||
@ -172,7 +211,9 @@ bool AccessibilityElementInfo::IsFocusable() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetFocusable(const bool focusable)
|
||||
{}
|
||||
{
|
||||
(void)focusable;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsFocused() const
|
||||
{
|
||||
@ -180,7 +221,9 @@ bool AccessibilityElementInfo::IsFocused() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetFocused(const bool focused)
|
||||
{}
|
||||
{
|
||||
(void)focused;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsVisible() const
|
||||
{
|
||||
@ -188,7 +231,9 @@ bool AccessibilityElementInfo::IsVisible() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetVisible(const bool visible)
|
||||
{}
|
||||
{
|
||||
(void)visible;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::HasAccessibilityFocus() const
|
||||
{
|
||||
@ -196,7 +241,9 @@ bool AccessibilityElementInfo::HasAccessibilityFocus() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetAccessibilityFocus(const bool focused)
|
||||
{}
|
||||
{
|
||||
(void)focused;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsSelected() const
|
||||
{
|
||||
@ -204,7 +251,9 @@ bool AccessibilityElementInfo::IsSelected() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetSelected(const bool selected)
|
||||
{}
|
||||
{
|
||||
(void)selected;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsClickable() const
|
||||
{
|
||||
@ -212,7 +261,9 @@ bool AccessibilityElementInfo::IsClickable() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetClickable(const bool clickable)
|
||||
{}
|
||||
{
|
||||
(void)clickable;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsLongClickable() const
|
||||
{
|
||||
@ -220,7 +271,9 @@ bool AccessibilityElementInfo::IsLongClickable() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetLongClickable(const bool longClickable)
|
||||
{}
|
||||
{
|
||||
(void)longClickable;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsEnabled() const
|
||||
{
|
||||
@ -228,15 +281,19 @@ bool AccessibilityElementInfo::IsEnabled() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetEnabled(const bool enabled)
|
||||
{}
|
||||
{
|
||||
(void)enabled;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsPassword() const
|
||||
{
|
||||
return password_;
|
||||
return isPassword_;
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetPassword(const bool password)
|
||||
{}
|
||||
void AccessibilityElementInfo::SetPassword(const bool type)
|
||||
{
|
||||
(void)type;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsScrollable() const
|
||||
{
|
||||
@ -244,7 +301,9 @@ bool AccessibilityElementInfo::IsScrollable() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetScrollable(const bool scrollable)
|
||||
{}
|
||||
{
|
||||
(void)scrollable;
|
||||
}
|
||||
|
||||
int AccessibilityElementInfo::GetCurrentIndex() const
|
||||
{
|
||||
@ -252,7 +311,9 @@ int AccessibilityElementInfo::GetCurrentIndex() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetCurrentIndex(const int index)
|
||||
{}
|
||||
{
|
||||
(void)index;
|
||||
}
|
||||
|
||||
int AccessibilityElementInfo::GetBeginIndex() const
|
||||
{
|
||||
@ -260,7 +321,9 @@ int AccessibilityElementInfo::GetBeginIndex() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetBeginIndex(const int index)
|
||||
{}
|
||||
{
|
||||
(void)index;
|
||||
}
|
||||
|
||||
int AccessibilityElementInfo::GetEndIndex() const
|
||||
{
|
||||
@ -268,7 +331,9 @@ int AccessibilityElementInfo::GetEndIndex() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetEndIndex(const int index)
|
||||
{}
|
||||
{
|
||||
(void)index;
|
||||
}
|
||||
|
||||
int AccessibilityElementInfo::GetInputType() const
|
||||
{
|
||||
@ -276,7 +341,9 @@ int AccessibilityElementInfo::GetInputType() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetInputType(const int inputType)
|
||||
{}
|
||||
{
|
||||
(void)inputType;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsEditable() const
|
||||
{
|
||||
@ -284,7 +351,9 @@ bool AccessibilityElementInfo::IsEditable() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetEditable(const bool editable)
|
||||
{}
|
||||
{
|
||||
(void)editable;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsPluraLineSupported() const
|
||||
{
|
||||
@ -292,7 +361,9 @@ bool AccessibilityElementInfo::IsPluraLineSupported() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetPluraLineSupported(const bool multiLine)
|
||||
{}
|
||||
{
|
||||
(void)multiLine;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsPopupSupported() const
|
||||
{
|
||||
@ -300,7 +371,9 @@ bool AccessibilityElementInfo::IsPopupSupported() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetPopupSupported(const bool supportPopup)
|
||||
{}
|
||||
{
|
||||
(void)supportPopup;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsDeletable() const
|
||||
{
|
||||
@ -308,7 +381,9 @@ bool AccessibilityElementInfo::IsDeletable() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetDeletable(const bool deletable)
|
||||
{}
|
||||
{
|
||||
(void)deletable;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsEssential() const
|
||||
{
|
||||
@ -316,7 +391,9 @@ bool AccessibilityElementInfo::IsEssential() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetEssential(const bool important)
|
||||
{}
|
||||
{
|
||||
(void)important;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsGivingHint() const
|
||||
{
|
||||
@ -324,7 +401,9 @@ bool AccessibilityElementInfo::IsGivingHint() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetHinting(const bool hinting)
|
||||
{}
|
||||
{
|
||||
(void)hinting;
|
||||
}
|
||||
|
||||
std::string AccessibilityElementInfo::GetBundleName() const
|
||||
{
|
||||
@ -344,7 +423,9 @@ std::string AccessibilityElementInfo::GetComponentType() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetComponentType(const std::string &className)
|
||||
{}
|
||||
{
|
||||
(void)className;
|
||||
}
|
||||
|
||||
std::string AccessibilityElementInfo::GetContent() const
|
||||
{
|
||||
@ -352,7 +433,9 @@ std::string AccessibilityElementInfo::GetContent() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetContent(const std::string &text)
|
||||
{}
|
||||
{
|
||||
(void)text;
|
||||
}
|
||||
|
||||
std::string AccessibilityElementInfo::GetAccessibilityContent() const
|
||||
{
|
||||
@ -360,10 +443,14 @@ std::string AccessibilityElementInfo::GetAccessibilityContent() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetAccessibilityContent(const std::string &text)
|
||||
{}
|
||||
{
|
||||
(void)text;
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetSelectedBegin(const int start)
|
||||
{}
|
||||
{
|
||||
(void)start;
|
||||
}
|
||||
|
||||
int AccessibilityElementInfo::GetSelectedBegin() const
|
||||
{
|
||||
@ -371,7 +458,9 @@ int AccessibilityElementInfo::GetSelectedBegin() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetSelectedEnd(const int end)
|
||||
{}
|
||||
{
|
||||
(void)end;
|
||||
}
|
||||
|
||||
int AccessibilityElementInfo::GetSelectedEnd() const
|
||||
{
|
||||
@ -384,7 +473,9 @@ std::string AccessibilityElementInfo::GetAccessibilityDescription() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetAccessibilityDescription(const std::string &text)
|
||||
{}
|
||||
{
|
||||
(void)text;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::GetAccessibilityGroup() const
|
||||
{
|
||||
@ -392,7 +483,9 @@ bool AccessibilityElementInfo::GetAccessibilityGroup() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetAccessibilityGroup(const bool group)
|
||||
{}
|
||||
{
|
||||
(void)group;
|
||||
}
|
||||
|
||||
std::string AccessibilityElementInfo::GetHint() const
|
||||
{
|
||||
@ -400,7 +493,9 @@ std::string AccessibilityElementInfo::GetHint() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetHint(const std::string &hintText)
|
||||
{}
|
||||
{
|
||||
(void)hintText;
|
||||
}
|
||||
|
||||
std::string AccessibilityElementInfo::GetDescriptionInfo() const
|
||||
{
|
||||
@ -408,10 +503,14 @@ std::string AccessibilityElementInfo::GetDescriptionInfo() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetDescriptionInfo(const std::string contentDescription)
|
||||
{}
|
||||
{
|
||||
(void)contentDescription;
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetComponentResourceId(const std::string &viewIdResName)
|
||||
{}
|
||||
{
|
||||
(void)viewIdResName;
|
||||
}
|
||||
|
||||
std::string AccessibilityElementInfo::GetComponentResourceId() const
|
||||
{
|
||||
@ -419,7 +518,9 @@ std::string AccessibilityElementInfo::GetComponentResourceId() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetLiveRegion(const int liveRegion)
|
||||
{}
|
||||
{
|
||||
(void)liveRegion;
|
||||
}
|
||||
|
||||
int AccessibilityElementInfo::GetLiveRegion() const
|
||||
{
|
||||
@ -427,7 +528,9 @@ int AccessibilityElementInfo::GetLiveRegion() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetContentInvalid(const bool contentInvalid)
|
||||
{}
|
||||
{
|
||||
(void)contentInvalid;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::GetContentInvalid() const
|
||||
{
|
||||
@ -435,7 +538,9 @@ bool AccessibilityElementInfo::GetContentInvalid() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetError(const std::string &error)
|
||||
{}
|
||||
{
|
||||
(void)error;
|
||||
}
|
||||
|
||||
std::string AccessibilityElementInfo::GetError() const
|
||||
{
|
||||
@ -443,10 +548,13 @@ std::string AccessibilityElementInfo::GetError() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetLabeled(const int componentId)
|
||||
{}
|
||||
{
|
||||
(void)componentId;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::GetLabeled(AccessibilityElementInfo &elementInfo) const
|
||||
{
|
||||
(void)elementInfo;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -461,10 +569,14 @@ int AccessibilityElementInfo::GetChannelId() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetChannelId(const int channelId)
|
||||
{}
|
||||
{
|
||||
(void)channelId;
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetAccessibilityId(const int componentId)
|
||||
{}
|
||||
{
|
||||
(void)componentId;
|
||||
}
|
||||
|
||||
int AccessibilityElementInfo::GetAccessibilityId() const
|
||||
{
|
||||
@ -477,7 +589,9 @@ RangeInfo AccessibilityElementInfo::GetRange() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetRange(RangeInfo &rangeInfo)
|
||||
{}
|
||||
{
|
||||
(void)rangeInfo;
|
||||
}
|
||||
|
||||
GridInfo AccessibilityElementInfo::GetGrid() const
|
||||
{
|
||||
@ -485,7 +599,9 @@ GridInfo AccessibilityElementInfo::GetGrid() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetGrid(const GridInfo &grid)
|
||||
{}
|
||||
{
|
||||
(void)grid;
|
||||
}
|
||||
|
||||
GridItemInfo AccessibilityElementInfo::GetGridItem() const
|
||||
{
|
||||
@ -493,28 +609,36 @@ GridItemInfo AccessibilityElementInfo::GetGridItem() const
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetGridItem(const GridItemInfo &gridItem)
|
||||
{}
|
||||
{
|
||||
(void)gridItem;
|
||||
}
|
||||
|
||||
AccessibilityElementInfo::AccessibilityElementInfo()
|
||||
{}
|
||||
|
||||
bool AccessibleAction::ReadFromParcel(Parcel &parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AccessibleAction::Marshalling(Parcel &parcel) const
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
};
|
||||
|
||||
sptr<AccessibleAction> AccessibleAction::Unmarshalling(Parcel& parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
AccessibleAction::AccessibleAction(ActionType operationType, std::string description)
|
||||
{}
|
||||
{
|
||||
(void)operationType;
|
||||
(void)description;
|
||||
}
|
||||
|
||||
ActionType AccessibleAction::GetActionType() const
|
||||
{
|
||||
@ -528,21 +652,28 @@ std::string AccessibleAction::GetDescriptionInfo() const
|
||||
|
||||
bool RangeInfo::ReadFromParcel(Parcel &parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RangeInfo::Marshalling(Parcel &parcel) const
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
};
|
||||
|
||||
sptr<RangeInfo> RangeInfo::Unmarshalling(Parcel& parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RangeInfo::RangeInfo(int min, int max, int current)
|
||||
{}
|
||||
{
|
||||
(void)min;
|
||||
(void)max;
|
||||
(void)current;
|
||||
}
|
||||
|
||||
int RangeInfo::GetMin() const
|
||||
{
|
||||
@ -560,37 +691,56 @@ int RangeInfo::GetCurrent() const
|
||||
}
|
||||
|
||||
void RangeInfo::SetMin(int min)
|
||||
{}
|
||||
{
|
||||
(void)min;
|
||||
}
|
||||
|
||||
void RangeInfo::SetMax(int max)
|
||||
{}
|
||||
{
|
||||
(void)max;
|
||||
}
|
||||
|
||||
void RangeInfo::SetCurrent(int current)
|
||||
{}
|
||||
{
|
||||
(void)current;
|
||||
}
|
||||
|
||||
bool GridInfo::ReadFromParcel(Parcel &parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GridInfo::Marshalling(Parcel &parcel) const
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
};
|
||||
|
||||
sptr<GridInfo> GridInfo::Unmarshalling(Parcel& parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GridInfo::GridInfo(int rowCount, int columnCount, int mode)
|
||||
{}
|
||||
{
|
||||
(void)rowCount;
|
||||
(void)columnCount;
|
||||
(void)mode;
|
||||
}
|
||||
|
||||
void GridInfo::SetGrid(int rowCount, int columnCount, int mode)
|
||||
{}
|
||||
{
|
||||
(void)rowCount;
|
||||
(void)columnCount;
|
||||
(void)mode;
|
||||
}
|
||||
|
||||
void GridInfo::SetGrid(GridInfo other)
|
||||
{}
|
||||
{
|
||||
(void)other;
|
||||
}
|
||||
|
||||
int GridInfo::GetRowCount() const
|
||||
{
|
||||
@ -609,28 +759,47 @@ int GridInfo::GetSelectionMode() const
|
||||
|
||||
bool GridItemInfo::ReadFromParcel(Parcel &parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GridItemInfo::Marshalling(Parcel &parcel) const
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
};
|
||||
|
||||
sptr<GridItemInfo> GridItemInfo::Unmarshalling(Parcel& parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GridItemInfo::GridItemInfo(int rowIndex, int rowSpan, int columnIndex, int columnSpan, bool heading, bool selected)
|
||||
{}
|
||||
{
|
||||
(void)rowIndex;
|
||||
(void)rowSpan;
|
||||
(void)columnIndex;
|
||||
(void)columnSpan;
|
||||
(void)heading;
|
||||
(void)selected;
|
||||
}
|
||||
|
||||
void GridItemInfo::SetGridItemInfo(GridItemInfo other)
|
||||
{}
|
||||
{
|
||||
(void)other;
|
||||
}
|
||||
|
||||
void GridItemInfo::SetGridItemInfo(int rowIndex, int rowSpan,
|
||||
int columnIndex, int columnSpan, bool heading, bool selected)
|
||||
{}
|
||||
{
|
||||
(void)rowIndex;
|
||||
(void)rowSpan;
|
||||
(void)columnIndex;
|
||||
(void)columnSpan;
|
||||
(void)heading;
|
||||
(void)selected;
|
||||
}
|
||||
|
||||
int GridItemInfo::GetColumnIndex() const
|
||||
{
|
||||
@ -664,16 +833,19 @@ bool GridItemInfo::IsSelected() const
|
||||
|
||||
bool Rect::ReadFromParcel(Parcel &parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Rect::Marshalling(Parcel &parcel) const
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
};
|
||||
|
||||
sptr<Rect> Rect::Unmarshalling(Parcel& parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
sptr<Rect> rect = new Rect();
|
||||
return rect;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -29,32 +29,50 @@ AccessibilityElementOperatorCallbackProxy::~AccessibilityElementOperatorCallback
|
||||
|
||||
bool AccessibilityElementOperatorCallbackProxy::WriteInterfaceToken(MessageParcel &data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
void AccessibilityElementOperatorCallbackProxy::SetSearchElementInfoByAccessibilityIdResult(
|
||||
const std::vector<AccessibilityElementInfo> &infos, const int requestId)
|
||||
{}
|
||||
{
|
||||
(void)infos;
|
||||
(void)requestId;
|
||||
}
|
||||
|
||||
void AccessibilityElementOperatorCallbackProxy::SetSearchElementInfoByTextResult(
|
||||
const std::vector<AccessibilityElementInfo> &infos, const int requestId)
|
||||
{}
|
||||
{
|
||||
(void)infos;
|
||||
(void)requestId;
|
||||
}
|
||||
|
||||
void AccessibilityElementOperatorCallbackProxy::SetFindFocusedElementInfoResult(
|
||||
const AccessibilityElementInfo &info, const int requestId)
|
||||
{}
|
||||
{
|
||||
(void)info;
|
||||
(void)requestId;
|
||||
}
|
||||
|
||||
void AccessibilityElementOperatorCallbackProxy::SetFocusMoveSearchResult(const AccessibilityElementInfo &info,
|
||||
const int requestId)
|
||||
{}
|
||||
{
|
||||
(void)info;
|
||||
(void)requestId;
|
||||
}
|
||||
|
||||
void AccessibilityElementOperatorCallbackProxy::SetExecuteActionResult(const bool succeeded, const int requestId)
|
||||
{}
|
||||
{
|
||||
(void)succeeded;
|
||||
(void)requestId;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool AccessibilityElementOperatorCallbackProxy::WriteParcelableVector(const std::vector<T> &parcelableVector,
|
||||
Parcel &reply)
|
||||
{
|
||||
(void)parcelableVector;
|
||||
(void)reply;
|
||||
return true;
|
||||
}
|
||||
} // namespace Accessibility
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -26,36 +26,50 @@ AccessibilityElementOperatorCallbackStub::~AccessibilityElementOperatorCallbackS
|
||||
int AccessibilityElementOperatorCallbackStub::OnRemoteRequest(uint32_t code, MessageParcel &data,
|
||||
MessageParcel &reply, MessageOption &option)
|
||||
{
|
||||
(void)code;
|
||||
(void)data;
|
||||
(void)reply;
|
||||
(void)option;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ErrCode AccessibilityElementOperatorCallbackStub::HandleSetSearchElementInfoByAccessibilityIdResult(
|
||||
MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
(void)data;
|
||||
(void)reply;
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
ErrCode AccessibilityElementOperatorCallbackStub::HandleSetSearchElementInfoByTextResult(
|
||||
MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
(void)data;
|
||||
(void)reply;
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
ErrCode AccessibilityElementOperatorCallbackStub::HandleSetFindFocusedElementInfoResult(MessageParcel &data,
|
||||
MessageParcel &reply)
|
||||
{
|
||||
(void)data;
|
||||
(void)reply;
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
ErrCode AccessibilityElementOperatorCallbackStub::HandleSetFocusMoveSearchResult(MessageParcel &data,
|
||||
MessageParcel &reply)
|
||||
{
|
||||
(void)data;
|
||||
(void)reply;
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
ErrCode AccessibilityElementOperatorCallbackStub::HandleSetExecuteActionResult(MessageParcel &data,
|
||||
MessageParcel &reply)
|
||||
{
|
||||
(void)data;
|
||||
(void)reply;
|
||||
return NO_ERROR;
|
||||
}
|
||||
} // namespace Accessibility
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -35,70 +35,114 @@ AccessibilityElementOperatorStub::~AccessibilityElementOperatorStub()
|
||||
int AccessibilityElementOperatorStub::OnRemoteRequest(uint32_t code, MessageParcel &data,
|
||||
MessageParcel &reply, MessageOption &option)
|
||||
{
|
||||
(void)code;
|
||||
(void)data;
|
||||
(void)reply;
|
||||
(void)option;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ErrCode AccessibilityElementOperatorStub::HandleSearchElementInfoByAccessibilityId(MessageParcel &data,
|
||||
MessageParcel &reply)
|
||||
{
|
||||
(void)data;
|
||||
(void)reply;
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
ErrCode AccessibilityElementOperatorStub::HandleSearchElementInfosByText(MessageParcel &data,
|
||||
MessageParcel &reply)
|
||||
{
|
||||
(void)data;
|
||||
(void)reply;
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
ErrCode AccessibilityElementOperatorStub::HandleFindFocusedElementInfo(MessageParcel &data,
|
||||
MessageParcel &reply)
|
||||
{
|
||||
(void)data;
|
||||
(void)reply;
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
ErrCode AccessibilityElementOperatorStub::HandleFocusFind(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
(void)data;
|
||||
(void)reply;
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
ErrCode AccessibilityElementOperatorStub::HandleExecuteAction(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
(void)data;
|
||||
(void)reply;
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
ErrCode AccessibilityElementOperatorStub::HandleClearFocus(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
(void)data;
|
||||
(void)reply;
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
ErrCode AccessibilityElementOperatorStub::HandleOutsideTouch(MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
(void)data;
|
||||
(void)reply;
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
void AccessibilityElementOperatorStub::SearchElementInfoByAccessibilityId(const long elementId,
|
||||
const int requestId, const sptr<IAccessibilityElementOperatorCallback> &callback, const int mode)
|
||||
{}
|
||||
{
|
||||
(void)elementId;
|
||||
(void)requestId;
|
||||
(void)callback;
|
||||
(void)mode;
|
||||
}
|
||||
|
||||
void AccessibilityElementOperatorStub::SearchElementInfosByText(const long elementId,
|
||||
const std::string &text,
|
||||
const int requestId, const sptr<IAccessibilityElementOperatorCallback> &callback)
|
||||
{}
|
||||
{
|
||||
(void)elementId;
|
||||
(void)text;
|
||||
(void)requestId;
|
||||
(void)callback;
|
||||
}
|
||||
|
||||
void AccessibilityElementOperatorStub::FindFocusedElementInfo(const long elementId,
|
||||
const int focusType, const int requestId,
|
||||
const sptr<IAccessibilityElementOperatorCallback> &callback)
|
||||
{}
|
||||
{
|
||||
(void)elementId;
|
||||
(void)focusType;
|
||||
(void)requestId;
|
||||
(void)callback;
|
||||
}
|
||||
|
||||
void AccessibilityElementOperatorStub::FocusMoveSearch(const long elementId,
|
||||
const int direction, const int requestId,
|
||||
const sptr<IAccessibilityElementOperatorCallback> &callback)
|
||||
{}
|
||||
{
|
||||
(void)elementId;
|
||||
(void)direction;
|
||||
(void)requestId;
|
||||
(void)callback;
|
||||
}
|
||||
|
||||
void AccessibilityElementOperatorStub::ExecuteAction(const long elementId,
|
||||
const int action, const std::map<std::string, std::string> actionArguments,
|
||||
int requestId, const sptr<IAccessibilityElementOperatorCallback> &callback)
|
||||
{}
|
||||
{
|
||||
(void)elementId;
|
||||
(void)action;
|
||||
(void)actionArguments;
|
||||
(void)requestId;
|
||||
(void)callback;
|
||||
}
|
||||
|
||||
void AccessibilityElementOperatorStub::ClearFocus()
|
||||
{}
|
||||
@ -118,23 +162,38 @@ AccessibilityElementOperatorStub::CallbackImpl::CallbackImpl(const int requestId
|
||||
|
||||
void AccessibilityElementOperatorStub::CallbackImpl::SetSearchElementInfoByAccessibilityIdResult(
|
||||
const std::list<AccessibilityElementInfo> &infos, const int requestId)
|
||||
{}
|
||||
{
|
||||
(void)infos;
|
||||
(void)requestId;
|
||||
}
|
||||
|
||||
void AccessibilityElementOperatorStub::CallbackImpl::SetSearchElementInfoByTextResult(
|
||||
const std::list<AccessibilityElementInfo> &infos, const int requestId)
|
||||
{}
|
||||
{
|
||||
(void)infos;
|
||||
(void)requestId;
|
||||
}
|
||||
|
||||
void AccessibilityElementOperatorStub::CallbackImpl::SetFindFocusedElementInfoResult(
|
||||
const AccessibilityElementInfo &info, const int requestId)
|
||||
{}
|
||||
{
|
||||
(void)infos;
|
||||
(void)requestId;
|
||||
}
|
||||
|
||||
void AccessibilityElementOperatorStub::CallbackImpl::SetFocusMoveSearchResult(
|
||||
const AccessibilityElementInfo &info, const int requestId)
|
||||
{}
|
||||
{
|
||||
(void)infos;
|
||||
(void)requestId;
|
||||
}
|
||||
|
||||
void AccessibilityElementOperatorStub::CallbackImpl::SetExecuteActionResult(
|
||||
const bool succeeded, const int requestId)
|
||||
{}
|
||||
{
|
||||
(void)succeeded;
|
||||
(void)requestId;
|
||||
}
|
||||
|
||||
AccessibilityElementOperatorCallbacks AccessibilityElementOperatorStub::CallbackImpl::GetAACallbackList()
|
||||
{
|
||||
@ -142,6 +201,8 @@ AccessibilityElementOperatorCallbacks AccessibilityElementOperatorStub::Callback
|
||||
}
|
||||
|
||||
void AccessibilityElementOperatorStub::CallbackImpl::RemoveAACallbackList(int requestId)
|
||||
{}
|
||||
{
|
||||
(void)requestId;
|
||||
}
|
||||
} // namespace Accessibility
|
||||
} // namespace OHOS
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -21,22 +21,27 @@ namespace OHOS {
|
||||
namespace Accessibility {
|
||||
bool AccessibilityMemo::ReadFromParcel(Parcel &parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AccessibilityMemo::Marshalling(Parcel &parcel) const
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
AccessibilityMemo* AccessibilityMemo::Unmarshalling(Parcel& parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
AccessibilityMemo* accessibilityRecord = new AccessibilityMemo();
|
||||
return accessibilityRecord;
|
||||
}
|
||||
|
||||
void AccessibilityMemo::SetChannelId(const int channelId)
|
||||
{}
|
||||
{
|
||||
(void)channelId;
|
||||
}
|
||||
|
||||
int AccessibilityMemo::GetChannelId() const
|
||||
{
|
||||
@ -44,10 +49,13 @@ int AccessibilityMemo::GetChannelId() const
|
||||
}
|
||||
|
||||
void AccessibilityMemo::SetSource(const int componentId)
|
||||
{}
|
||||
{
|
||||
(void)componentId;
|
||||
}
|
||||
|
||||
bool AccessibilityMemo::GetSource(AccessibilityElementInfo &elementInfo) const
|
||||
{
|
||||
(void)elementInfo;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -62,7 +70,9 @@ int AccessibilityMemo::GetAccessibilityId() const
|
||||
}
|
||||
|
||||
void AccessibilityMemo::SetWindowId(const int windowId)
|
||||
{}
|
||||
{
|
||||
(void)windowId;
|
||||
}
|
||||
|
||||
int AccessibilityMemo::GetWindowId() const
|
||||
{
|
||||
@ -75,7 +85,9 @@ int AccessibilityMemo::GetCurrentIndex() const
|
||||
}
|
||||
|
||||
void AccessibilityMemo::SetCurrentIndex(const int index)
|
||||
{}
|
||||
{
|
||||
(void)index;
|
||||
}
|
||||
|
||||
int AccessibilityMemo::GetBeginIndex() const
|
||||
{
|
||||
@ -83,7 +95,9 @@ int AccessibilityMemo::GetBeginIndex() const
|
||||
}
|
||||
|
||||
void AccessibilityMemo::SetBeginIndex(const int index)
|
||||
{}
|
||||
{
|
||||
(void)index;
|
||||
}
|
||||
|
||||
int AccessibilityMemo::GetEndIndex() const
|
||||
{
|
||||
@ -91,7 +105,9 @@ int AccessibilityMemo::GetEndIndex() const
|
||||
}
|
||||
|
||||
void AccessibilityMemo::SetEndIndex(const int index)
|
||||
{}
|
||||
{
|
||||
(void)index;
|
||||
}
|
||||
|
||||
std::string AccessibilityMemo::GetComponentType() const
|
||||
{
|
||||
@ -99,7 +115,9 @@ std::string AccessibilityMemo::GetComponentType() const
|
||||
}
|
||||
|
||||
void AccessibilityMemo::SetComponentType(const std::string &className)
|
||||
{}
|
||||
{
|
||||
(void)className;
|
||||
}
|
||||
|
||||
std::string AccessibilityMemo::GetBeforeText() const
|
||||
{
|
||||
@ -107,10 +125,14 @@ std::string AccessibilityMemo::GetBeforeText() const
|
||||
}
|
||||
|
||||
void AccessibilityMemo::SetBeforeText(const std::string &beforeText)
|
||||
{}
|
||||
{
|
||||
(void)beforeText;
|
||||
}
|
||||
|
||||
void AccessibilityMemo::AddContent(const std::string &content)
|
||||
{}
|
||||
{
|
||||
(void)content;
|
||||
}
|
||||
|
||||
std::vector<std::string> AccessibilityMemo::GetContentList() const
|
||||
{
|
||||
@ -123,7 +145,9 @@ std::string AccessibilityMemo::GetLatestContent() const
|
||||
}
|
||||
|
||||
void AccessibilityMemo::SetLatestContent(const std::string &content)
|
||||
{}
|
||||
{
|
||||
(void)content;
|
||||
}
|
||||
|
||||
std::string AccessibilityMemo::GetDescription() const
|
||||
{
|
||||
@ -131,10 +155,14 @@ std::string AccessibilityMemo::GetDescription() const
|
||||
}
|
||||
|
||||
void AccessibilityMemo::SetDescription(const std::string &contentDescription)
|
||||
{}
|
||||
{
|
||||
(void)contentDescription;
|
||||
}
|
||||
|
||||
void AccessibilityMemo::SetItemCounts(const int itemCounts)
|
||||
{}
|
||||
{
|
||||
(void)itemCounts;
|
||||
}
|
||||
|
||||
int AccessibilityMemo::GetItemCounts() const
|
||||
{
|
||||
@ -143,16 +171,19 @@ int AccessibilityMemo::GetItemCounts() const
|
||||
|
||||
bool AccessibilityEventInfo::ReadFromParcel(Parcel &parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AccessibilityEventInfo::Marshalling(Parcel &parcel) const
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
};
|
||||
|
||||
AccessibilityEventInfo *AccessibilityEventInfo::Unmarshalling(Parcel& parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
AccessibilityEventInfo *accessibilityEventInfo = new AccessibilityEventInfo();
|
||||
return accessibilityEventInfo;
|
||||
}
|
||||
@ -163,10 +194,14 @@ int AccessibilityEventInfo::GetRecordCount() const
|
||||
}
|
||||
|
||||
void AccessibilityEventInfo::SetRecordCount(const int recordCount)
|
||||
{}
|
||||
{
|
||||
(void)recordCount;
|
||||
}
|
||||
|
||||
void AccessibilityEventInfo::AddRecord(const AccessibilityEventInfo &record)
|
||||
{}
|
||||
{
|
||||
(void)record;
|
||||
}
|
||||
|
||||
AccessibilityEventInfo AccessibilityEventInfo::GetRecord(const int index)
|
||||
{
|
||||
@ -189,7 +224,9 @@ WindowsContentChangeTypes AccessibilityEventInfo::GetWindowContentChangeTypes()
|
||||
}
|
||||
|
||||
void AccessibilityEventInfo::SetWindowContentChangeTypes(const WindowsContentChangeTypes changeTypes)
|
||||
{}
|
||||
{
|
||||
(void)changeTypes;
|
||||
}
|
||||
|
||||
WindowUpdateType AccessibilityEventInfo::GetWindowChangeTypes() const
|
||||
{
|
||||
@ -197,20 +234,24 @@ WindowUpdateType AccessibilityEventInfo::GetWindowChangeTypes() const
|
||||
}
|
||||
|
||||
void AccessibilityEventInfo::SetWindowChangeTypes(const WindowUpdateType changeTypes)
|
||||
{}
|
||||
{
|
||||
(void)changeTypes;
|
||||
}
|
||||
|
||||
void AccessibilityEventInfo::SetEventType(const EventType eventType)
|
||||
{
|
||||
eventType_ = eventType;
|
||||
}
|
||||
|
||||
long long AccessibilityEventInfo::GetTimeStamp() const
|
||||
int64_t AccessibilityEventInfo::GetTimeStamp() const
|
||||
{
|
||||
return timeStamp_;
|
||||
}
|
||||
|
||||
void AccessibilityEventInfo::SetTimeStamp(const long long eventTime)
|
||||
{}
|
||||
void AccessibilityEventInfo::SetTimeStamp(const int64_t eventTime)
|
||||
{
|
||||
(void)eventTime;
|
||||
}
|
||||
|
||||
std::string AccessibilityEventInfo::GetBundleName() const
|
||||
{
|
||||
@ -218,10 +259,14 @@ std::string AccessibilityEventInfo::GetBundleName() const
|
||||
}
|
||||
|
||||
void AccessibilityEventInfo::SetBundleName(const std::string &bundleName)
|
||||
{}
|
||||
{
|
||||
(void)bundleName;
|
||||
}
|
||||
|
||||
void AccessibilityEventInfo::SetTextMovementStep(const TextMoveUnit granularity)
|
||||
{}
|
||||
{
|
||||
(void)granularity;
|
||||
}
|
||||
|
||||
TextMoveUnit AccessibilityEventInfo::GetTextMovementStep() const
|
||||
{
|
||||
@ -229,7 +274,9 @@ TextMoveUnit AccessibilityEventInfo::GetTextMovementStep() const
|
||||
}
|
||||
|
||||
void AccessibilityEventInfo::SetTriggerAction(const ActionType action)
|
||||
{}
|
||||
{
|
||||
(void)action;
|
||||
}
|
||||
|
||||
ActionType AccessibilityEventInfo::GetTriggerAction() const
|
||||
{
|
||||
@ -237,13 +284,20 @@ ActionType AccessibilityEventInfo::GetTriggerAction() const
|
||||
}
|
||||
|
||||
AccessibilityEventInfo::AccessibilityEventInfo(int windowId, WindowUpdateType windowChangeTypes)
|
||||
{}
|
||||
{
|
||||
(void)windowId;
|
||||
(void)windowChangeTypes;
|
||||
}
|
||||
|
||||
AccessibilityEventInfo::AccessibilityEventInfo(EventType eventType)
|
||||
{}
|
||||
{
|
||||
(void)eventType;
|
||||
}
|
||||
|
||||
void AccessibilityEventInfo::SetNotificationInfo(const NotificationCategory category)
|
||||
{}
|
||||
{
|
||||
(void)category;
|
||||
}
|
||||
|
||||
NotificationCategory AccessibilityEventInfo::GetNotificationInfo() const
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -49,28 +49,35 @@ AccessibilityOperator &AccessibilityOperator::GetInstance()
|
||||
|
||||
sptr<IAccessibleAbilityChannel> AccessibilityOperator::GetChannel(int channelId)
|
||||
{
|
||||
(void)channelId;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator GetChannel";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void AccessibilityOperator::AddChannel(const int channelId, const sptr<IAccessibleAbilityChannel> &channel)
|
||||
{
|
||||
(void)channelId;
|
||||
(void)channel;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator AddChannel";
|
||||
}
|
||||
|
||||
void AccessibilityOperator::RemoveChannel(int channelId)
|
||||
{
|
||||
(void)channelId;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator RemoveChannel";
|
||||
}
|
||||
|
||||
bool AccessibilityOperator::GetRoot(int channelId, AccessibilityElementInfo &elementInfo)
|
||||
{
|
||||
(void)channelId;
|
||||
(void)elementInfo;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator GetRoot";
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<AccessibilityWindowInfo> AccessibilityOperator::GetWindows(int channelId)
|
||||
{
|
||||
(void)channelId;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator GetWindows";
|
||||
return windows_;
|
||||
}
|
||||
@ -78,6 +85,11 @@ std::vector<AccessibilityWindowInfo> AccessibilityOperator::GetWindows(int chann
|
||||
bool AccessibilityOperator::SearchElementInfosByAccessibilityId(int channelId,
|
||||
int accessibilityWindowId, int elementId, int mode, std::vector<AccessibilityElementInfo> &elementInfos)
|
||||
{
|
||||
(void)channelId;
|
||||
(void)accessibilityWindowId;
|
||||
(void)elementId;
|
||||
(void)mode;
|
||||
(void)elementInfos;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator SearchElementInfosByAccessibilityId";
|
||||
return true;
|
||||
}
|
||||
@ -86,6 +98,11 @@ bool AccessibilityOperator::SearchElementInfosByText(int channelId,
|
||||
int accessibilityWindowId, int elementId, const std::string &text,
|
||||
std::vector<AccessibilityElementInfo> &elementInfos)
|
||||
{
|
||||
(void)channelId;
|
||||
(void)accessibilityWindowId;
|
||||
(void)elementId;
|
||||
(void)text;
|
||||
(void)elementInfos;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator SearchElementInfosByText";
|
||||
return true;
|
||||
}
|
||||
@ -93,6 +110,11 @@ bool AccessibilityOperator::SearchElementInfosByText(int channelId,
|
||||
bool AccessibilityOperator::FindFocusedElementInfo(int channelId, int accessibilityWindowId,
|
||||
int elementId, int focusType, AccessibilityElementInfo &elementInfo)
|
||||
{
|
||||
(void)channelId;
|
||||
(void)accessibilityWindowId;
|
||||
(void)elementId;
|
||||
(void)focusType;
|
||||
(void)elementInfo;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator FindFocusedElementInfo";
|
||||
return true;
|
||||
}
|
||||
@ -100,6 +122,11 @@ bool AccessibilityOperator::FindFocusedElementInfo(int channelId, int accessibil
|
||||
bool AccessibilityOperator::FocusMoveSearch(int channelId, int accessibilityWindowId,
|
||||
int elementId, int direction, AccessibilityElementInfo &elementInfo)
|
||||
{
|
||||
(void)channelId;
|
||||
(void)accessibilityWindowId;
|
||||
(void)elementId;
|
||||
(void)direction;
|
||||
(void)elementInfo;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator FocusMoveSearch";
|
||||
return true;
|
||||
}
|
||||
@ -107,6 +134,11 @@ bool AccessibilityOperator::FocusMoveSearch(int channelId, int accessibilityWind
|
||||
bool AccessibilityOperator::ExecuteAction(int channelId, int accessibilityWindowId,
|
||||
int elementId, int action, std::map<std::string, std::string> &actionArguments)
|
||||
{
|
||||
(void)channelId;
|
||||
(void)accessibilityWindowId;
|
||||
(void)elementId;
|
||||
(void)action;
|
||||
(void)actionArguments;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator ExecuteAction";
|
||||
return executeActionResult_;
|
||||
}
|
||||
@ -114,61 +146,84 @@ bool AccessibilityOperator::ExecuteAction(int channelId, int accessibilityWindow
|
||||
void AccessibilityOperator::SetSearchElementInfoByAccessibilityIdResult(
|
||||
const std::vector<AccessibilityElementInfo> &infos, const int requestId)
|
||||
{
|
||||
(void)infos;
|
||||
(void)requestId;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator SetSearchElementInfoByAccessibilityIdResult";
|
||||
}
|
||||
|
||||
void AccessibilityOperator::SetSearchElementInfoByTextResult(const std::vector<AccessibilityElementInfo> &infos,
|
||||
const int requestId)
|
||||
{
|
||||
(void)infos;
|
||||
(void)requestId;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator SetSearchElementInfoByTextResult";
|
||||
}
|
||||
|
||||
void AccessibilityOperator::SetFindFocusedElementInfoResult(const AccessibilityElementInfo &info, const int requestId)
|
||||
{
|
||||
(void)info;
|
||||
(void)requestId;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator SetFindFocusedElementInfoResult";
|
||||
}
|
||||
|
||||
void AccessibilityOperator::SetFocusMoveSearchResult(const AccessibilityElementInfo &info, const int requestId)
|
||||
{
|
||||
(void)info;
|
||||
(void)requestId;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator SetFocusMoveSearchResult";
|
||||
}
|
||||
|
||||
void AccessibilityOperator::SetExecuteActionResult(const bool succeeded, const int requestId)
|
||||
{
|
||||
(void)succeeded;
|
||||
(void)requestId;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator SetExecuteActionResult";
|
||||
}
|
||||
|
||||
bool AccessibilityOperator::ExecuteCommonAction(const int channelId, const int action)
|
||||
{
|
||||
(void)channelId;
|
||||
(void)action;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator ExecuteCommonAction";
|
||||
return true;
|
||||
}
|
||||
|
||||
void AccessibilityOperator::SetOnKeyPressEventResult(const int channelId, const bool handled, const int sequence)
|
||||
{
|
||||
(void)channelId;
|
||||
(void)handled;
|
||||
(void)sequence;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator SetOnKeyPressEventResult";
|
||||
}
|
||||
|
||||
float AccessibilityOperator::GetDisplayResizeScale(const int channelId, const int displayId)
|
||||
{
|
||||
(void)channelId;
|
||||
(void)displayId;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator GetDisplayResizeScale";
|
||||
return 0;
|
||||
}
|
||||
|
||||
float AccessibilityOperator::GetDisplayResizeCenterX(const int channelId, const int displayId)
|
||||
{
|
||||
(void)channelId;
|
||||
(void)displayId;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator GetDisplayResizeCenterX";
|
||||
return 0;
|
||||
}
|
||||
|
||||
float AccessibilityOperator::GetDisplayResizeCenterY(const int channelId, const int displayId)
|
||||
{
|
||||
(void)channelId;
|
||||
(void)displayId;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator GetDisplayResizeCenterY";
|
||||
return 0;
|
||||
}
|
||||
|
||||
Rect AccessibilityOperator::GetDisplayResizeRect(const int channelId, const int displayId)
|
||||
{
|
||||
(void)channelId;
|
||||
(void)displayId;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator GetDisplayResizeRect";
|
||||
Rect rect {};
|
||||
rect.SetLeftTopScreenPostion(1, 1);
|
||||
@ -177,6 +232,9 @@ Rect AccessibilityOperator::GetDisplayResizeRect(const int channelId, const int
|
||||
|
||||
bool AccessibilityOperator::ResetDisplayResize(const int channelId, const int displayId, const bool animate)
|
||||
{
|
||||
(void)channelId;
|
||||
(void)displayId;
|
||||
(void)animate;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator ResetDisplayResize";
|
||||
return true;
|
||||
}
|
||||
@ -184,6 +242,12 @@ bool AccessibilityOperator::ResetDisplayResize(const int channelId, const int di
|
||||
bool AccessibilityOperator::SetDisplayResizeScaleAndCenter(const int channelId,
|
||||
const int displayId, const float scale, const float centerX, const float centerY, const bool animate)
|
||||
{
|
||||
(void)channelId;
|
||||
(void)displayId;
|
||||
(void)scale;
|
||||
(void)centerX;
|
||||
(void)centerY;
|
||||
(void)animate;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator SetDisplayResizeScaleAndCenter";
|
||||
return true;
|
||||
}
|
||||
@ -191,6 +255,9 @@ bool AccessibilityOperator::SetDisplayResizeScaleAndCenter(const int channelId,
|
||||
void AccessibilityOperator::SendSimulateGesture(const int channelId,
|
||||
const int requestId, const std::vector<GesturePathDefine> &gestureSteps)
|
||||
{
|
||||
(void)channelId;
|
||||
(void)requestId;
|
||||
(void)gestureSteps;
|
||||
GTEST_LOG_(INFO) << "MOCK AccessibilityOperator SendSimulateGesture";
|
||||
}
|
||||
} // namespace Accessibility
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -21,16 +21,19 @@ namespace OHOS {
|
||||
namespace Accessibility {
|
||||
bool AccessibilityWindowInfo::ReadFromParcel(Parcel &parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AccessibilityWindowInfo::Marshalling(Parcel &parcel) const
|
||||
{
|
||||
(void)parcel;
|
||||
return true;
|
||||
};
|
||||
|
||||
AccessibilityWindowInfo* AccessibilityWindowInfo::Unmarshalling(Parcel& parcel)
|
||||
{
|
||||
(void)parcel;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -40,7 +43,9 @@ std::string AccessibilityWindowInfo::GetWindowTitle() const
|
||||
}
|
||||
|
||||
void AccessibilityWindowInfo::SetWindowTitle(std::string &title)
|
||||
{}
|
||||
{
|
||||
(void)title;
|
||||
}
|
||||
|
||||
WindowType AccessibilityWindowInfo::GetWindowType() const
|
||||
{
|
||||
@ -48,7 +53,9 @@ WindowType AccessibilityWindowInfo::GetWindowType() const
|
||||
}
|
||||
|
||||
void AccessibilityWindowInfo::SetWindowType(const WindowType type)
|
||||
{}
|
||||
{
|
||||
(void)type;
|
||||
}
|
||||
|
||||
int AccessibilityWindowInfo::GetWindowLayer() const
|
||||
{
|
||||
@ -56,10 +63,13 @@ int AccessibilityWindowInfo::GetWindowLayer() const
|
||||
}
|
||||
|
||||
void AccessibilityWindowInfo::SetWindowLayer(const int layer)
|
||||
{}
|
||||
{
|
||||
(void)layer;
|
||||
}
|
||||
|
||||
bool AccessibilityWindowInfo::GetRootAccessibilityInfo(AccessibilityElementInfo &elementInfo)
|
||||
{
|
||||
(void)elementInfo;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -68,6 +78,7 @@ void AccessibilityWindowInfo::SetAnchorId(const int anchorId)
|
||||
|
||||
bool AccessibilityWindowInfo::GetAnchor(AccessibilityElementInfo &elementInfo)
|
||||
{
|
||||
(void)elementInfo;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -78,7 +89,9 @@ AccessibilityWindowInfo AccessibilityWindowInfo::GetParent()
|
||||
}
|
||||
|
||||
void AccessibilityWindowInfo::SetParentId(const int parentId)
|
||||
{}
|
||||
{
|
||||
(void)parentId;
|
||||
}
|
||||
|
||||
int AccessibilityWindowInfo::GetParentId() const
|
||||
{
|
||||
@ -100,10 +113,14 @@ int AccessibilityWindowInfo::GetWindowId() const
|
||||
}
|
||||
|
||||
void AccessibilityWindowInfo::SetWindowId(const int id)
|
||||
{}
|
||||
{
|
||||
(void)id;
|
||||
}
|
||||
|
||||
void AccessibilityWindowInfo::SetChannelId(const int channelId)
|
||||
{}
|
||||
{
|
||||
(void)channelId;
|
||||
}
|
||||
|
||||
int AccessibilityWindowInfo::GetChannelId() const
|
||||
{
|
||||
@ -116,7 +133,9 @@ Rect AccessibilityWindowInfo::GetRectInScreen() const
|
||||
}
|
||||
|
||||
void AccessibilityWindowInfo::SetRectInScreen(const Rect &bounds)
|
||||
{}
|
||||
{
|
||||
(void)bounds;
|
||||
}
|
||||
|
||||
bool AccessibilityWindowInfo::IsActive() const
|
||||
{
|
||||
@ -124,7 +143,9 @@ bool AccessibilityWindowInfo::IsActive() const
|
||||
}
|
||||
|
||||
void AccessibilityWindowInfo::SetActive(bool active)
|
||||
{}
|
||||
{
|
||||
(void)active;
|
||||
}
|
||||
|
||||
bool AccessibilityWindowInfo::IsFocused() const
|
||||
{
|
||||
@ -132,7 +153,9 @@ bool AccessibilityWindowInfo::IsFocused() const
|
||||
}
|
||||
|
||||
void AccessibilityWindowInfo::SetFocused(bool focused)
|
||||
{}
|
||||
{
|
||||
(void)focused;
|
||||
}
|
||||
|
||||
bool AccessibilityWindowInfo::IsAccessibilityFocused() const
|
||||
{
|
||||
@ -140,7 +163,9 @@ bool AccessibilityWindowInfo::IsAccessibilityFocused() const
|
||||
}
|
||||
|
||||
void AccessibilityWindowInfo::SetAccessibilityFocused(const bool accessibilityfocused)
|
||||
{}
|
||||
{
|
||||
(void)accessibilityfocused;
|
||||
}
|
||||
|
||||
int AccessibilityWindowInfo::GetChildNum() const
|
||||
{
|
||||
@ -149,12 +174,15 @@ int AccessibilityWindowInfo::GetChildNum() const
|
||||
|
||||
AccessibilityWindowInfo AccessibilityWindowInfo::GetChild(const int index)
|
||||
{
|
||||
(void)index;
|
||||
AccessibilityWindowInfo accessibilityWindow {};
|
||||
return accessibilityWindow;
|
||||
}
|
||||
|
||||
void AccessibilityWindowInfo::AddChild(const int childId)
|
||||
{}
|
||||
{
|
||||
(void)childId;
|
||||
}
|
||||
|
||||
AccessibilityWindowInfo::AccessibilityWindowInfo()
|
||||
{}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -27,12 +27,17 @@ AccessibleAbilityChannelProxy::AccessibleAbilityChannelProxy(
|
||||
|
||||
bool AccessibleAbilityChannelProxy::WriteInterfaceToken(MessageParcel &data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AccessibleAbilityChannelProxy::SendTransactCmd(IAccessibleAbilityChannel::Message code,
|
||||
MessageParcel &data, MessageParcel &reply, MessageOption &option)
|
||||
{
|
||||
(void)code;
|
||||
(void)data;
|
||||
(void)reply;
|
||||
(void)option;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -40,6 +45,11 @@ bool AccessibleAbilityChannelProxy::SearchElementInfoByAccessibilityId(const int
|
||||
const long elementId, const int requestId, const sptr<IAccessibilityElementOperatorCallback> &callback,
|
||||
const int mode)
|
||||
{
|
||||
(void)accessibilityWindowId;
|
||||
(void)elementId;
|
||||
(void)requestId;
|
||||
(void)callback;
|
||||
(void)mode;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -47,6 +57,11 @@ bool AccessibleAbilityChannelProxy::SearchElementInfosByText(const int accessibi
|
||||
const long elementId, const std::string &text, const int requestId,
|
||||
const sptr<IAccessibilityElementOperatorCallback> &callback)
|
||||
{
|
||||
(void)accessibilityWindowId;
|
||||
(void)elementId;
|
||||
(void)text;
|
||||
(void)requestId;
|
||||
(void)callback;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -54,12 +69,22 @@ bool AccessibleAbilityChannelProxy::FindFocusedElementInfo(const int accessibili
|
||||
const long elementId, const int focusType, const int requestId,
|
||||
const sptr<IAccessibilityElementOperatorCallback> &callback)
|
||||
{
|
||||
(void)accessibilityWindowId;
|
||||
(void)elementId;
|
||||
(void)focusType;
|
||||
(void)requestId;
|
||||
(void)callback;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AccessibleAbilityChannelProxy::FocusMoveSearch(const int accessibilityWindowId, const long elementId,
|
||||
const int direction, const int requestId, const sptr<IAccessibilityElementOperatorCallback> &callback)
|
||||
{
|
||||
(void)accessibilityWindowId;
|
||||
(void)elementId;
|
||||
(void)direction;
|
||||
(void)requestId;
|
||||
(void)callback;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -67,6 +92,12 @@ bool AccessibleAbilityChannelProxy::ExecuteAction(const int accessibilityWindowI
|
||||
const int action, std::map<std::string, std::string> &actionArguments, const int requestId,
|
||||
const sptr<IAccessibilityElementOperatorCallback> &callback)
|
||||
{
|
||||
(void)accessibilityWindowId;
|
||||
(void)elementId;
|
||||
(void)action;
|
||||
(void)actionArguments;
|
||||
(void)requestId;
|
||||
(void)callback;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -78,45 +109,64 @@ vector<AccessibilityWindowInfo> AccessibleAbilityChannelProxy::GetWindows()
|
||||
|
||||
bool AccessibleAbilityChannelProxy::ExecuteCommonAction(const int action)
|
||||
{
|
||||
(void)action;
|
||||
return true;
|
||||
}
|
||||
|
||||
void AccessibleAbilityChannelProxy::SetOnKeyPressEventResult(const bool handled, const int sequence)
|
||||
{}
|
||||
{
|
||||
(void)handled;
|
||||
(void)sequence;
|
||||
}
|
||||
|
||||
float AccessibleAbilityChannelProxy::GetDisplayResizeScale(const int displayId)
|
||||
{
|
||||
(void)displayId;
|
||||
return 0;
|
||||
}
|
||||
|
||||
float AccessibleAbilityChannelProxy::GetDisplayResizeCenterX(const int displayId)
|
||||
{
|
||||
(void)displayId;
|
||||
return 0;
|
||||
}
|
||||
|
||||
float AccessibleAbilityChannelProxy::GetDisplayResizeCenterY(const int displayId)
|
||||
{
|
||||
(void)displayId;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Rect AccessibleAbilityChannelProxy::GetDisplayResizeRect(const int displayId)
|
||||
{
|
||||
(void)displayId;
|
||||
Rect rect(0, 0, 0, 0);
|
||||
return rect;
|
||||
}
|
||||
|
||||
bool AccessibleAbilityChannelProxy::ResetDisplayResize(const int displayId, const bool animate)
|
||||
{
|
||||
(void)displayId;
|
||||
(void)animate;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AccessibleAbilityChannelProxy::SetDisplayResizeScaleAndCenter(const int displayId, const float scale,
|
||||
const float centerX, const float centerY, const bool animate)
|
||||
{
|
||||
(void)displayId;
|
||||
(void)scale;
|
||||
(void)centerX;
|
||||
(void)centerY;
|
||||
(void)animate;
|
||||
return true;
|
||||
}
|
||||
|
||||
void AccessibleAbilityChannelProxy::SendSimulateGesture(
|
||||
const int requestId, const std::vector<GesturePathDefine> &gestureSteps) {}
|
||||
const int requestId, const std::vector<GesturePathDefine> &gestureSteps)
|
||||
{
|
||||
(void)requestId;
|
||||
(void)gestureSteps;
|
||||
}
|
||||
} // namespace Accessibility
|
||||
} // namespace OHOS
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -41,8 +41,8 @@ uint32_t AccessibleAbilityManagerServiceClientProxy::RegisterStateCallback(
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
std::vector<AccessibilityAbilityInfo> AccessibleAbilityManagerServiceClientProxy::GetAbilityList(const int abilityTypes,
|
||||
const int stateType)
|
||||
std::vector<AccessibilityAbilityInfo> AccessibleAbilityManagerServiceClientProxy::GetAbilityList(
|
||||
const uint32_t abilityTypes, const int32_t stateType)
|
||||
{
|
||||
std::vector<AccessibilityAbilityInfo> abilityInfos {};
|
||||
return abilityInfos;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -69,12 +69,12 @@ GesturePathPositionDefine *GesturePathPositionDefine::Unmarshalling(Parcel &parc
|
||||
}
|
||||
|
||||
GesturePathDefine::GesturePathDefine(GesturePathPositionDefine &startPosition,
|
||||
GesturePathPositionDefine &endPosition, uint32_t durationTime)
|
||||
GesturePathPositionDefine &endPosition, int64_t durationTime)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MOCK GesturePathDefine";
|
||||
}
|
||||
|
||||
uint32_t GesturePathDefine::GetDurationTime()
|
||||
int64_t GesturePathDefine::GetDurationTime()
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MOCK GesturePathDefine GetDurationTime";
|
||||
return durationTime_;
|
||||
@ -86,7 +86,7 @@ GesturePathPositionDefine &GesturePathDefine::GetEndPosition()
|
||||
return endPosition_;
|
||||
}
|
||||
|
||||
uint32_t GesturePathDefine::GetMaxStrokeDuration()
|
||||
int64_t GesturePathDefine::GetMaxStrokeDuration()
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MOCK GesturePathDefine GetMaxStrokeDuration";
|
||||
return MAX_STROKE_DURATION;
|
||||
@ -104,7 +104,7 @@ GesturePathPositionDefine &GesturePathDefine::GetStartPosition()
|
||||
return startPosition_;
|
||||
}
|
||||
|
||||
void GesturePathDefine::SetDurationTime(uint32_t durationTime)
|
||||
void GesturePathDefine::SetDurationTime(int64_t durationTime)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MOCK GesturePathDefine SetDurationTime";
|
||||
durationTime_ = durationTime;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -66,7 +66,8 @@ public:
|
||||
* 2 indicates that the ability is disabled; 4 indicates that the ability has been installed.
|
||||
* @return
|
||||
*/
|
||||
virtual std::vector<AccessibilityAbilityInfo> GetAbilityList(const int abilityTypes, const int stateType) = 0;
|
||||
virtual std::vector<AccessibilityAbilityInfo> GetAbilityList(const uint32_t abilityTypes,
|
||||
const int32_t stateType) = 0;
|
||||
|
||||
/**
|
||||
* @brief Register the interaction operation, so the AA can get node info from ACE.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -74,7 +74,8 @@ public:
|
||||
* 2 indicates that the ability is disabled; 4 indicates that the ability has been installed.
|
||||
* @return
|
||||
*/
|
||||
virtual std::vector<AccessibilityAbilityInfo> GetAbilityList(const int abilityTypes, const int stateType) override;
|
||||
virtual std::vector<AccessibilityAbilityInfo> GetAbilityList(
|
||||
const uint32_t abilityTypes, const int32_t stateType) override;
|
||||
|
||||
/**
|
||||
* @brief Register the interaction operation, so the AA can get node info from ACE.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -89,14 +89,14 @@ public:
|
||||
~GesturePathDefine() {}
|
||||
|
||||
GesturePathDefine(GesturePathPositionDefine &startPosition,
|
||||
GesturePathPositionDefine &endPosition, uint32_t durationTime);
|
||||
GesturePathPositionDefine &endPosition, int64_t durationTime);
|
||||
|
||||
/**
|
||||
* @brief Obtains the duration for completing the maximum number of gesture strokes.
|
||||
* @param
|
||||
* @return Return the duration for completing the maximum number of gesture strokes.
|
||||
*/
|
||||
static uint32_t GetMaxStrokeDuration();
|
||||
static int64_t GetMaxStrokeDuration();
|
||||
|
||||
/**
|
||||
* @brief Obtains the maximum number of strokes in this gesture path.
|
||||
@ -110,7 +110,7 @@ public:
|
||||
* @param
|
||||
* @return Return the duration in which this gesture path continues.
|
||||
*/
|
||||
uint32_t GetDurationTime();
|
||||
int64_t GetDurationTime();
|
||||
|
||||
/**
|
||||
* @brief Obtains the end position of this gesture path.
|
||||
@ -131,7 +131,7 @@ public:
|
||||
* @param durationTime The duration for this gesture path to continue.
|
||||
* @return
|
||||
*/
|
||||
void SetDurationTime(uint32_t durationTime);
|
||||
void SetDurationTime(int64_t durationTime);
|
||||
|
||||
/**
|
||||
* @brief Sets the end position of this gesture path.
|
||||
@ -169,12 +169,12 @@ public:
|
||||
static GesturePathDefine *Unmarshalling(Parcel &parcel);
|
||||
|
||||
private:
|
||||
const static uint32_t MAX_STROKE_DURATION = 60 * 1000;
|
||||
const static int64_t MAX_STROKE_DURATION = 60 * 1000;
|
||||
const static uint32_t MAX_STROKES = 10;
|
||||
|
||||
GesturePathPositionDefine startPosition_;
|
||||
GesturePathPositionDefine endPosition_;
|
||||
uint32_t durationTime_ = 0;
|
||||
int64_t durationTime_ = 0;
|
||||
};
|
||||
|
||||
class GestureResultListener {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -20,6 +20,44 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace Accessibility {
|
||||
// text move step
|
||||
const std::string MOVE_UNIT_CHARACTER = "char";
|
||||
const std::string MOVE_UNIT_WORD = "word";
|
||||
const std::string MOVE_UNIT_LINE = "line";
|
||||
const std::string MOVE_UNIT_PAGE = "page";
|
||||
const std::string MOVE_UNIT_PARAGRAPH = "paragraph";
|
||||
|
||||
// Operation Arguments Type
|
||||
const std::string ACTION_ARGU_INVALID = "invalid";
|
||||
const std::string ACTION_ARGU_SELECT_TEXT_START = "selectTextBegin";
|
||||
const std::string ACTION_ARGU_SELECT_TEXT_END = "selectTextEnd";
|
||||
const std::string ACTION_ARGU_HTML_ELEMENT = "htmlItem";
|
||||
const std::string ACTION_ARGU_SET_TEXT = "setText";
|
||||
const std::string ACTION_ARGU_MOVE_UNIT = "textMoveUnit";
|
||||
|
||||
// HtmlItemType
|
||||
const std::string HTML_ITEM_INVALID = "invalid";
|
||||
const std::string HTML_ITEM_LINK = "link";
|
||||
const std::string HTML_ITEM_CONTROL = "control";
|
||||
const std::string HTML_ITEM_GRAPHIC = "graphic";
|
||||
const std::string HTML_ITEM_LIST_ITEM = "listItem";
|
||||
const std::string HTML_ITEM_LIST = "list";
|
||||
const std::string HTML_ITEM_TABLE = "table";
|
||||
const std::string HTML_ITEM_COMBOX = "combox";
|
||||
const std::string HTML_ITEM_HEADING = "heading";
|
||||
const std::string HTML_ITEM_BUTTON = "button";
|
||||
const std::string HTML_ITEM_CHECKBOX = "checkBox";
|
||||
const std::string HTML_ITEM_LANDMARK = "landmark";
|
||||
const std::string HTML_ITEM_TEXT_FIELD = "textField";
|
||||
const std::string HTML_ITEM_FOCUSABLE = "focusable";
|
||||
const std::string HTML_ITEM_H1 = "h1";
|
||||
const std::string HTML_ITEM_H2 = "h2";
|
||||
const std::string HTML_ITEM_H3 = "h3";
|
||||
const std::string HTML_ITEM_H4 = "h4";
|
||||
const std::string HTML_ITEM_H5 = "h5";
|
||||
const std::string HTML_ITEM_H6 = "h6";
|
||||
const std::string HTML_ITEM_UNKOWN = "unknown";
|
||||
|
||||
/* AccessibilityElementInfo Parcel struct */
|
||||
bool AccessibilityElementInfo::ReadFromParcel(Parcel &parcel)
|
||||
{
|
||||
@ -64,7 +102,7 @@ bool AccessibilityElementInfo::ReadFromParcel(Parcel &parcel)
|
||||
READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, clickable_);
|
||||
READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, longClickable_);
|
||||
READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, enable_);
|
||||
READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, password_);
|
||||
READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, isPassword_);
|
||||
READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, scrollable_);
|
||||
READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, editable_);
|
||||
READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, popupSupported_);
|
||||
@ -135,7 +173,7 @@ bool AccessibilityElementInfo::Marshalling(Parcel &parcel) const
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, clickable_);
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, longClickable_);
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, enable_);
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, password_);
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, isPassword_);
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, scrollable_);
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, editable_);
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, popupSupported_);
|
||||
@ -560,14 +598,14 @@ void AccessibilityElementInfo::SetEnabled(const bool enabled)
|
||||
|
||||
bool AccessibilityElementInfo::IsPassword() const
|
||||
{
|
||||
HILOG_DEBUG("password_[%{public}d]", password_);
|
||||
return password_;
|
||||
HILOG_DEBUG();
|
||||
return isPassword_;
|
||||
}
|
||||
|
||||
void AccessibilityElementInfo::SetPassword(const bool password)
|
||||
void AccessibilityElementInfo::SetPassword(const bool type)
|
||||
{
|
||||
password_ = password;
|
||||
HILOG_DEBUG("password_[%{public}d]", password_);
|
||||
HILOG_DEBUG("type[%{public}d]", type);
|
||||
isPassword_ = type;
|
||||
}
|
||||
|
||||
bool AccessibilityElementInfo::IsScrollable() const
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -29,7 +29,7 @@ bool AccessibilityElementAsyncOperatorMng::SearchElementResultTimer(const int se
|
||||
std::lock_guard<std::recursive_mutex> lock(mutex_);
|
||||
struct timeval getTime {};
|
||||
gettimeofday(&getTime, NULL);
|
||||
uint64_t startTime = getTime.tv_sec * SECOND_TO_MILLIS + getTime.tv_usec;
|
||||
uint64_t startTime = (uint64_t)(getTime.tv_sec * SECOND_TO_MILLIS + getTime.tv_usec);
|
||||
HILOG_DEBUG("element sequence[%{public}d]", sequence);
|
||||
|
||||
do {
|
||||
@ -37,8 +37,8 @@ bool AccessibilityElementAsyncOperatorMng::SearchElementResultTimer(const int se
|
||||
return true;
|
||||
}
|
||||
gettimeofday(&getTime, NULL);
|
||||
uint64_t endTime = getTime.tv_sec * SECOND_TO_MILLIS + getTime.tv_usec;
|
||||
uint64_t waitTime = endTime - startTime;
|
||||
uint64_t endTime = (uint64_t)(getTime.tv_sec * SECOND_TO_MILLIS + getTime.tv_usec);
|
||||
uint64_t waitTime = (uint64_t)(endTime - startTime);
|
||||
if (TIMEOUT_OPERATOR_MILLIS < waitTime) {
|
||||
completed_ = true;
|
||||
HILOG_ERROR("Failed to wait sequence[%{public}d], feedbackSequence_[%{public}d]",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -70,13 +70,15 @@ int AccessibilityElementOperatorCallbackStub::OnRemoteRequest(uint32_t code, Mes
|
||||
}
|
||||
|
||||
ErrCode AccessibilityElementOperatorCallbackStub::HandleSetSearchElementInfoByAccessibilityIdResult(
|
||||
MessageParcel &data,
|
||||
MessageParcel &reply)
|
||||
MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
HILOG_DEBUG("start");
|
||||
|
||||
std::vector<AccessibilityElementInfo> infos {};
|
||||
int32_t accessibilityInfosize = data.ReadInt32();
|
||||
if (!accessibilityInfosize) {
|
||||
HILOG_ERROR("accessibilityInfosize is 0");
|
||||
return ERROR;
|
||||
}
|
||||
for (int i = 0; i < accessibilityInfosize; i++) {
|
||||
sptr<AccessibilityElementInfo> accessibilityInfo = data.ReadStrongParcelable<AccessibilityElementInfo>();
|
||||
if (!accessibilityInfo) {
|
||||
@ -92,13 +94,15 @@ ErrCode AccessibilityElementOperatorCallbackStub::HandleSetSearchElementInfoByAc
|
||||
}
|
||||
|
||||
ErrCode AccessibilityElementOperatorCallbackStub::HandleSetSearchElementInfoByTextResult(
|
||||
MessageParcel &data,
|
||||
MessageParcel &reply)
|
||||
MessageParcel &data, MessageParcel &reply)
|
||||
{
|
||||
HILOG_DEBUG("start");
|
||||
|
||||
std::vector<AccessibilityElementInfo> infos {};
|
||||
int32_t accessibilityInfosize = data.ReadInt32();
|
||||
if (!accessibilityInfosize) {
|
||||
HILOG_ERROR("accessibilityInfosize is 0");
|
||||
return ERROR;
|
||||
}
|
||||
for (int i = 0; i < accessibilityInfosize; i++) {
|
||||
sptr<AccessibilityElementInfo> accessibilityInfo = data.ReadStrongParcelable<AccessibilityElementInfo>();
|
||||
if (!accessibilityInfo) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -451,13 +451,13 @@ void AccessibilityEventInfo::SetEventType(const EventType eventType)
|
||||
HILOG_DEBUG("eventType_[%{public}d]", eventType_);
|
||||
}
|
||||
|
||||
long long AccessibilityEventInfo::GetTimeStamp() const
|
||||
int64_t AccessibilityEventInfo::GetTimeStamp() const
|
||||
{
|
||||
HILOG_DEBUG("start");
|
||||
return timeStamp_;
|
||||
}
|
||||
|
||||
void AccessibilityEventInfo::SetTimeStamp(const long long eventTime)
|
||||
void AccessibilityEventInfo::SetTimeStamp(const int64_t eventTime)
|
||||
{
|
||||
HILOG_DEBUG("start");
|
||||
timeStamp_ = eventTime;
|
||||
@ -500,16 +500,14 @@ ActionType AccessibilityEventInfo::GetTriggerAction() const
|
||||
}
|
||||
|
||||
AccessibilityEventInfo::AccessibilityEventInfo(int windowId, WindowUpdateType windowChangeTypes)
|
||||
: eventType_(TYPE_WINDOW_UPDATE), windowChangeTypes_(windowChangeTypes)
|
||||
{
|
||||
HILOG_DEBUG("start");
|
||||
eventType_ = TYPE_WINDOW_UPDATE;
|
||||
windowChangeTypes_ = windowChangeTypes;
|
||||
SetWindowId(windowId);
|
||||
}
|
||||
|
||||
AccessibilityEventInfo::AccessibilityEventInfo(EventType eventType)
|
||||
AccessibilityEventInfo::AccessibilityEventInfo(EventType eventType) : eventType_(eventType)
|
||||
{
|
||||
eventType_ = eventType;
|
||||
HILOG_DEBUG("eventType_[%{public}d]", eventType_);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -283,11 +283,11 @@ void AccessibilityOperator::SetSearchElementInfoByAccessibilityIdResult(
|
||||
{
|
||||
HILOG_DEBUG("Response[elementInfoSize:%{public}d] [sequenceNum:%{public}d]",
|
||||
infos.size(), sequenceNum);
|
||||
asyncElementOperatorMng_.UpdateSearchFeedback(sequenceNum);
|
||||
for (auto iter = infos.begin(); iter != infos.end(); iter++) {
|
||||
HILOG_DEBUG("Response");
|
||||
elementInfosResult_.push_back(*iter);
|
||||
}
|
||||
asyncElementOperatorMng_.UpdateSearchFeedback(sequenceNum);
|
||||
HILOG_DEBUG("Response [sequenceNum:%{public}d] end", sequenceNum);
|
||||
}
|
||||
|
||||
@ -296,10 +296,10 @@ void AccessibilityOperator::SetSearchElementInfoByTextResult(const std::vector<A
|
||||
{
|
||||
HILOG_DEBUG("Response [elementInfoSize:%{public}d] [sequenceNum:%{public}d]",
|
||||
infos.size(), sequenceNum);
|
||||
asyncElementOperatorMng_.UpdateSearchFeedback(sequenceNum);
|
||||
for (auto iter = infos.begin(); iter != infos.end(); iter++) {
|
||||
elementInfosResult_.push_back(*iter);
|
||||
}
|
||||
asyncElementOperatorMng_.UpdateSearchFeedback(sequenceNum);
|
||||
HILOG_DEBUG("Response [sequenceNum:%{public}d] end", sequenceNum);
|
||||
}
|
||||
|
||||
@ -307,16 +307,16 @@ void AccessibilityOperator::SetFindFocusedElementInfoResult(const AccessibilityE
|
||||
const int sequenceNum)
|
||||
{
|
||||
HILOG_DEBUG("Response [sequenceNum:%{public}d]", sequenceNum);
|
||||
asyncElementOperatorMng_.UpdateSearchFeedback(sequenceNum);
|
||||
accessibilityInfoResult_ = info;
|
||||
asyncElementOperatorMng_.UpdateSearchFeedback(sequenceNum);
|
||||
HILOG_DEBUG("Response [sequenceNum:%{public}d] end", sequenceNum);
|
||||
}
|
||||
|
||||
void AccessibilityOperator::SetFocusMoveSearchResult(const AccessibilityElementInfo &info, const int sequenceNum)
|
||||
{
|
||||
HILOG_DEBUG("Response [sequenceNum:%{public}d]", sequenceNum);
|
||||
asyncElementOperatorMng_.UpdateSearchFeedback(sequenceNum);
|
||||
accessibilityInfoResult_ = info;
|
||||
asyncElementOperatorMng_.UpdateSearchFeedback(sequenceNum);
|
||||
HILOG_DEBUG("Response [sequenceNum:%{public}d] end", sequenceNum);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -231,7 +231,7 @@ bool AccessibilitySystemAbilityClient::IsCaptionEnabled()
|
||||
}
|
||||
|
||||
std::vector<AccessibilityAbilityInfo> AccessibilitySystemAbilityClient::GetAbilityList(
|
||||
const int accessibilityAbilityTypes, const AbilityStateType stateType)
|
||||
const uint32_t accessibilityAbilityTypes, const AbilityStateType stateType)
|
||||
{
|
||||
HILOG_DEBUG("start");
|
||||
bool check = false;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -344,6 +344,10 @@ ErrCode AccessibleAbilityChannelStub::HandleSendSimulateGesture(MessageParcel &d
|
||||
|
||||
vector<GesturePathDefine> gestureSteps;
|
||||
int32_t stepSize = data.ReadInt32();
|
||||
if (!stepSize) {
|
||||
HILOG_ERROR("stepSize is 0");
|
||||
return ERROR;
|
||||
}
|
||||
for (int32_t i = 0; i < stepSize; i++) {
|
||||
std::shared_ptr<GesturePathDefine> gestureStep(data.ReadParcelable<GesturePathDefine>());
|
||||
if (!gestureStep) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -50,6 +50,10 @@ ErrCode AccessibleAbilityManagerServiceCaptionPropertyStub::HandleOnCaptionPrope
|
||||
{
|
||||
HILOG_DEBUG("start");
|
||||
CaptionProperty* caption = data.ReadParcelable<CaptionProperty>();
|
||||
if (!caption) {
|
||||
HILOG_ERROR("ReadParcelable<CaptionProperty> failed");
|
||||
return ERROR;
|
||||
}
|
||||
OnCaptionPropertyChanged(*caption);
|
||||
|
||||
return NO_ERROR;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -202,7 +202,7 @@ uint32_t AccessibleAbilityManagerServiceClientProxy::RegisterStateCallback(
|
||||
}
|
||||
|
||||
std::vector<AccessibilityAbilityInfo> AccessibleAbilityManagerServiceClientProxy::GetAbilityList(
|
||||
const int abilityTypes, const int stateType)
|
||||
const uint32_t abilityTypes, const int32_t stateType)
|
||||
{
|
||||
HILOG_DEBUG("start");
|
||||
|
||||
@ -217,7 +217,7 @@ std::vector<AccessibilityAbilityInfo> AccessibleAbilityManagerServiceClientProxy
|
||||
return errorList;
|
||||
}
|
||||
|
||||
if (!data.WriteInt32(abilityTypes)) {
|
||||
if (!data.WriteUint32(abilityTypes)) {
|
||||
HILOG_ERROR("fail, connection write abilityTypes error");
|
||||
return errorList;
|
||||
}
|
||||
@ -666,6 +666,10 @@ std::map<std::string, AppExecFwk::ElementName> AccessibleAbilityManagerServiceCl
|
||||
std::vector<AppExecFwk::ElementName> temp {};
|
||||
for (int i = dev_num; i > 0; i--) {
|
||||
std::unique_ptr<AppExecFwk::ElementName> iter(reply.ReadParcelable<AppExecFwk::ElementName>());
|
||||
if (!iter) {
|
||||
HILOG_ERROR("ReadParcelable<AppExecFwk::ElementName> failed");
|
||||
return it;
|
||||
}
|
||||
temp.push_back(*iter);
|
||||
}
|
||||
|
||||
@ -698,6 +702,10 @@ std::vector<AccessibilityAbilityInfo> AccessibleAbilityManagerServiceClientProxy
|
||||
int dev_num = reply.ReadInt32();
|
||||
for (int i = dev_num; i > 0; i--) {
|
||||
std::unique_ptr<AccessibilityAbilityInfo> dev(reply.ReadParcelable<AccessibilityAbilityInfo>());
|
||||
if (!dev) {
|
||||
HILOG_ERROR("ReadParcelable<accessibilityAbilityInfo> failed");
|
||||
return it;
|
||||
}
|
||||
it.push_back(*dev);
|
||||
}
|
||||
return it;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -49,7 +49,7 @@ ErrCode AccessibleAbilityManagerServiceStateStub::HandleOnStateChanged(MessagePa
|
||||
MessageParcel &reply)
|
||||
{
|
||||
HILOG_DEBUG("start");
|
||||
int stateType = data.ReadUint32();
|
||||
uint32_t stateType = data.ReadUint32();
|
||||
OnStateChanged(stateType);
|
||||
|
||||
return NO_ERROR;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -151,12 +151,12 @@ ErrCode AccessibleAbilityManagerServiceClientStub::HandleGetAbilityList(MessageP
|
||||
{
|
||||
HILOG_DEBUG("start");
|
||||
|
||||
int abilityTypes = data.ReadInt32();
|
||||
int stateType = data.ReadInt32();
|
||||
uint32_t abilityTypes = data.ReadUint32();
|
||||
int32_t stateType = data.ReadInt32();
|
||||
std::vector<AccessibilityAbilityInfo> abilityInfos {};
|
||||
abilityInfos = GetAbilityList(abilityTypes, stateType);
|
||||
|
||||
int32_t abilityInfoSize = abilityInfos.size();
|
||||
int32_t abilityInfoSize = (int32_t)abilityInfos.size();
|
||||
reply.WriteInt32(abilityInfoSize);
|
||||
for (auto& abilityInfo : abilityInfos) {
|
||||
if (!reply.WriteParcelable(&abilityInfo)) {
|
||||
@ -339,17 +339,19 @@ ErrCode AccessibleAbilityManagerServiceClientStub::HandleSetKeyEventObserverStat
|
||||
ErrCode AccessibleAbilityManagerServiceClientStub::HandleSetEnabledObj(MessageParcel& data, MessageParcel& reply)
|
||||
{
|
||||
HILOG_DEBUG("start");
|
||||
|
||||
std::map<std::string, AppExecFwk::ElementName> it {};
|
||||
int dev_num = data.ReadInt32();
|
||||
if (!dev_num) {
|
||||
HILOG_DEBUG("ReadParcelable failed");
|
||||
HILOG_DEBUG("ReadParcelable failed, dev_num is 0");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
std::vector<AppExecFwk::ElementName> temp {};
|
||||
for (int i = dev_num; i > 0; i--) {
|
||||
std::unique_ptr<AppExecFwk::ElementName> iter(data.ReadParcelable<AppExecFwk::ElementName>());
|
||||
if (!iter) {
|
||||
HILOG_ERROR("ReadParcelable<AppExecFwk::ElementName> failed");
|
||||
return ERROR;
|
||||
}
|
||||
temp.push_back(*iter);
|
||||
}
|
||||
for (int i = 0; i < dev_num; i++) {
|
||||
@ -384,10 +386,10 @@ ErrCode AccessibleAbilityManagerServiceClientStub::HandleGetInstalledAbilities(
|
||||
HILOG_DEBUG("start");
|
||||
|
||||
std::vector<AccessibilityAbilityInfo> it = GetInstalledAbilities();
|
||||
int num = it.size();
|
||||
int32_t num = (int32_t)it.size();
|
||||
|
||||
reply.WriteInt32(it.size());
|
||||
for (int i = 0; i < num; i++) {
|
||||
reply.WriteInt32(num);
|
||||
for (int32_t i = 0; i < num; i++) {
|
||||
bool ret = reply.WriteParcelable(&it[i]);
|
||||
if (!ret) {
|
||||
return ErrCode::ERROR;
|
||||
@ -403,13 +405,16 @@ ErrCode AccessibleAbilityManagerServiceClientStub::HandleDisableAbilities(Messag
|
||||
std::map<std::string, AppExecFwk::ElementName> it {};
|
||||
int dev_num = data.ReadInt32();
|
||||
if (!dev_num) {
|
||||
HILOG_DEBUG("ReadParcelable failed");
|
||||
HILOG_DEBUG("ReadParcelable failed, dev_num is 0");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
std::vector<AppExecFwk::ElementName> temp {};
|
||||
for (int i = dev_num; i > 0; i--) {
|
||||
std::unique_ptr<AppExecFwk::ElementName> iter(data.ReadParcelable<AppExecFwk::ElementName>());
|
||||
if (!iter) {
|
||||
HILOG_ERROR("ReadParcelable<AppExecFwk::ElementName> failed");
|
||||
return ERROR;
|
||||
}
|
||||
temp.push_back(*iter);
|
||||
}
|
||||
for (int i = 0; i < dev_num; i++) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -81,7 +81,7 @@ GesturePathPositionDefine *GesturePathPositionDefine::Unmarshalling(Parcel &parc
|
||||
}
|
||||
|
||||
GesturePathDefine::GesturePathDefine(GesturePathPositionDefine &startPosition,
|
||||
GesturePathPositionDefine &endPosition, uint32_t durationTime)
|
||||
GesturePathPositionDefine &endPosition, int64_t durationTime)
|
||||
{
|
||||
HILOG_DEBUG("start.");
|
||||
|
||||
@ -102,9 +102,9 @@ GesturePathDefine::GesturePathDefine(GesturePathPositionDefine &startPosition,
|
||||
durationTime_ = durationTime;
|
||||
}
|
||||
|
||||
uint32_t GesturePathDefine::GetDurationTime()
|
||||
int64_t GesturePathDefine::GetDurationTime()
|
||||
{
|
||||
HILOG_DEBUG("start and max stroke duration is %{public}d", durationTime_);
|
||||
HILOG_DEBUG("start and max stroke duration is %{public}lld", durationTime_);
|
||||
return durationTime_;
|
||||
}
|
||||
|
||||
@ -114,9 +114,9 @@ GesturePathPositionDefine &GesturePathDefine::GetEndPosition()
|
||||
return endPosition_;
|
||||
}
|
||||
|
||||
uint32_t GesturePathDefine::GetMaxStrokeDuration()
|
||||
int64_t GesturePathDefine::GetMaxStrokeDuration()
|
||||
{
|
||||
HILOG_DEBUG("start and max stroke duration is %{public}d", MAX_STROKE_DURATION);
|
||||
HILOG_DEBUG("start and max stroke duration is %{public}lld", MAX_STROKE_DURATION);
|
||||
return MAX_STROKE_DURATION;
|
||||
}
|
||||
|
||||
@ -132,7 +132,7 @@ GesturePathPositionDefine &GesturePathDefine::GetStartPosition()
|
||||
return startPosition_;
|
||||
}
|
||||
|
||||
void GesturePathDefine::SetDurationTime(uint32_t durationTime)
|
||||
void GesturePathDefine::SetDurationTime(int64_t durationTime)
|
||||
{
|
||||
HILOG_DEBUG("start.");
|
||||
durationTime_ = durationTime;
|
||||
@ -168,7 +168,7 @@ bool GesturePathDefine::ReadFromParcel(Parcel &parcel)
|
||||
}
|
||||
endPosition_ = *endPosition;
|
||||
|
||||
READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Uint32, parcel, durationTime_);
|
||||
READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int64, parcel, durationTime_);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -178,7 +178,7 @@ bool GesturePathDefine::Marshalling(Parcel &parcel) const
|
||||
HILOG_DEBUG("start.");
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Parcelable, parcel, &startPosition_);
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Parcelable, parcel, &endPosition_);
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Uint32, parcel, durationTime_);
|
||||
WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int64, parcel, durationTime_);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
# Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -30,6 +30,11 @@ bool MockAccessibleAbilityChannel::SearchElementInfoByAccessibilityId(const int
|
||||
const sptr<IAccessibilityElementOperatorCallback> &callback, const int mode)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MockAccessibleAbilityChannel::SearchElementInfoByAccessibilityId start";
|
||||
(void)accessibilityWindowId;
|
||||
(void)elementId;
|
||||
(void)requestId;
|
||||
(void)callback;
|
||||
(void)mode;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -37,6 +42,11 @@ bool MockAccessibleAbilityChannel::SearchElementInfosByText(const int accessibil
|
||||
const std::string &text, const int requestId, const sptr<IAccessibilityElementOperatorCallback> &callback)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MockAccessibleAbilityChannel::SearchElementInfosByText start";
|
||||
(void)accessibilityWindowId;
|
||||
(void)elementId;
|
||||
(void)text;
|
||||
(void)requestId;
|
||||
(void)callback;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -44,6 +54,11 @@ bool MockAccessibleAbilityChannel::FindFocusedElementInfo(const int accessibilit
|
||||
const int focusType, const int requestId, const sptr<IAccessibilityElementOperatorCallback> &callback)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MockAccessibleAbilityChannel::FindFocusedElementInfo start";
|
||||
(void)accessibilityWindowId;
|
||||
(void)elementId;
|
||||
(void)focusType;
|
||||
(void)requestId;
|
||||
(void)callback;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -51,6 +66,11 @@ bool MockAccessibleAbilityChannel::FocusMoveSearch(const int accessibilityWindow
|
||||
const int direction, const int requestId, const sptr<IAccessibilityElementOperatorCallback> &callback)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MockAccessibleAbilityChannel::FocusMoveSearch start";
|
||||
(void)accessibilityWindowId;
|
||||
(void)elementId;
|
||||
(void)direction;
|
||||
(void)requestId;
|
||||
(void)callback;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -59,6 +79,12 @@ bool MockAccessibleAbilityChannel::ExecuteAction(const int accessibilityWindowId
|
||||
const int requestId, const sptr<IAccessibilityElementOperatorCallback> &callback)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MockAccessibleAbilityChannel::ExecuteAction start";
|
||||
(void)accessibilityWindowId;
|
||||
(void)elementId;
|
||||
(void)action;
|
||||
(void)actionArguments;
|
||||
(void)requestId;
|
||||
(void)callback;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -72,35 +98,42 @@ std::vector<AccessibilityWindowInfo> MockAccessibleAbilityChannel::GetWindows()
|
||||
bool MockAccessibleAbilityChannel::ExecuteCommonAction(const int action)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MockAccessibleAbilityChannel::ExecuteCommonAction start";
|
||||
(void)action;
|
||||
return true;
|
||||
}
|
||||
|
||||
void MockAccessibleAbilityChannel::SetOnKeyPressEventResult(const bool handled, const int sequence)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MockAccessibleAbilityChannel::SetOnKeyPressEventResult start";
|
||||
(void)handled;
|
||||
(void)sequence;
|
||||
}
|
||||
|
||||
float MockAccessibleAbilityChannel::GetDisplayResizeScale(const int displayId)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MockAccessibleAbilityChannel::GetDisplayResizeScale start";
|
||||
(void)displayId;
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
float MockAccessibleAbilityChannel::GetDisplayResizeCenterX(const int displayId)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MockAccessibleAbilityChannel::GetDisplayResizeCenterX start";
|
||||
(void)displayId;
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
float MockAccessibleAbilityChannel::GetDisplayResizeCenterY(const int displayId)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MockAccessibleAbilityChannel::GetDisplayResizeCenterY start";
|
||||
(void)displayId;
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
Rect MockAccessibleAbilityChannel::GetDisplayResizeRect(const int displayId)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MockAccessibleAbilityChannel::GetDisplayResizeRect start";
|
||||
(void)displayId;
|
||||
Rect rect(RECT_ONE, RECT_TWO, RECT_THREE, RECT_FOUR);
|
||||
return rect;
|
||||
}
|
||||
@ -108,6 +141,8 @@ Rect MockAccessibleAbilityChannel::GetDisplayResizeRect(const int displayId)
|
||||
bool MockAccessibleAbilityChannel::ResetDisplayResize(const int displayId, const bool animate)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MockAccessibleAbilityChannel::ResetDisplayResize start";
|
||||
(void)displayId;
|
||||
(void)animate;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -115,6 +150,11 @@ bool MockAccessibleAbilityChannel::SetDisplayResizeScaleAndCenter(const int disp
|
||||
const float scale, const float centerX, const float centerY, const bool animate)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MockAccessibleAbilityChannel::SetDisplayResizeScaleAndCenter start";
|
||||
(void)displayId;
|
||||
(void)scale;
|
||||
(void)centerX;
|
||||
(void)centerY;
|
||||
(void)animate;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -122,6 +162,8 @@ void MockAccessibleAbilityChannel::SendSimulateGesture(const int requestId,
|
||||
const std::vector<GesturePathDefine> &gestureSteps)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "MockAccessibleAbilityChannel::SendSimulateGesture start";
|
||||
(void)requestId;
|
||||
(void)gestureSteps;
|
||||
}
|
||||
|
||||
sptr<IRemoteObject> MockAccessibleAbilityChannel::AsObject()
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -41,7 +41,7 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::vector<AccessibilityAbilityInfo> GetAbilityList(const int abilityTypes, const int stateType)
|
||||
std::vector<AccessibilityAbilityInfo> GetAbilityList(const uint32_t abilityTypes, const int32_t stateType)
|
||||
{
|
||||
AccessibilityAbilityInfo info {};
|
||||
std::vector<AccessibilityAbilityInfo> infos;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -35,7 +35,7 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::vector<AccessibilityAbilityInfo> GetAbilityList(const int abilityTypes, const int stateType)
|
||||
std::vector<AccessibilityAbilityInfo> GetAbilityList(const uint32_t abilityTypes, const int32_t stateType)
|
||||
{
|
||||
std::vector<AccessibilityAbilityInfo> infos;
|
||||
return infos;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
* Copyright (C) 2022 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -50,7 +50,7 @@ public:
|
||||
void AccessibilityAbilityInfoUnitTest::WritefileAll(const char* fname, const char* data)
|
||||
{
|
||||
FILE *fp;
|
||||
if ((fp = fopen(fname, "w")) == NULL) {
|
||||
if ((fp = fopen(fname, "w")) == nullptr) {
|
||||
printf("open file %s fail \n", fname);
|
||||
return;
|
||||
}
|
||||
@ -179,7 +179,7 @@ HWTEST_F(AccessibilityAbilityInfoUnitTest, AccessibilityAbilityInfo_Unittest_Get
|
||||
HWTEST_F(AccessibilityAbilityInfoUnitTest, AccessibilityAbilityInfo_Unittest_GetEventTypes_001, TestSize.Level1)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AccessibilityAbilityInfo_Unittest_GetEventTypes_001 start";
|
||||
uint32_t eventType = 0; // (uint32_t)EventType::TYPES_ALL_MASK
|
||||
uint32_t eventType = EventType::TYPES_ALL_MASK;
|
||||
EXPECT_EQ(accessibilityAbilityInfo_->GetEventTypes(), eventType);
|
||||
|
||||
GTEST_LOG_(INFO) << "AccessibilityAbilityInfo_Unittest_GetEventTypes_001 end";
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user