Fixes starting window being occluded when enable shell transition

- Fix starting window layer so the layer won't become lower when Shell
is applying finish transaction.
- Fix cannot remove starting window because there were set
mAnimatingExit to true while the window is in transition without apply
exit animation.

Bug: 211045248
Bug: 211844337
Test: enable shell transition, run OpenAppColdTest

Change-Id: Ie05b356048ea2db907704911736f0f93e49eb2e8
This commit is contained in:
wilsonshih
2021-12-24 10:32:15 +08:00
parent ca48c3874f
commit fb669d9ca7
2 changed files with 3 additions and 5 deletions

View File

@@ -2548,10 +2548,8 @@ public class WindowManagerService extends IWindowManager.Stub
if (win.mAttrs.type == TYPE_APPLICATION_STARTING) {
transit = WindowManagerPolicy.TRANSIT_PREVIEW_DONE;
}
if (win.inTransition()) {
focusMayChange = true;
win.mAnimatingExit = true;
} else if (win.isWinVisibleLw() && winAnimator.applyAnimationLocked(transit, false)) {
if (win.isWinVisibleLw() && winAnimator.applyAnimationLocked(transit, false)) {
focusMayChange = true;
win.mAnimatingExit = true;
} else if (win.mDisplayContent.okToAnimate() && win.isAnimating(TRANSITION | PARENTS,

View File

@@ -5427,7 +5427,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
@Override
void assignLayer(Transaction t, int layer) {
if (isStartingWindowAssociatedToTask()) {
if (mStartingData != null) {
// The starting window should cover the task.
t.setLayer(mSurfaceControl, Integer.MAX_VALUE);
return;