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

Commit 5ae2c3a3 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

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
parent 5d23bdf5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment