Avoid prematurely reporting completion of split resize transition
For example, when there is a split screen resize transition:
SplitScreenTransitions#playResizeAnimation
-> SplitDecorManager#onResized -> fadeOutDecor
-> mFadeAnimator.cancel() -> onAnimationEnd
-> updateCallbackStatus (mRunningAnimationCount becomes zero
but it will increase in the following startFadeAnimation)
-> the callback from SplitScreenTransitions#playResizeAnimation
decor.onResized(startTransaction, animated -> {
mAnimations.remove(va);
if (animated) {
// It won't post if current thread is the same.
mTransitions.getMainExecutor().execute(() -> {
onFinish(null /* wct */);
});
}
});
-> onFinish -> release surfaces
-> the next iteration of playResizeAnimation's loop uses the
released surfaces.
Bug: 429548260
Flag: EXEMPT bugfix
Test: Set all animation scale to 5.
Drag split screen divider multiple times in a short time.
Change-Id: I00ab9581364de296f60d94fdbe9770cc3415c608
Loading
Please register or sign in to comment