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

Commit 02d49270 authored by Winson Chung's avatar Winson Chung
Browse files

Workaround to prevent starting the same task from Recents twice. (Bug 17322903)

parent 78358b17
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV
    ArrayList<TaskStack> mStacks;
    View mSearchBar;
    RecentsViewCallbacks mCb;
    boolean mAlreadyLaunchingTask;

    public RecentsView(Context context) {
        super(context);
@@ -120,6 +121,9 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV
            }
            addView(stackView);
        }

        // Reset the launched state
        mAlreadyLaunchingTask = false;
    }

    /** Removes all the task stack views from this recents view. */
@@ -381,6 +385,11 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV
        if (mCb != null) {
            mCb.onTaskViewClicked();
        }
        // Skip if we are already launching tasks
        if (mAlreadyLaunchingTask) {
            return;
        }
        mAlreadyLaunchingTask = true;

        // Upfront the processing of the thumbnail
        TaskViewTransform transform = new TaskViewTransform();