summaryrefslogtreecommitdiffstats
path: root/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2014-08-08 17:00:47 +0200
committerJorim Jaggi <jjaggi@google.com>2014-08-12 20:52:26 +0000
commit76a1623afc170a13923b68f3256057d8adeb7937 (patch)
tree458a7e24ffb9da76391bb683bebfa73d2baa7f6b /packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
parent9a0b289f060e68e42d3db0b843d55cf920f3da12 (diff)
downloadframeworks_base-76a1623afc170a13923b68f3256057d8adeb7937.zip
frameworks_base-76a1623afc170a13923b68f3256057d8adeb7937.tar.gz
frameworks_base-76a1623afc170a13923b68f3256057d8adeb7937.tar.bz2
Preparations for lockscreen launch animations
- Update unlock animations to new spec to make the consistent with lockscreen launch animations. - Introduce disappearing motion for security views which runs before we actually dismiss Keyguard. - If a window is running the un-force-hide animation, treat as it would have the wallpaper flag set so the wallpaper stays until the animation is completely done. - Run an animation on the wallpaper if the wallpaper is going away. Bug: 15991916 Bug: 16234603 Bug: 15326120 Change-Id: I063aa4f269ddcf75b9a705e90f0c3056b541b642
Diffstat (limited to 'packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
index 12bbd35..3b05d11 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
@@ -37,6 +37,7 @@ import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
+import android.view.animation.AccelerateInterpolator;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
import android.widget.Button;
@@ -95,6 +96,7 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
private Drawable mBouncerFrame;
private ViewGroup mKeyguardBouncerFrame;
private KeyguardMessageArea mHelpMessage;
+ private int mDisappearYTranslation;
enum FooterMode {
Normal,
@@ -113,6 +115,8 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
AppearAnimationUtils.DEFAULT_APPEAR_DURATION, 1.5f /* delayScale */,
2.0f /* transitionScale */, AnimationUtils.loadInterpolator(
mContext, android.R.interpolator.linear_out_slow_in));
+ mDisappearYTranslation = getResources().getDimensionPixelSize(
+ R.dimen.disappear_y_translation);
}
public void setKeyguardCallback(KeyguardSecurityCallback callback) {
@@ -412,6 +416,11 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
@Override
public void startAppearAnimation() {
enableClipping(false);
+ setTranslationY(mAppearAnimationUtils.getStartTranslation());
+ animate()
+ .setDuration(500)
+ .setInterpolator(mAppearAnimationUtils.getInterpolator())
+ .translationY(0);
mAppearAnimationUtils.startAppearAnimation(
mLockPatternView.getCellStates(),
new Runnable() {
@@ -430,6 +439,19 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
}
}
+ @Override
+ public boolean startDisappearAnimation(Runnable finishRunnable) {
+ mLockPatternView.clearPattern();
+ animate()
+ .alpha(0f)
+ .translationY(-100)
+ .setInterpolator(AnimationUtils.loadInterpolator(
+ mContext, android.R.interpolator.fast_out_linear_in))
+ .setDuration(100)
+ .withEndAction(finishRunnable);
+ return true;
+ }
+
private void enableClipping(boolean enable) {
setClipChildren(enable);
mKeyguardBouncerFrame.setClipToPadding(enable);
@@ -477,4 +499,9 @@ public class KeyguardPatternView extends LinearLayout implements KeyguardSecurit
animator.start();
mLockPatternView.invalidate();
}
+
+ @Override
+ public boolean hasOverlappingRendering() {
+ return false;
+ }
}