Merge "Only fade clock away at the top of the screen" into pi-dev
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java
index 1fb1ddd..d9a55c5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java
@@ -232,8 +232,7 @@
         if (mCurrentlySecure) {
             alphaKeyguard = 1;
         } else {
-            alphaKeyguard = Math.max(0, Math.min(1, (y - mMinTopMargin)
-                    / Math.max(1f, getExpandedClockPosition() - mMinTopMargin)));
+            alphaKeyguard = Math.max(0, y / Math.max(1f, getExpandedClockPosition()));
             alphaKeyguard = Interpolators.ACCELERATE.getInterpolation(alphaKeyguard);
         }
         return MathUtils.lerp(alphaKeyguard, 1f, mDarkAmount);