-
Notifications
You must be signed in to change notification settings - Fork 6k
Fixes android voice access delete text, redo, and undo actions. #25050
Conversation
This comment has been minimized.
This comment has been minimized.
| case AccessibilityNodeInfo.MOVEMENT_GRANULARITY_LINE: | ||
| case AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PARAGRAPH: | ||
| case AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE: | ||
| return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have semantics action for these actions. I feel weird to add them, too, because they aren't really going to be used. voice access only care about the action return true and the semantics node gets updated immediately, which is done by the predictCursorMovement.
If we do want to add them, I feel we should just merge all the cursor movement action into one semantics action that takes in granularity and direction.
| break; | ||
| case AccessibilityNodeInfo.MOVEMENT_GRANULARITY_WORD: | ||
| if (forward && node.textSelectionExtent < node.value.length()) { | ||
| Pattern pattern = Pattern.compile("[^a-zA-Z0-9](\\b)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will only work for latin alphabet languages right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
I believe this caused a post-submit engine->framework test failure flutter/flutter#79118 |
|
This also breaks Google internal compilation. test/OCL:365108065:BASE:365285587:1616804402433:d72060c2 |
| Pattern pattern = Pattern.compile("\\p{L}(\\b)"); | ||
| Matcher result = pattern.matcher(node.value.substring(node.textSelectionExtent)); | ||
| // we discard the first result because we want to find the "next" word | ||
| if (result.find() && result.find()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the test failure is from this condition and'ing the same expression twice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lint does not consider the side affect of calling the condition. Not sure what is the correct way of writing this..
…s. (flutter#25050)" This reverts commit 8d73893.
…s. (flutter#25050)" This reverts commit 4c6abc1.
…ter#25050) * Fixes android voice access delete text, redo, and undo actions * account for unicode
…s. (flutter#25050)" (flutter#25286) This reverts commit 8d73893.
flutter#25289) * Reland "Fixes android voice access delete text, redo, and undo actions. (flutter#25050)" This reverts commit 4c6abc1. * fix condition
…ter#25050) * Fixes android voice access delete text, redo, and undo actions * account for unicode
…s. (flutter#25050)" (flutter#25286) This reverts commit 8d73893.
flutter#25289) * Reland "Fixes android voice access delete text, redo, and undo actions. (flutter#25050)" This reverts commit 4c6abc1. * fix condition
Fixes flutter/flutter#77965
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.