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

Commit 3ee0b75a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Cancel animation before destroying of SurfaceControl." into rvc-dev

parents a6e26bcc 16cde29b
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ class SurfaceFreezer {
     */
    void unfreeze(SurfaceControl.Transaction t) {
        if (mSnapshot != null) {
            mSnapshot.destroy(t);
            mSnapshot.cancelAnimation(t, false /* restarting */);
        }
        if (mLeash == null) {
            return;
@@ -212,7 +212,7 @@ class SurfaceFreezer {
         * @param t The transaction to use for all cancelling surface operations.
         * @param restarting Whether we are restarting the animation.
         */
        private void cancelAnimation(SurfaceControl.Transaction t, boolean restarting) {
        void cancelAnimation(SurfaceControl.Transaction t, boolean restarting) {
            final SurfaceControl leash = mSurfaceControl;
            final AnimationAdapter animation = mAnimation;
            final SurfaceAnimator.OnAnimationFinishedCallback animationFinishedCallback =
@@ -229,7 +229,6 @@ class SurfaceFreezer {
                }
            }
            if (!restarting) {
                // TODO: do we need to destroy?
                destroy(t);
            }
        }