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

Commit 972531f5 authored by Vinay Joglekar's avatar Vinay Joglekar Committed by Android (Google) Code Review
Browse files

Merge "Fix flickering of tasks in desktop window when opened as static tile." into main

parents f6c4a7ac d5d51e51
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ public class RemoteTargetGluer {
        RemoteTargetHandle[] handles = new RemoteTargetHandle[numHandles];
        for (int i = 0; i < numHandles; i++) {
            TaskViewSimulator tvs = new TaskViewSimulator(context, sizingStrategy);
            tvs.setIsDesktopTask(forDesktop);
            tvs.setIsDesktopTask(forDesktop , i);
            TransformParams transformParams = new TransformParams();
            handles[i] = new RemoteTargetHandle(tvs, transformParams);
        }
+5 −3
Original line number Diff line number Diff line
@@ -120,6 +120,7 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
    private boolean mScaleToCarouselTaskSize = false;
    private int mTaskRectTranslationX;
    private int mTaskRectTranslationY;
    private int mDesktopTaskIndex = 0;

    public TaskViewSimulator(Context context, BaseContainerInterface sizeStrategy) {
        mContext = context;
@@ -290,8 +291,9 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
    /**
     * Sets whether this task is part of desktop tasks in overview.
     */
    public void setIsDesktopTask(boolean desktop) {
    public void setIsDesktopTask(boolean desktop, int index) {
        mIsDesktopTask = desktop;
        mDesktopTaskIndex = index;
    }

    /**
@@ -545,9 +547,9 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
            // In shell transitions, the animation leashes are reparented to an animation container
            // so we can bump layers as needed.
            builder.setLayer(mDrawsBelowRecents
                    ? Integer.MIN_VALUE + app.prefixOrderIndex
                    // 1000 is an arbitrary number to give room for multiple layers.
                    : Integer.MAX_VALUE - 1000 + app.prefixOrderIndex);
                    ? Integer.MIN_VALUE + 1000 + app.prefixOrderIndex - mDesktopTaskIndex
                    : Integer.MAX_VALUE - 1000 + app.prefixOrderIndex - mDesktopTaskIndex);
        }
    }