Fix flaky navBar test in CTS
This patch is to fix the timing issue, which is adding a navigation bar when a new display with system decoration support is created. When WMS#hasNavigationBar is called in createNavigationBar, the method may return false even if the display DOES support system decorations since DisplayContent is not yet created. It is because RootActivityContainer, which creates ActivityDisplay and also DisplayContent indirectly, uses DisplayThread to do it, which makes itself not receive the message until everyone is informed about the change. Change to use UiThread to fix this issue. Bug: 120748674 Test: atest ActivityMultiDisplayTests Test: atest ActivityMultiDisplayTests#testNavBarShowingOnDisplayWithDecor * 200 Change-Id: I733bbbe8deee452af87f0f1ca09316c207d82da3
Loading
Please register or sign in to comment