Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@chunhtai
Copy link
Contributor

@chunhtai chunhtai commented Jul 26, 2021

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

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.


/**
* 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.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Called when needs to inform the TalkBack user about window name changes.
* Informs TalkBack user about window name changes.

Comment on lines +1814 to +1815
@TargetApi(28)
@RequiresApi(28)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@TargetApi(28)
@RequiresApi(28)
@TargetApi(Build.VERSION_CODES.P)
@RequiresApi(Build.VERSION_CODES.P)


@TargetApi(28)
@RequiresApi(28)
@VisibleForTesting
Copy link

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

Copy link

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@blasten blasten Jul 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chunhtai chunhtai requested a review from blasten July 27, 2021 16:56
/**
* Creates a {@link AccessibilityEvent#TYPE_WINDOW_STATE_CHANGED} and sends the event to Android's
* accessibility system.
* Informs TalkBack user about window name changes.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Informs TalkBack user about window name changes.
* Informs the TalkBack user about window name changes.

Apologies about the previous edit

Copy link

@blasten blasten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chunhtai chunhtai added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Jul 28, 2021
@fluttergithubbot
Copy link
Contributor

This pull request is not suitable for automatic merging in its current state.

  • The status or check suite Linux Android AOT Engine has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Linux Android Debug Engine has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Linux Fuchsia has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Linux Host Engine has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Mac Android AOT Engine has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Mac Android Debug Engine has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Mac Host Engine has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Mac iOS Engine has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Windows Android AOT Engine has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Windows Host Engine has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Windows UWP Engine has failed. Please fix the issues identified (or deflake) before re-applying this label.

@fluttergithubbot fluttergithubbot removed the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Jul 28, 2021
@blasten
Copy link

blasten commented Jul 28, 2021

@CaseyHillers @godofredoc are these failures related to recent changes?

@CaseyHillers
Copy link
Contributor

Yes, when https://flutter-review.googlesource.com/c/recipes/+/16262 lands, these builds can be retried

@chunhtai chunhtai added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Jul 29, 2021
@fluttergithubbot fluttergithubbot merged commit c889b02 into flutter:master Jul 29, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 29, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 29, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes platform-android waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[a11y] avoid TYPE_WINDOW_STATE_CHANGED for announcing route names

4 participants