-
Notifications
You must be signed in to change notification settings - Fork 6k
Updates accessible_navigation trigger in Android #35478
Conversation
|
cc @dnfield |
| // Use the setter to update this property if needed. | ||
| @VisibleForTesting public boolean hasAssistiveTechnology = false; | ||
|
|
||
| private void setHasAssistiveTechnology(boolean value) { |
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.
nitpick: Maybe call this updateHasAssistiveTechnology. Alternatively, require sendLatestAccessibilityFlagsToFlutter to take a boolean and have it set the flags. Then in tests you don't need the extra flag taken.
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.
I meant to make this a setter of hasAssistiveTechnology. I am very lazy so I just search online, this is the common way people name it. WDYT?
sendLatestAccessibilityFlagsToFlutter sends the entire feature flags over, unless I create an API specific for ACCESSIBLE_NAVIGATION it feels weird to add an parameter to sendLatestAccessibilityFlagsToFlutter for ACCESSIBLE_NAVIGATION only.
dnfield
left a comment
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.
LGTM
fixes flutter/flutter#109521
There isn't an API to detect whether voice access and switch access is running. Android team also shift away the strategy from exposing the state of assistive technology. Their strategies are exposing API that targets specific use case. For example, most app need to know whether assistive technologies are running to decide modal fadeout durations. So Android team expose adhoc getRecommendedTimeoutMillis for this use case. Unfortunately we can't use these adhoc API due to the reason mentioned in flutter/flutter#109521 (comment). Therefore, I implement this pr to workaround the issue.
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.