Only set client hidden if both hidden and hiddenRequested
This fixes a bug where clientHidden of Launcher was set to true too early because of the following flow: - Open app, then press home - During the transition relaunch the app This leads to a new transition being started for which hiddenRequested=true for Launcher. Then, the old animation finishes, before the new one gets stared, and Launcher gets client hidden too early. More generally this is correct because: - if (hidden && hiddenRequested) both states agree - if (!hidden && !hiddenRequested) both states agree as well - if (hidden && !hiddenRequested): App is becoming visible before transition has started, so we shouldn't set it to client hidden - if (!hidden && hiddenRequested): App is becoming invisible before transition has started. However we need to defer client hidden until the transition is done. Bug: 74220420 Test: Open/close apps quickly repeatedly Test: go/wm-smoke Change-Id: I6df107fb0be9d2d779c997f0ddf1315bf53d27a5
Loading
Please register or sign in to comment