Add views added to the WindowManager into the presentation view tree. (#6043)
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.
Showing
想要评论请 注册 或 登录