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

Commit 3b9f9bce authored by Adam Cohen's avatar Adam Cohen Committed by Android (Google) Code Review
Browse files

Merge "Fix inability to start pattern outside view bounds (issue 7344325)" into jb-mr1-dev

parents c4c56222 258d9fc6
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -29,6 +29,9 @@ public class KeyguardWidgetRegion extends LinearLayout implements PagedView.Page
    private int mPage = 0;
    private Callbacks mCallbacks;

    // We are disabling touch interaction of the widget region for factory ROM. 
    private static final boolean DISABLE_TOUCH_INTERACTION = true;

    private static final long CUSTOM_WIDGET_USER_ACTIVITY_TIMEOUT = 30000;

    public KeyguardWidgetRegion(Context context) {
@@ -52,6 +55,7 @@ public class KeyguardWidgetRegion extends LinearLayout implements PagedView.Page
        mPager.setPageSwitchListener(this);

        setSoundEffectsEnabled(false);
        if (!DISABLE_TOUCH_INTERACTION) {
            setOnClickListener(new OnClickListener() {
                @Override
                public void onClick(View v) {
@@ -59,12 +63,13 @@ public class KeyguardWidgetRegion extends LinearLayout implements PagedView.Page
                }
            });
        }
    }

    public void showPagingFeedback() {
        if (true || (mPage < mPager.getPageCount() - 1)) {
        if ((mPage < mPager.getPageCount() - 1)) {
            mLeftStrip.makeEmGo();
        }
        if (true || (mPage > 0)) {
        if ((mPage > 0)) {
            mRightStrip.makeEmGo();
        }
    }
+11 −0
Original line number Diff line number Diff line
@@ -77,6 +77,9 @@ public class PagedView extends ViewGroup implements ViewGroup.OnHierarchyChangeL
    private static final int MIN_SNAP_VELOCITY = 1500;
    private static final int MIN_FLING_VELOCITY = 250;

    // We are disabling touch interaction of the widget region for factory ROM. 
    private static final boolean DISABLE_TOUCH_INTERACTION = true;

    static final int AUTOMATIC_PAGE_SPACING = -1;

    protected int mFlingThresholdVelocity;
@@ -862,6 +865,10 @@ public class PagedView extends ViewGroup implements ViewGroup.OnHierarchyChangeL

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        if (DISABLE_TOUCH_INTERACTION) {
            return false;
        }

        /*
         * This method JUST determines whether we want to intercept the motion.
         * If we return true, onTouchEvent will be called and we do the actual
@@ -1100,6 +1107,10 @@ public class PagedView extends ViewGroup implements ViewGroup.OnHierarchyChangeL

    @Override
    public boolean onTouchEvent(MotionEvent ev) {
        if (DISABLE_TOUCH_INTERACTION) {
            return false;
        }

        // Skip touch handling if there are no pages to swipe
        if (getChildCount() <= 0) return super.onTouchEvent(ev);