summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lucas Dupin <dupin@google.com> 2018-04-17 00:14:22 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-04-17 00:14:22 +0000
commit34a0b18a5c730e4fa16e27c63ed0cd79a6df188e (patch)
tree4161eba753f63827799bbad1051a944fb820c0e4
parentd7732b4c8a4232d609bab257aec59865c9b6aa43 (diff)
parente9526a98362b78ba4ebfca105f74c3a1cd4ec95e (diff)
Merge "Only fade clock away at the top of the screen" into pi-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java3
1 files changed, 1 insertions, 2 deletions
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 1fb1ddd5e70a..d9a55c59d21c 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 @@ 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);