-
Notifications
You must be signed in to change notification settings - Fork 28.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deprecate Android announcement events and add deprecation warning. #165195
Conversation
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
if (Build.VERSION.SDK_INT >= API_LEVELS.API_36) { | ||
Log.w( | ||
TAG, | ||
"Using AnnounceSemanticsEvent for accessibility is deprecated on Android. " | ||
+ "Migrate to using semantic properties for a more robust and accessible " | ||
+ "user experience"); | ||
} |
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 tried adding a test for this log, but the problem is that robolectric does not support API 36 yet so there's no way of testing this if statement.
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.
File an issue and link that issue here. It is fine that we cant test something with roboletric that isn't supported.
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.
Just created it: robolectric/robolectric#10103
Adding it to my PR description now too.
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.
Please close that. We dont need to bother the robolectric team they know they need to add support for api 36. I meant file a bug against us to add the test once there is a version we can support.
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.
Ah gotcha, sorry that makes much more sense! Just added that issue:
#165220
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.
Also if there is android owned public documentation can you link to that?
Maybe https://developer.android.com/reference/android/view/View#announceForAccessibility(java.lang.CharSequence)
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.
Sounds good, added this.
test-exempt: Not supported by platform infrastructure. |
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.
approve % removal of flutter_min or re-add of @VisibleForTesting annotation.
if (Build.VERSION.SDK_INT >= API_LEVELS.API_36) { | ||
Log.w( | ||
TAG, | ||
"Using AnnounceSemanticsEvent for accessibility is deprecated on Android. " | ||
+ "Migrate to using semantic properties for a more robust and accessible " | ||
+ "user experience"); | ||
} |
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.
Also if there is android owned public documentation can you link to that?
Maybe https://developer.android.com/reference/android/view/View#announceForAccessibility(java.lang.CharSequence)
autosubmit label was removed for flutter/flutter/165195, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label. |
autosubmit label was removed for flutter/flutter/165195, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label. |
Due to this Android deprecation Flutter needs to show deprecation warnings to developers when using announce on Android.
Unfortunately testing this log statement is impossible since robolectric currently does not support API >=36.
#165220 will add the test code in once robolectric supports 36.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.