summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2015-07-27 18:55:30 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-27 18:55:30 +0000
commit58d1995c904f12dfb00185af3dabfe267d50568a (patch)
treed6380a4945a2b1fef120594199426a0c3daba4b7 /src/com/android/settings
parent3b521b60d3a1921b5231633105d1ca7afadd9978 (diff)
parentf5b17e558841d409ed9503cbbe72a889d2c67977 (diff)
downloadpackages_apps_Settings-58d1995c904f12dfb00185af3dabfe267d50568a.zip
packages_apps_Settings-58d1995c904f12dfb00185af3dabfe267d50568a.tar.gz
packages_apps_Settings-58d1995c904f12dfb00185af3dabfe267d50568a.tar.bz2
Merge "Move PIN/Pattern appear animation to RenderThread (2/2)" into mnc-dev
Diffstat (limited to 'src/com/android/settings')
-rw-r--r--src/com/android/settings/ConfirmLockPattern.java40
1 files changed, 6 insertions, 34 deletions
diff --git a/src/com/android/settings/ConfirmLockPattern.java b/src/com/android/settings/ConfirmLockPattern.java
index d86d63b..da3aeb8 100644
--- a/src/com/android/settings/ConfirmLockPattern.java
+++ b/src/com/android/settings/ConfirmLockPattern.java
@@ -499,40 +499,12 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
final Runnable finishListener) {
if (obj instanceof LockPatternView.CellState) {
final LockPatternView.CellState animatedCell = (LockPatternView.CellState) obj;
- if (appearing) {
- animatedCell.scale = 0.0f;
- animatedCell.alpha = 1.0f;
- }
- animatedCell.translateY = appearing ? translationY : 0;
- ValueAnimator animator = ValueAnimator.ofFloat(animatedCell.translateY,
- appearing ? 0 : translationY);
- animator.setInterpolator(interpolator);
- animator.setDuration(duration);
- animator.setStartDelay(delay);
- animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
- @Override
- public void onAnimationUpdate(ValueAnimator animation) {
- float animatedFraction = animation.getAnimatedFraction();
- if (appearing) {
- animatedCell.scale = animatedFraction;
- } else {
- animatedCell.alpha = 1 - animatedFraction;
- }
- animatedCell.translateY = (float) animation.getAnimatedValue();
- mLockPatternView.invalidate();
- }
- });
- if (finishListener != null) {
- animator.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- finishListener.run();
- }
- });
- }
-
- animator.start();
- mLockPatternView.invalidate();
+ mLockPatternView.startCellStateAnimation(animatedCell,
+ 1f, appearing ? 1f : 0f, /* alpha */
+ appearing ? translationY : 0f, /* startTranslation */
+ appearing ? 0f : translationY, /* endTranslation */
+ appearing ? 0f : 1f, 1f /* scale */,
+ delay, duration, interpolator, finishListener);
} else {
mAppearAnimationUtils.createAnimation((View) obj, delay, duration, translationY,
appearing, interpolator, finishListener);