Do not update mocked environment by real display events
The real display listener is registered in RootWindowContainer#setWindowManager. Some test may set up display size in @Before, but when running the real test method, the display size of the mocked display is updated by real display info. e.g. according to WindowManagerGlobalLockRule: 1. test thread: lockWm {@Before} 2. ui thread: lockWm {onDisplayChanged} <- flaky race 3. test thread: lockWm {test method} Fix: 309542567 Test: atest DisplayPolicyLayoutTests#testSimulateLayoutDisplay Change-Id: I2b00a09b14497573d4b09873351aac73f56e70eb
Loading
Please register or sign in to comment