am 91885b55: am b0ed8bdb: Merge "Keyguard - prevent slider intercept when we don\'t want it" into jb-mr1-lockscreen-dev
* commit '91885b5528ee1b8fec4db08a402eb90a36a84776': Keyguard - prevent slider intercept when we don't want it
This commit is contained in:
@@ -481,6 +481,7 @@ public class SlidingChallengeLayout extends ViewGroup implements ChallengeLayout
|
||||
switch (action) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
mGestureStartY = ev.getY();
|
||||
mBlockDrag = false;
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_CANCEL:
|
||||
@@ -533,6 +534,11 @@ public class SlidingChallengeLayout extends ViewGroup implements ChallengeLayout
|
||||
|
||||
final int action = ev.getActionMasked();
|
||||
switch (action) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
mBlockDrag = false;
|
||||
mGestureStartY = ev.getY();
|
||||
break;
|
||||
|
||||
case MotionEvent.ACTION_CANCEL:
|
||||
if (mDragging) {
|
||||
showChallenge(0);
|
||||
@@ -855,19 +861,17 @@ public class SlidingChallengeLayout extends ViewGroup implements ChallengeLayout
|
||||
return mChallengeView.getBottom();
|
||||
}
|
||||
|
||||
/**
|
||||
* The top edge of the challenge if it were fully opened.
|
||||
*/
|
||||
private int getChallengeOpenedTop() {
|
||||
return getLayoutBottom() - ((mChallengeView == null) ? 0 : mChallengeView.getHeight());
|
||||
}
|
||||
|
||||
/**
|
||||
* Show or hide the challenge view, animating it if necessary.
|
||||
* @param show true to show, false to hide
|
||||
*/
|
||||
public void showChallenge(boolean show) {
|
||||
showChallenge(show, 0);
|
||||
if (!show) {
|
||||
// Block any drags in progress so that callers can use this to disable dragging
|
||||
// for other touch interactions.
|
||||
mBlockDrag = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void showChallenge(int velocity) {
|
||||
|
||||
Reference in New Issue
Block a user