commit | 40ef139ceda28c2390b3cb53fa2785d5ed690602 | [log] [tgz] |
---|---|---|
author | Amir Hardon <amirh@users.noreply.github.com> | Fri Aug 09 16:35:47 2019 -0700 |
committer | GitHub <noreply@github.com> | Fri Aug 09 16:35:47 2019 -0700 |
tree | 2462b624ea55edb83bfe93cde3cf63ef6e175aaf | |
parent | b48dd36fccc6edf6b37a0291a90d3efccd8d2b78 [diff] |
[webview_flutter] Filter onChanged events for invalid displays (#1964) Works around an Android WebView bug that was causing a crash by filtering some DisplayListener invocations. Older Android WebView versions had assumed that when DisplayListener#onDisplayChanged is invoked, the display ID it is provided is of a valid display. However it turns out that when a display is removed Android may call onDisplayChanged with the ID of the removed display, in this case the Android WebView code tries to fetch and use the display with this ID and crashes with an NPE. The issue was fixed in the Android WebView code in https://chromium-review.googlesource.com/517913 which is available starting WebView version 58.0.3029.125 however older webviews in the wild still have this issue. Since Flutter removes virtual displays whenever a platform view is resized the webview crash is more likely to happen than other apps. And users were reporting this issue see: flutter/flutter#30420 This change works around the webview bug by unregistering the WebView's DisplayListener, and instead registering our own DisplayListener which delegates the callbacks to the WebView's listener unless it's a onDisplayChanged for an invalid display.
This repo is a companion repo to the main flutter repo. It contains the source code for Flutter first-party plugins (i.e., plugins developed by the core Flutter team). Check the packages
directory for all plugins.
Flutter plugins enable access to platform-specific APIs. For more information about plugins, and how to use them, see https://flutter.dev/platform-plugins/.
These plugins are also available on pub.
Please file any issues, bugs, or feature requests in the main flutter repo.
If you wish to contribute a new plugin to the Flutter ecosystem, please see the documentation for developing packages and platform channels. You can store your plugin source code in any GitHub repository (the present repo is only intended for plugins developed by the core Flutter team). Once your plugin is ready you can publish to the pub repository.
If you wish to contribute a change to any of the existing plugins in this repo, please review our contribution guide, and send a pull request.
These are the available plugins in this repository.
Learn more about FlutterFire.