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

Commit 70aa528b authored by Winson Chung's avatar Winson Chung
Browse files

Fixing some regressions in tablet reordering/deleting.

Change-Id: Ib3e48fa2606c0259603f6daf3b2ef72e1c8e292d
parent 8f225140
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -58,6 +58,13 @@ public class KeyguardViewStateManager implements SlidingChallengeLayout.OnChalle
        return false;
        return false;
    }
    }


    public boolean isChallengeOverlapping() {
        if (mChallengeLayout != null) {
            return mChallengeLayout.isChallengeOverlapping();
        }
        return false;
    }

    public void setSecurityViewContainer(KeyguardSecurityView container) {
    public void setSecurityViewContainer(KeyguardSecurityView container) {
        mKeyguardSecurityContainer = container;
        mKeyguardSecurityContainer = container;
    }
    }
+3 −1
Original line number Original line Diff line number Diff line
@@ -589,7 +589,9 @@ public class KeyguardWidgetPager extends PagedView implements PagedView.PageSwit
    @Override
    @Override
    public boolean onLongClick(View v) {
    public boolean onLongClick(View v) {
        // Disallow long pressing to reorder if the challenge is showing
        // Disallow long pressing to reorder if the challenge is showing
        if (!mViewStateManager.isChallengeShowing() && startReordering()) {
        boolean isChallengeOverlapping = mViewStateManager.isChallengeShowing() &&
                mViewStateManager.isChallengeOverlapping();
        if (!isChallengeOverlapping && startReordering()) {
            return true;
            return true;
        }
        }
        return false;
        return false;
+8 −6
Original line number Original line Diff line number Diff line
@@ -2072,15 +2072,15 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc


        // If we haven't flung-to-delete the current child, then we just animate the drag view
        // If we haven't flung-to-delete the current child, then we just animate the drag view
        // back into position
        // back into position
        if (!mIsFlingingToDelete) {
        final Runnable onCompleteRunnable = new Runnable() {
            mPostReorderingPreZoomInRunnable = new Runnable() {
                public void run() {
                    Runnable onCompleteRunnable = new Runnable() {
            @Override
            @Override
            public void run() {
            public void run() {
                onEndReordering();
                onEndReordering();
            }
            }
        };
        };
        if (!mIsFlingingToDelete) {
            mPostReorderingPreZoomInRunnable = new Runnable() {
                public void run() {
                    zoomIn(onCompleteRunnable);
                    zoomIn(onCompleteRunnable);
                };
                };
            };
            };
@@ -2091,6 +2091,8 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
            snapToPage(indexOfChild(mDragView), 0);
            snapToPage(indexOfChild(mDragView), 0);
            // Animate the drag view back to the front position
            // Animate the drag view back to the front position
            animateDragViewToOriginalPosition();
            animateDragViewToOriginalPosition();
        } else {
            zoomIn(onCompleteRunnable);
        }
        }
    }
    }