Loading
Fix flaky testVisibleWithInsetsProvider test
The test would always fail if we wait until the handler idle. The reason is, when layoutAndAssignWindowLayersIfNeeded is called, in DisplayPolicy, the mTopFullscreenOpaqueWindowState will take the control of the insets visibility back by calling onControlChanged. At that time, the visibility will get back to true, no matter what happened before. Mock the DC and let the function do nothing would help the test to be a unit test and all the test will be no longer flaky. Test: atest WindowStateTests Bug: 74078662 Bug: 69229402 Change-Id: I91255e2e7d5c8f2dcdf3faf72aa87c4df77a94ec