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

Conversation

@dnfield
Copy link
Contributor

@dnfield dnfield commented Jan 6, 2021

Fixes flutter/flutter#73413

When the StatusBar is set to transparent, TalkBack stops working if you use a surface view.

This forces Android to recognize that we're not actually drawing a transparent region and makes TalkBack work again.

This is really a work around for a probable bug in TalkBack, but it's important because we have customers who are using a TextureView for rendering to work around this bug right now, and a TextureView carries performance penalties.

/cc @jreck
/cc @mklim @matthew-carroll who dealt with things around this in the past, FYI

Copy link
Contributor

@mklim mklim left a comment

Choose a reason for hiding this comment

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

This LGTM, but someone else should also approve. It may also be worth filing a bug about the Talkback issue, if they're unaware?

}
final int[] location = new int[2];
getLocationInWindow(location);
region.op(
Copy link
Member

Choose a reason for hiding this comment

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

did you intend to read the output of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The CL this was based on didn't use the return value. I'm not sure it's important here - I guess we could just return this value instead of returning true, but this op should always modify the region as long as the surface view is actually being used.

Copy link
Member

@xster xster left a comment

Choose a reason for hiding this comment

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

Thanks for taking this on! Looks like a way cleaner fix than fallback back to TextureView.

@dnfield dnfield merged commit df27e69 into flutter:master Jan 6, 2021
@dnfield dnfield deleted the sv_a11y branch January 6, 2021 20:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make SurfaceView work with TalkBack when the status bar color is transparent.

4 participants