-
Notifications
You must be signed in to change notification settings - Fork 6k
Avoid crashing when FlutterImageView is resized to zero dimension #27946
Avoid crashing when FlutterImageView is resized to zero dimension #27946
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. |
Test added. 😄 |
shell/platform/android/io/flutter/embedding/android/FlutterImageView.java
Outdated
Show resolved
Hide resolved
shell/platform/android/io/flutter/embedding/android/FlutterImageView.java
Outdated
Show resolved
Hide resolved
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 % nit about the message
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. Thanks!
This PR fixes a Android crash when using WebView and when keyboard shows, flutter area was resized to a zero height.
Java crash stack:
It fixed: flutter/flutter#87858
This is a workaround and stay the same with this logic of
FlutterImageView's constructors, they take 1 pixel as default:Pre-launch Checklist
writing and running engine tests.
///).