Handle animating exit windows with shell transition
WindowState#isWinVisibleLw can only detect legacy transition. So when using shell transition, if an activity relayout to invisible before the transition is finished, its surface will be destroyed when animating, which looks bad. Since there were too may visibility methods, and isWinVisibleLw can be covered by isVisible()+isDisplayed() which is able to consider legacy and shell transition. So just delete it. Other usages of isWinVisibleLw: - shouldKeepVisibleDeadAppWindow: unused dead code - imeWindow: non-activity window so it equals to isVisible(). Besides, make shell transition have the same behavior as legacy transition to call onExitAnimationDone when the animation is finished to destroy the surfaces. Also simplify tryStartExitingAnimation: - Remove returned focusMayChange because it should be already done by visibility change. - Remove condition for wallpaper target because it was added for lockscreen (commit 6136b7ef) 10 years ago, but notification shade (now it is lockscreen) was excluded for other issue in recent version. That means the original problem was gone. Fix: 247005789 Test: atest WindowManagerServiceTests#testRelayoutExitingWindow Change-Id: I2255fdad39560fd3dff589985687bea93a00a038
Loading
Please register or sign in to comment