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

Commit d5d51e51 authored by vinayjoglekar's avatar vinayjoglekar
Browse files

Fix flickering of tasks in desktop window when opened as static tile.

This for loop was added to fix animation glitch if there is scenario of showing splash screen(on config change). Live tiles don't have this issue because we don't create RemoteTargetHandles.

Fix is to set Z-Index as per correct order since current value is same for all tasks.

Test: Manual, Add multiple apps to desktop task, Make it static tile and launch.
Fix: 370731110
Flag: com.android.launcher3.enable_large_desktop_windowing_tile
Change-Id: I9e3f1fd1333b6113423f51309917317febc1805b
parent fb172faa
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);
        }
    }