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

Commit b918fa81 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Fix issue with animation handler deadlock"

parents 576e3840 6ba767a8
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -128,9 +128,10 @@ public class BoundsAnimationController {
        mAnimationHandler = animationHandler;
        if (animationHandler != null) {
            // If an animation handler is provided, then ensure that it runs on the sf vsync tick
            handler.runWithScissors(() -> mChoreographer = Choreographer.getSfInstance(),
                    0 /* timeout */);
            handler.post(() -> {
                mChoreographer = Choreographer.getSfInstance();
                animationHandler.setProvider(new SfVsyncFrameCallbackProvider(mChoreographer));
            });
        }
    }

+2 −1
Original line number Diff line number Diff line
@@ -170,6 +170,7 @@ import android.view.WindowManagerPolicyConstants.PointerEventListener;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.ToBooleanFunction;
import com.android.internal.util.function.TriConsumer;
import com.android.server.AnimationThread;
import com.android.server.policy.WindowManagerPolicy;
import com.android.server.wm.utils.DisplayRotationUtil;
import com.android.server.wm.utils.RotationCache;
@@ -862,7 +863,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo

        AnimationHandler animationHandler = new AnimationHandler();
        mBoundsAnimationController = new BoundsAnimationController(service.mContext,
                mAppTransition, SurfaceAnimationThread.getHandler(), animationHandler);
                mAppTransition, AnimationThread.getHandler(), animationHandler);

        if (mWmService.mInputManager != null) {
            final InputChannel inputChannel = mWmService.mInputManager.monitorInput("Display "