Correct the return value of applyAnimationLocked.

The starting window cannot be removed because it is waiting for the
exiting animation finished, This may happen if the animation is not
applied when #selectAnimation cannot find an appropriate animation.
To make the state correct, the return result of #applyAnimationLocked
should not only reference to the hierarchial animation state.

Bug: 161847146
Test: atest WmTests
Change-Id: I69bcd29f2587a3644485a0db05e622f6775cc82f
Merged-In: I69bcd29f2587a3644485a0db05e622f6775cc82f
This commit is contained in:
wilsonshih
2020-08-12 13:00:02 +08:00
committed by Wei Sheng Shih
parent d75a22bc20
commit 48288a505d

View File

@@ -38,6 +38,7 @@ import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_ORIENTATION;
import static com.android.server.wm.ProtoLogGroup.WM_DEBUG_STARTING_WINDOW;
import static com.android.server.wm.ProtoLogGroup.WM_SHOW_SURFACE_ALLOC;
import static com.android.server.wm.ProtoLogGroup.WM_SHOW_TRANSACTIONS;
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_WINDOW_ANIMATION;
import static com.android.server.wm.WindowContainer.AnimationFlags.PARENTS;
import static com.android.server.wm.WindowContainer.AnimationFlags.TRANSITION;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG;
@@ -1478,7 +1479,7 @@ class WindowStateAnimator {
mWin.getDisplayContent().adjustForImeIfNeeded();
}
return mWin.isAnimating(PARENTS);
return mWin.isAnimating(0 /* flags */, ANIMATION_TYPE_WINDOW_ANIMATION);
}
void dumpDebug(ProtoOutputStream proto, long fieldId) {