am 002ab676: am 3b9f9bce: Merge "Fix inability to start pattern outside view bounds (issue 7344325)" into jb-mr1-dev
* commit '002ab676ef8287e0135c3deb4a5fe0175b68d460': Fix inability to start pattern outside view bounds (issue 7344325)
This commit is contained in:
@@ -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,19 +55,21 @@ public class KeyguardWidgetRegion extends LinearLayout implements PagedView.Page
|
||||
mPager.setPageSwitchListener(this);
|
||||
|
||||
setSoundEffectsEnabled(false);
|
||||
setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showPagingFeedback();
|
||||
}
|
||||
});
|
||||
if (!DISABLE_TOUCH_INTERACTION) {
|
||||
setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showPagingFeedback();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user