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

Commit 255ee17c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Allow swipe up to go home from overivew during task dismiss animation"...

Merge "Allow swipe up to go home from overivew during task dismiss animation" into ub-launcher3-master
parents 840ad8e8 5af9c353
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -82,7 +82,15 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
        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) {
            mCurrentAnimation.forceFinishIfCloseToEnd();
        }
@@ -118,7 +126,7 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
            clearState();
        }
        if (ev.getAction() == MotionEvent.ACTION_DOWN) {
            mNoIntercept = !canInterceptTouch();
            mNoIntercept = !canInterceptTouch(ev);
            if (mNoIntercept) {
                return false;
            }