am 73a6148e: am 82f0abc4: Merge "Workaround to prevent starting the same task from Recents twice. (Bug 17322903)" into lmp-dev

* commit '73a6148e4be868e8eb4ffef9b5fbc8afd502ebff':
  Workaround to prevent starting the same task from Recents twice. (Bug 17322903)
This commit is contained in:
Winson Chung
2014-08-29 23:53:00 +00:00
committed by Android Git Automerger

View File

@@ -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();