Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 745db83b authored by Riddle Hsu's avatar Riddle Hsu
Browse files

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
parent 7137d916
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment