* commit '7f213d4f7bb056e61f94ae18ef99a6fab7498cbf': Fixed keyguard affordances
This commit is contained in:
@@ -68,25 +68,11 @@ public class KeyguardAffordanceHelper {
|
|||||||
private View mTargetedView;
|
private View mTargetedView;
|
||||||
private boolean mTouchSlopExeeded;
|
private boolean mTouchSlopExeeded;
|
||||||
private AnimatorListenerAdapter mFlingEndListener = new AnimatorListenerAdapter() {
|
private AnimatorListenerAdapter mFlingEndListener = new AnimatorListenerAdapter() {
|
||||||
public boolean mCancelled;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAnimationEnd(Animator animation) {
|
public void onAnimationEnd(Animator animation) {
|
||||||
mSwipeAnimator = null;
|
mSwipeAnimator = null;
|
||||||
mSwipingInProgress = false;
|
mSwipingInProgress = false;
|
||||||
if (!mCancelled) {
|
mTargetedView = null;
|
||||||
mTargetedView = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onAnimationCancel(Animator animation) {
|
|
||||||
mCancelled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onAnimationStart(Animator animation) {
|
|
||||||
mCancelled = false;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
private Runnable mAnimationEndRunnable = new Runnable() {
|
private Runnable mAnimationEndRunnable = new Runnable() {
|
||||||
@@ -290,7 +276,6 @@ public class KeyguardAffordanceHelper {
|
|||||||
* Phase 2: Move back.
|
* Phase 2: Move back.
|
||||||
*/
|
*/
|
||||||
private void startUnlockHintAnimationPhase2(boolean right, final Runnable onFinishedListener) {
|
private void startUnlockHintAnimationPhase2(boolean right, final Runnable onFinishedListener) {
|
||||||
final KeyguardAffordanceView targetView = right ? mRightIcon : mLeftIcon;
|
|
||||||
ValueAnimator animator = getAnimatorToRadius(right, 0);
|
ValueAnimator animator = getAnimatorToRadius(right, 0);
|
||||||
animator.addListener(new AnimatorListenerAdapter() {
|
animator.addListener(new AnimatorListenerAdapter() {
|
||||||
@Override
|
@Override
|
||||||
@@ -513,9 +498,7 @@ public class KeyguardAffordanceHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void reset(boolean animate) {
|
public void reset(boolean animate) {
|
||||||
if (mSwipeAnimator != null) {
|
cancelAnimation();
|
||||||
mSwipeAnimator.cancel();
|
|
||||||
}
|
|
||||||
setTranslation(0.0f, true, animate);
|
setTranslation(0.0f, true, animate);
|
||||||
mMotionCancelled = true;
|
mMotionCancelled = true;
|
||||||
if (mSwipingInProgress) {
|
if (mSwipingInProgress) {
|
||||||
|
|||||||
Reference in New Issue
Block a user