Fix clock alpha when awake

Test: manual
Test: atest KeyguardClockPositionAlgorithmTest
Fixes: 141545917
Change-Id: I961a208313f7697913c90e8d0eedb8c940a29b04
This commit is contained in:
Lucas Dupin
2019-10-21 15:56:55 -07:00
parent 305a6bd1d9
commit df4ee3cda5

View File

@@ -240,7 +240,7 @@ public class KeyguardClockPositionAlgorithm {
* @return Alpha from 0 to 1. * @return Alpha from 0 to 1.
*/ */
private float getClockAlpha(int y) { private float getClockAlpha(int y) {
float alphaKeyguard = Math.max(0, y / Math.max(1f, getExpandedPreferredClockY())); float alphaKeyguard = Math.max(0, y / Math.max(1f, getClockY(1f)));
alphaKeyguard = Interpolators.ACCELERATE.getInterpolation(alphaKeyguard); alphaKeyguard = Interpolators.ACCELERATE.getInterpolation(alphaKeyguard);
return MathUtils.lerp(alphaKeyguard, 1f, mDarkAmount); return MathUtils.lerp(alphaKeyguard, 1f, mDarkAmount);
} }