-
Couldn't load subscription status.
- Fork 6k
Fix SurfaceView usage when status bar is transparent #23457
Conversation
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.
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( |
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.
did you intend to read the output of this?
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.
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.
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.
Thanks for taking this on! Looks like a way cleaner fix than fallback back to TextureView.
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