-
Notifications
You must be signed in to change notification settings - Fork 6k
Sets accessibility panel title when route changes #27713
Conversation
|
|
||
| /** | ||
| * Creates a {@link AccessibilityEvent#TYPE_WINDOW_STATE_CHANGED} and sends the event to Android's | ||
| * Called when needs to inform the TalkBack user about window name changes. |
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.
| * Called when needs to inform the TalkBack user about window name changes. | |
| * Informs TalkBack user about window name changes. |
| @TargetApi(28) | ||
| @RequiresApi(28) |
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.
| @TargetApi(28) | |
| @RequiresApi(28) | |
| @TargetApi(Build.VERSION_CODES.P) | |
| @RequiresApi(Build.VERSION_CODES.P) |
|
|
||
| @TargetApi(28) | ||
| @RequiresApi(28) | ||
| @VisibleForTesting |
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.
You can use: ReflectionHelpers.setStaticField(Build.VERSION.class, "SDK_INT", <api-number>);
http://robolectric.org/javadoc/3.0/org/robolectric/util/ReflectionHelpers.html
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'm not sure why we haven't used this pattern yet, but maybe it's time to re-evaluate @VisibleForTesting methods if they are working around this issue.
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 found a different way to mock the view, so i don't need the VisibleForTesting
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.
for some reason using Build.VERSION_CODES.P causes the Linux_unopt failure
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.
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.
that is weird, since the constant P = 28. My only guess is that we are using something prior to https://cs.android.com/android/_/android/platform/frameworks/base/+/3da5f3b2ddf35ed436cd9a0c6a349c59c97f8d78
cc @dnfield maybe this line https://github.com/flutter/engine/blob/master/tools/android_lint/bin/main.dart#L77 ?
| /** | ||
| * Creates a {@link AccessibilityEvent#TYPE_WINDOW_STATE_CHANGED} and sends the event to Android's | ||
| * accessibility system. | ||
| * Informs TalkBack user about window name changes. |
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.
| * Informs TalkBack user about window name changes. | |
| * Informs the TalkBack user about window name changes. |
Apologies about the previous edit
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
|
This pull request is not suitable for automatic merging in its current state.
|
|
@CaseyHillers @godofredoc are these failures related to recent changes? |
|
Yes, when https://flutter-review.googlesource.com/c/recipes/+/16262 lands, these builds can be retried |
I tested this change and it is working before and after api 28. Unfortunately I can't find a way to make the Unit test to run in API < 28, so I have updated the existing test to check for panel title instead of notification.
Fixes flutter/flutter#86575
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.