-
Notifications
You must be signed in to change notification settings - Fork 6k
Remove context assertion from Android platform views using Virtual Display #35997
Remove context assertion from Android platform views using Virtual Display #35997
Conversation
| public class PlatformViewsActivity extends TestActivity { | ||
| // WARNING: These strings must all be exactly the same length to avoid | ||
| // breaking the 'create' method's manual encoding in the test. See the | ||
| // TODO(stuartmorgan) about encoding alignment in platform_view.dart |
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 lost at least an hour to figuring out why my new factory wasn't working at all 😐 I didn't want to yak-shave right now since this is an important fix, and one that I want to scope-limit so that we can cherry-pick it to stable, so I just left comments so that at least the problem will be obvious to the next person.
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. |
…rtual Display (#36046) * Remove context assertion from Android platform views using Virtual Display (#35997) * empty commit Co-authored-by: Casey Hillers <[email protected]>
Removes the assertion about contexts in Android platform view's Virtual Display fallback.
When #33599 re-introduced Virtual Display, it added an assertion about context preservation that wasn't previously present, which changed what would previously have been a silently failure for some specific VD workarounds (which would not be necessary for all plugins) to function into an assertion failure.
In theory plugins should be updated to avoid tripping the assertion, but in practice a common pattern (using
LayoutInflator) ends up violating this assertion, and there does not appear to be a straightforward fix in that case (especially if the view is crated by an SDK that the plugin wraps without controlling). Rather than leaving affected plugins more broken than they were pre-3.0, this restores the previous behavior of working, but with those specific workarounds not activated for those plugins. The assertion is replaced with a warning, so that plugin developers can be made aware of the issue, and includes suggestions for resolving it.Fixes flutter/flutter#110146
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.