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

Commit e9466408 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role)
Browse files

[automerger] Workaround for flicker between handoff from app to task view am: 35a6848f

Change-Id: Idcffacc752663758ac38937819457195b637ed10
parents 17b7d365 35a6848f
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -878,8 +878,21 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> {
                // new thumbnail
                finishTransitionPosted = new WindowCallbacksCompat(taskView) {

                    // The number of frames to defer until we actually finish the animation
                    private int mDeferFrameCount = 2;

                    @Override
                    public void onPostDraw(Canvas canvas) {
                        if (mDeferFrameCount > 0) {
                            mDeferFrameCount--;
                            // Workaround, detach and reattach to invalidate the root node for
                            // another draw
                            detach();
                            attach();
                            taskView.invalidate();
                            return;
                        }

                        setStateOnUiThread(STATE_SCREENSHOT_CAPTURED);
                        detach();
                    }