Don't check parent's persistTaskBounds unless child is UNDEFINED.
When Task gets an onConfigurationChanged call with a requested overriding configuration, it checks for itself and its parent's ability to see if persisting task bounds is possible or not. This was done for the case of freeform window support, where if the current window is undefined (persistBounds = false), it will then check for the parents (could be clamhshell, which persistBounds = true, or tablet, which persistBounds = false). However, there exists a case where this does not work well, which is when freeform window (inheriting from a freeform display) enters PIP, pinned windowing mode. We have already provided new PIP bounds, but since undefined window are not persistable and neither is PIP, but PIP's parent (the freeform display) is, it will end up setting the new bounds back to mLastNonFullscreenBounds, which is the freeform bounds. We then end up losing the new PIP bounds. Bug: 152911516 Test: On a freeform display, open an activity and enter PIP - PIP activity now has the correct bounds Change-Id: If73523ba1c54274eb5be4af5b967c6fef2993898
Loading
Please register or sign in to comment