-
Notifications
You must be signed in to change notification settings - Fork 6k
[android] Fix black and blank screen issues on the platform view page. #28277
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. 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. |
|
Maybe a solution is not setting flutterImageView and previousRenderSurface to null in public void detachFromFlutterEngine() {
Log.v(TAG, "Detaching from a FlutterEngine: " + flutterEngine);
// ...
// flutterImageView = null;
// previousRenderSurface = null;
flutterEngine = null;
} |
We need to revert |renderSurface| to |previousRenderSurface| here to avoid a black screen due to the surface missing when it attaches to the engine again. #88845 |
blasten
left a comment
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 is a good fix. However, can we add a test to FlutterViewTest?
One possible test is:
- Make
renderSurfacevisible for testing. (Remove private modifier). - Construct
FlutterView - Call
convertToImageView() - Verify
renderSurfaceis aFlutterImageView - Call
detachFromFlutterEngine() - Verify
renderSurfaceis not aFlutterImageView
done. |
|
Those tests seem interrupted by user for some reason. Can anyone help rebuild, please? thanks. |
Done |
|
Linux Framework Smoke Tests failure is unrelated to my changes. See #28535 for details. |
|
This patch needs to be rebased on ToT for the presubmits to run again please? And CC @blasten for the re-review. |
…s invisible when it is opened for the second time. Fixs: #88558
blasten
left a comment
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 - nicely done
Fix issues:
#88558
#88845
Pre-launch Checklist
If you need help, consider asking for advice on the #hackers-new channel on Discord.