Merge "Only fade clock away at the top of the screen" into pi-dev

This commit is contained in:
Lucas Dupin
2018-04-17 00:14:22 +00:00
committed by Android (Google) Code Review

View File

@@ -232,8 +232,7 @@ public class KeyguardClockPositionAlgorithm {
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);