Bugfix: fix eventType sort problem

Signed-off-by: xiehd <xiehuandong@huawei.com>
This commit is contained in:
xiehd 2024-07-24 13:21:45 +08:00
parent 823072ae9a
commit 2f89dc3059
2 changed files with 3 additions and 3 deletions

View File

@ -205,8 +205,6 @@ Accessibility::EventType ConvertAceEventType(AccessibilityEventType type)
{ AccessibilityEventType::HOVER_EXIT_EVENT, Accessibility::EventType::TYPE_VIEW_HOVER_EXIT_EVENT },
{ AccessibilityEventType::CHANGE, Accessibility::EventType::TYPE_PAGE_CONTENT_UPDATE },
{ AccessibilityEventType::COMPONENT_CHANGE, Accessibility::EventType::TYPE_VIEW_TEXT_UPDATE_EVENT },
{ AccessibilityEventType::PAGE_OPEN, Accessibility::EventType::TYPE_PAGE_OPEN },
{ AccessibilityEventType::PAGE_CLOSE, Accessibility::EventType::TYPE_PAGE_CLOSE },
{ AccessibilityEventType::SCROLL_END, Accessibility::EventType::TYPE_VIEW_SCROLLED_EVENT },
{ AccessibilityEventType::TEXT_SELECTION_UPDATE,
Accessibility::EventType::TYPE_VIEW_TEXT_SELECTION_UPDATE_EVENT },
@ -216,6 +214,8 @@ Accessibility::EventType ConvertAceEventType(AccessibilityEventType type)
Accessibility::EventType::TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED_EVENT },
{ AccessibilityEventType::TEXT_MOVE_UNIT, Accessibility::EventType::TYPE_VIEW_TEXT_MOVE_UNIT_EVENT },
{ AccessibilityEventType::SCROLL_START, Accessibility::EventType::TYPE_VIEW_SCROLLED_START },
{ AccessibilityEventType::PAGE_CLOSE, Accessibility::EventType::TYPE_PAGE_CLOSE },
{ AccessibilityEventType::PAGE_OPEN, Accessibility::EventType::TYPE_PAGE_OPEN },
};
Accessibility::EventType eventType = Accessibility::EventType::TYPE_VIEW_INVALID;
int64_t idx = BinarySearchFindIndex(eventTypeMap, ArraySize(eventTypeMap), type);

View File

@ -107,8 +107,8 @@ enum class AccessibilityEventType : size_t {
ACCESSIBILITY_FOCUS_CLEARED = 0x00010000,
TEXT_MOVE_UNIT = 0x00020000,
SCROLL_START = 0x01000000,
PAGE_OPEN = 0x20000000,
PAGE_CLOSE = 0x08000000,
PAGE_OPEN = 0x20000000,
UNKNOWN,
};