Don't handle task appeared during second quick switch transition
Instead of using shared gesture state, use the swipe handler's internal state. This ensures that only the handler that started the new task can finish the controller for it (i.e. starting a new gesture, which creates a new handler, will ignore the onTaskAppeared() that the previous handler initiated). Test: Quick switch to delayed task A, then quick switch to B right before onTaskAppeared() such that we get onTaskAppeared() during the transition (easier to repro if you increase animation durations with springs off). Before this change, A appeared on top. Bug: 156412706 Change-Id: Ic7d3cd43399005095b2e7c7382218edffefdc27b
This commit is contained in:
parent
7dcd4d6ed6
commit
f6be443eb4
|
@ -724,7 +724,7 @@ public class LauncherSwipeHandler extends BaseSwipeUpHandler<Launcher, RecentsVi
|
|||
if (mStateCallback.hasStates(STATE_HANDLER_INVALIDATED)) {
|
||||
return false;
|
||||
}
|
||||
if (mGestureState.getEndTarget() == NEW_TASK
|
||||
if (mStateCallback.hasStates(STATE_START_NEW_TASK)
|
||||
&& appearedTaskTarget.taskId == mGestureState.getLastStartedTaskId()) {
|
||||
reset();
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue