Address issues surrounding freezing by display.
The first issue is the animating a display as a consequence of the freezing due to configuration change during construction. This additional animation is not expected and interferes with tests expecting for the original display contents to be shown intact. This CL addresses the issue by not freezing while the display is not ready (before construction is finished). The second problem addressed is book-keeping for DisplayContentsAnimators in WindowAnimator. Currently, a getter method is used internally to reference these animators, which generates them if not present and adds them to the animation iteration. In the case we set an animation on a display that no longer exists (which can be the case after unfreezing), we end up recreating this object. This can lead to us trying to animate a non-existent DisplayContent. This CL prevents creating an animator for a non-existent display and adjusts the methods using this getter to handle this case. Fixes: 62460846 Fixes: 62461229 Bug: 35486733 Bug: 62541591 Test: go/wm-smoke Test: open and close projected android auto mode repeatedly and ensure display correctness Test: cts-tradefed run singleCommand cts-dev --module CtsMediaTestCases --test android.media.cts.EncodeVirtualDisplayTest#testEncodeVirtualDisplay Change-Id: I60ade6f97440c8fa01b10e36c019865cf1fd0730
Loading
Please register or sign in to comment