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

Commit b99b18e7 authored by Winson Chung's avatar Winson Chung
Browse files

Fixing scrolling regression with layout changes.

Change-Id: Ic440d147ca13bf13d7f311b6d9876e3c02d4f189
parent 4f1f7ba3
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -428,11 +428,11 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal

    @Override
    public void computeScroll() {
        mStackScroller.computeScroll();
        // Synchronize the views
        if (synchronizeStackViewsWithModel()) {
            clipTaskViews();
        }
        mStackScroller.computeScroll();
    }

    /** Computes the stack and task rects */
@@ -632,12 +632,6 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
        }
    }

    @Override
    protected void onScrollChanged(int l, int t, int oldl, int oldt) {
        super.onScrollChanged(l, t, oldl, oldt);
        requestSynchronizeStackViewsWithModel();
    }

    public boolean isTransformedTouchPointInView(float x, float y, View child) {
        return isTransformedTouchPointInView(x, y, child, null);
    }
@@ -889,7 +883,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
    public void onScrollChanged(float p) {
        mUIDozeTrigger.poke();
        requestSynchronizeStackViewsWithModel();
        invalidate();
        postInvalidateOnAnimation();
    }

    /**** RecentsPackageMonitor.PackageCallbacks Implementation ****/
+1 −1
Original line number Diff line number Diff line
@@ -185,6 +185,7 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {

    /** Handles touch events once we have intercepted them */
    public boolean onTouchEvent(MotionEvent ev) {

        // Short circuit if we have no children
        boolean hasChildren = (mSv.getChildCount() > 0);
        if (!hasChildren) {
@@ -278,7 +279,6 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
                final VelocityTracker velocityTracker = mVelocityTracker;
                velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity);
                int velocity = (int) velocityTracker.getYVelocity(mActivePointerId);

                if (mIsScrolling && (Math.abs(velocity) > mMinimumVelocity)) {
                    // XXX: Should this be calculated as a percentage of a curve?
                    int overscrollRange = (int) (Math.min(1f,