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

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

Merge changes from topic "am-3a638250-0228-430a-9592-99d4a7bd5036" into ub-launcher3-master

* changes:
  [automerger] Workaround for flicker between handoff from app to task view am: 35a6848f
  Workaround for flicker between handoff from app to task view
parents 956ec4b0 e9466408
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();
                    }