Fix crash in WindowDecoration
Ife0f85fdbd59b84303fc50f4ec896c53a259cec6 introduced a workaround of registering a display listener when the display a task is on isn't available when the task appears. However, the logic could go into an infinite loop of: (i) A display listener gets added (ii) onDisplayAdded gets invoked, which triggers relayout (iii) relayout() calls getDisplay() but it returns null, so goes back to (i) This change simply avoids this by making (i) asynchronous. Even in the intended usage, we need to wait for the display to be added anyway. Flag: EXEMPT simple bug fix Bug: 415631133 Test: CompatChangeTests#testSizeCompatDoesNotRestartWithDisplayMove Test: WMShellUnitTests:WindowDecorationTests Change-Id: I5de9302360a5f31dd6842f850a95163a3132f98b
Loading
Please register or sign in to comment