summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2015-06-30 13:35:11 -0700
committerJorim Jaggi <jjaggi@google.com>2015-06-30 23:25:33 +0000
commite4f1a202d8cc817eca3c4dbf4f448ba11f596f42 (patch)
tree423c14f486498bae9556503edb7f4d373dd56679 /packages
parentc2756505b24801d4580383734a58bdf5f916e093 (diff)
downloadframeworks_base-e4f1a202d8cc817eca3c4dbf4f448ba11f596f42.zip
frameworks_base-e4f1a202d8cc817eca3c4dbf4f448ba11f596f42.tar.gz
frameworks_base-e4f1a202d8cc817eca3c4dbf4f448ba11f596f42.tar.bz2
Fix Keyguard header animation from SHADE_LOCKED -> Keyguard
Bug: 22128249 Change-Id: I36dbecc41e66922987c1b753d62bde27cb3b17be
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java49
1 files changed, 28 insertions, 21 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index cf0d670..5078b5c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -1126,38 +1126,41 @@ public class NotificationPanelView extends PanelView implements
};
private void animateKeyguardStatusBarOut() {
- mKeyguardStatusBar.animate()
- .alpha(0f)
- .setStartDelay(mStatusBar.isKeyguardFadingAway()
- ? mStatusBar.getKeyguardFadingAwayDelay()
- : 0)
- .setDuration(mStatusBar.isKeyguardFadingAway()
- ? mStatusBar.getKeyguardFadingAwayDuration() / 2
- : StackStateAnimator.ANIMATION_DURATION_STANDARD)
- .setInterpolator(PhoneStatusBar.ALPHA_OUT)
- .setUpdateListener(mStatusBarAnimateAlphaListener)
- .withEndAction(mAnimateKeyguardStatusBarInvisibleEndRunnable)
- .start();
+ ValueAnimator anim = ValueAnimator.ofFloat(mKeyguardStatusBar.getAlpha(), 0f);
+ anim.addUpdateListener(mStatusBarAnimateAlphaListener);
+ anim.setStartDelay(mStatusBar.isKeyguardFadingAway()
+ ? mStatusBar.getKeyguardFadingAwayDelay()
+ : 0);
+ anim.setDuration(mStatusBar.isKeyguardFadingAway()
+ ? mStatusBar.getKeyguardFadingAwayDuration() / 2
+ : StackStateAnimator.ANIMATION_DURATION_STANDARD);
+ anim.setInterpolator(mDozeAnimationInterpolator);
+ anim.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ mAnimateKeyguardStatusBarInvisibleEndRunnable.run();
+ }
+ });
+ anim.start();
}
private final ValueAnimator.AnimatorUpdateListener mStatusBarAnimateAlphaListener =
new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
- mKeyguardStatusBarAnimateAlpha = mKeyguardStatusBar.getAlpha();
+ mKeyguardStatusBarAnimateAlpha = (float) animation.getAnimatedValue();
+ updateHeaderKeyguardAlpha();
}
};
private void animateKeyguardStatusBarIn(long duration) {
mKeyguardStatusBar.setVisibility(View.VISIBLE);
mKeyguardStatusBar.setAlpha(0f);
- mKeyguardStatusBar.animate()
- .alpha(1f)
- .setStartDelay(0)
- .setDuration(duration)
- .setInterpolator(mDozeAnimationInterpolator)
- .setUpdateListener(mStatusBarAnimateAlphaListener)
- .start();
+ ValueAnimator anim = ValueAnimator.ofFloat(0f, 1f);
+ anim.addUpdateListener(mStatusBarAnimateAlphaListener);
+ anim.setDuration(duration);
+ anim.setInterpolator(mDozeAnimationInterpolator);
+ anim.start();
}
private final Runnable mAnimateKeyguardBottomAreaInvisibleEndRunnable = new Runnable() {
@@ -1716,12 +1719,16 @@ public class NotificationPanelView extends PanelView implements
return alpha;
}
- private void updateHeaderKeyguard() {
+ private void updateHeaderKeyguardAlpha() {
float alphaQsExpansion = 1 - Math.min(1, getQsExpansionFraction() * 2);
mKeyguardStatusBar.setAlpha(Math.min(getKeyguardContentsAlpha(), alphaQsExpansion)
* mKeyguardStatusBarAnimateAlpha);
mKeyguardStatusBar.setVisibility(mKeyguardStatusBar.getAlpha() != 0f
&& !mDozing ? VISIBLE : INVISIBLE);
+ }
+
+ private void updateHeaderKeyguard() {
+ updateHeaderKeyguardAlpha();
setQsTranslation(mQsExpansionHeight);
}