diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java | 23 |
1 files changed, 16 insertions, 7 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 069703e9dd81..f4fa1e8246e6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -590,11 +590,6 @@ public class NotificationPanelView extends PanelView implements mClockPositionResult.clockX, CLOCK_ANIMATION_PROPERTIES, animateClock); PropertyAnimator.setProperty(mKeyguardStatusView, AnimatableProperty.Y, mClockPositionResult.clockY, CLOCK_ANIMATION_PROPERTIES, animateClock); - // Move big clock up while pulling up the bouncer - PropertyAnimator.setProperty(mBigClockContainer, AnimatableProperty.Y, - MathUtils.lerp(-mBigClockContainer.getHeight(), 0, - Interpolators.FAST_OUT_LINEAR_IN.getInterpolation(getExpandedFraction())), - CLOCK_ANIMATION_PROPERTIES, animateClock); updateClock(); stackScrollerPadding = mClockPositionResult.stackScrollerPadding; } @@ -1334,8 +1329,7 @@ public class NotificationPanelView extends PanelView implements } }; - private void setKeyguardBottomAreaVisibility(int statusBarState, - boolean goingToFullShade) { + private void setKeyguardBottomAreaVisibility(int statusBarState, boolean goingToFullShade) { mKeyguardBottomArea.animate().cancel(); if (goingToFullShade) { mKeyguardBottomArea.animate() @@ -1438,6 +1432,7 @@ public class NotificationPanelView extends PanelView implements if (mBarState == StatusBarState.SHADE_LOCKED || mBarState == StatusBarState.KEYGUARD) { updateKeyguardBottomAreaAlpha(); + updateBigClockAlpha(); } if (mBarState == StatusBarState.SHADE && mQsExpanded && !mStackScrollerOverscrolling && mQsScrimEnabled) { @@ -1883,6 +1878,19 @@ public class NotificationPanelView extends PanelView implements } } + /** + * Custom clock fades away when user drags up to unlock or pulls down quick settings. + * + * Updates alpha of custom clock to match the alpha of the KeyguardBottomArea. See + * {@link updateKeyguardBottomAreaAlpha}. + */ + private void updateBigClockAlpha() { + float expansionAlpha = MathUtils.map(isUnlockHintRunning() + ? 0 : KeyguardBouncer.ALPHA_EXPANSION_THRESHOLD, 1f, 0f, 1f, getExpandedFraction()); + float alpha = Math.min(expansionAlpha, 1 - getQsExpansionFraction()); + mBigClockContainer.setAlpha(alpha); + } + private float getNotificationsTopY() { if (mNotificationStackScroller.getNotGoneChildCount() == 0) { return getExpandedHeight(); @@ -2597,6 +2605,7 @@ public class NotificationPanelView extends PanelView implements } mNotificationStackScroller.setExpandedHeight(expandedHeight); updateKeyguardBottomAreaAlpha(); + updateBigClockAlpha(); updateStatusBarIcons(); } |