Skip to content
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
merged 1 commit into from
Aug 18, 2018

Conversation

amirh
Copy link
Contributor

@amirh amirh commented Aug 17, 2018

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.

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 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
@amirh amirh merged commit be0c314 into flutter:master Aug 18, 2018
@amirh amirh deleted the popup_windows branch August 18, 2018 00:01
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants