summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lucas Dupin <dupin@google.com> 2018-04-16 20:03:09 +0800
committer Lucas Dupin <dupin@google.com> 2018-04-16 20:19:25 +0800
commite9526a98362b78ba4ebfca105f74c3a1cd4ec95e (patch)
tree5dd0a052a8f568b7ba4ea599e80bb9f7d0407a4f
parent2e79c79ecdd646f826d6cc55a705e9c591b10663 (diff)
Only fade clock away at the top of the screen
Space can be tight if we fade out at the minimum padding, especially with big font or display size. Test: visual Change-Id: Ic94714354bd1a2510f4603feae153713e23c0dfc Fixes: 77228035
-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);