-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add views added to the WindowManager into the presentation view tree. #6043
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The default WindowManager implementation in Android's Presentation is delegating addView/removeView/updateViewLayout calls to the global WindowManager. This can result in a crash when an embedded view is trying to e.g show a PopupWindow. This change adds a custom WindowManager that overrides addView (and removeView/updateViewLayout) and adds the view to the presentation's view tree. Note that as views might keep a reference to the window manager which might be an issue when we move a view from one virtual display to another (due to a resize). For this reason when re-sizing we are not creating a new window manager for the new presentation, but updating the window manager's references to be relevant for the new presentation and re-use it.
amirh
changed the title
Add views added to the WindowManager in the presentation view tree.
Add views added to the WindowManager into the presentation view tree.
Aug 17, 2018
jason-simmons
approved these changes
Aug 17, 2018
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Aug 18, 2018
flutter/engine@4ee6489...be0c314 git log 4ee6489..be0c314 --date=short --no-merges --format='%%ad %%ae %%s' 2018-08-17 amirh@users.noreply.github.com Add views added to the WindowManager into the presentation view tree. (flutter/engine#6043) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia c623af2e1044..ff6a73cc08af (5 commits) (flutter/engine#6042) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 12d13ae7f4e6..c623af2e1044 (8 commits) (flutter/engine#6040) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia da135c397356..12d13ae7f4e6 (7 commits) (flutter/engine#6039) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia bc414ed5dec5..da135c397356 (1 commits) (flutter/engine#6038) 2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia e21f0ec04e98..bc414ed5dec5 (2 commits) (flutter/engine#6037) 2018-08-16 jamesderlin@users.noreply.github.com Fix potential null pointer dereference in FlutterDartProject (flutter/engine#6035) 2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 8d77d1d85e2f..e21f0ec04e98 (5 commits) (flutter/engine#6036) 2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbb7d572aaa1..8d77d1d85e2f (12 commits) (flutter/engine#6034) 2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbd83bbd77d1..cbb7d572aaa1 (5 commits) (flutter/engine#6033) The AutoRoll server is located here: https://flutter-engine-flutter-roll.skia.org Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Aug 18, 2018
flutter/engine@4ee6489...f53e903 git log 4ee6489..f53e903 --date=short --no-merges --format='%%ad %%ae %%s' 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia ff6a73cc08af..c24e0c1e41ab (2 commits) (flutter/engine#6044) 2018-08-17 amirh@users.noreply.github.com Add views added to the WindowManager into the presentation view tree. (flutter/engine#6043) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia c623af2e1044..ff6a73cc08af (5 commits) (flutter/engine#6042) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 12d13ae7f4e6..c623af2e1044 (8 commits) (flutter/engine#6040) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia da135c397356..12d13ae7f4e6 (7 commits) (flutter/engine#6039) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia bc414ed5dec5..da135c397356 (1 commits) (flutter/engine#6038) 2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia e21f0ec04e98..bc414ed5dec5 (2 commits) (flutter/engine#6037) 2018-08-16 jamesderlin@users.noreply.github.com Fix potential null pointer dereference in FlutterDartProject (flutter/engine#6035) 2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 8d77d1d85e2f..e21f0ec04e98 (5 commits) (flutter/engine#6036) 2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbb7d572aaa1..8d77d1d85e2f (12 commits) (flutter/engine#6034) 2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbd83bbd77d1..cbb7d572aaa1 (5 commits) (flutter/engine#6033) The AutoRoll server is located here: https://flutter-engine-flutter-roll.skia.org Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Aug 18, 2018
flutter/engine@4ee6489...b73ed06 git log 4ee6489..b73ed06 --date=short --no-merges --format='%%ad %%ae %%s' 2018-08-18 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia c24e0c1e41ab..5cc10c8cd6db (3 commits) (flutter/engine#6045) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia ff6a73cc08af..c24e0c1e41ab (2 commits) (flutter/engine#6044) 2018-08-17 amirh@users.noreply.github.com Add views added to the WindowManager into the presentation view tree. (flutter/engine#6043) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia c623af2e1044..ff6a73cc08af (5 commits) (flutter/engine#6042) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 12d13ae7f4e6..c623af2e1044 (8 commits) (flutter/engine#6040) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia da135c397356..12d13ae7f4e6 (7 commits) (flutter/engine#6039) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia bc414ed5dec5..da135c397356 (1 commits) (flutter/engine#6038) 2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia e21f0ec04e98..bc414ed5dec5 (2 commits) (flutter/engine#6037) 2018-08-16 jamesderlin@users.noreply.github.com Fix potential null pointer dereference in FlutterDartProject (flutter/engine#6035) 2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 8d77d1d85e2f..e21f0ec04e98 (5 commits) (flutter/engine#6036) 2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbb7d572aaa1..8d77d1d85e2f (12 commits) (flutter/engine#6034) 2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbd83bbd77d1..cbb7d572aaa1 (5 commits) (flutter/engine#6033) The AutoRoll server is located here: https://flutter-engine-flutter-roll.skia.org Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Aug 19, 2018
flutter/engine@4ee6489...03f8ba5 git log 4ee6489..03f8ba5 --date=short --no-merges --format='%%ad %%ae %%s' 2018-08-19 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 5cc10c8cd6db..ae7229480cbe (1 commits) (flutter/engine#6046) 2018-08-18 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia c24e0c1e41ab..5cc10c8cd6db (3 commits) (flutter/engine#6045) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia ff6a73cc08af..c24e0c1e41ab (2 commits) (flutter/engine#6044) 2018-08-17 amirh@users.noreply.github.com Add views added to the WindowManager into the presentation view tree. (flutter/engine#6043) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia c623af2e1044..ff6a73cc08af (5 commits) (flutter/engine#6042) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 12d13ae7f4e6..c623af2e1044 (8 commits) (flutter/engine#6040) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia da135c397356..12d13ae7f4e6 (7 commits) (flutter/engine#6039) 2018-08-17 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia bc414ed5dec5..da135c397356 (1 commits) (flutter/engine#6038) 2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia e21f0ec04e98..bc414ed5dec5 (2 commits) (flutter/engine#6037) 2018-08-16 jamesderlin@users.noreply.github.com Fix potential null pointer dereference in FlutterDartProject (flutter/engine#6035) 2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia 8d77d1d85e2f..e21f0ec04e98 (5 commits) (flutter/engine#6036) 2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbb7d572aaa1..8d77d1d85e2f (12 commits) (flutter/engine#6034) 2018-08-16 37626415+skia-flutter-autoroll@users.noreply.github.com Roll src/third_party/skia cbd83bbd77d1..cbb7d572aaa1 (5 commits) (flutter/engine#6033) The AutoRoll server is located here: https://flutter-engine-flutter-roll.skia.org Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes flutter/flutter#20714.
The default WindowManager implementation in Android's Presentation is
delegating addView/removeView/updateViewLayout calls to the global
WindowManager.
This can result in a crash when an embedded view is trying to e.g show a
PopupWindow.
This change adds a custom WindowManager that overrides
addView (and removeView/updateViewLayout) and adds the view to the
presentation's view tree.
Note that views might keep a reference to the window manager which
might be an issue when we move a view from one virtual display to
another (due to a resize). For this reason when re-sizing we are not
creating a new window manager for the new presentation, but updating the
window manager's references to be relevant for the new presentation and
re-use it.