Allow swipe up to go home from overivew during task dismiss animation
Test: go to overview, dismiss a task, swipe up to go home during the transition (easier to try with animation duraation scaled up) Bug: 144170434 Change-Id: I28b846b43260179aeac877351a7069743f66f3ea
This commit is contained in:
parent
c5eedfb387
commit
5af9c3537d
|
@ -82,7 +82,15 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
|
||||||
mDetector = new SingleAxisSwipeDetector(activity, this, dir);
|
mDetector = new SingleAxisSwipeDetector(activity, this, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean canInterceptTouch() {
|
private boolean canInterceptTouch(MotionEvent ev) {
|
||||||
|
if ((ev.getEdgeFlags() & Utilities.EDGE_NAV_BAR) != 0) {
|
||||||
|
// Don't intercept swipes on the nav bar, as user might be trying to go home
|
||||||
|
// during a task dismiss animation.
|
||||||
|
if (mCurrentAnimation != null) {
|
||||||
|
mCurrentAnimation.getAnimationPlayer().end();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (mCurrentAnimation != null) {
|
if (mCurrentAnimation != null) {
|
||||||
mCurrentAnimation.forceFinishIfCloseToEnd();
|
mCurrentAnimation.forceFinishIfCloseToEnd();
|
||||||
}
|
}
|
||||||
|
@ -118,7 +126,7 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
|
||||||
clearState();
|
clearState();
|
||||||
}
|
}
|
||||||
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
|
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
|
||||||
mNoIntercept = !canInterceptTouch();
|
mNoIntercept = !canInterceptTouch(ev);
|
||||||
if (mNoIntercept) {
|
if (mNoIntercept) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue