summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
diff options
context:
space:
mode:
authorLucas Dupin <dupin@google.com>2018-06-29 11:47:32 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-06-29 11:47:32 -0700
commitd3989e4d098965289c84e340ad6a03cb2a45e937 (patch)
tree2d68cab86ffa05ff6155e8014b7f19c85b006a5a /packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
parent304c3b3b8a526f9cc78e8222a4a2e1e8d9c84355 (diff)
parente9861964bfcd91e29f6fa398a01b53e6a924fcc6 (diff)
Merge "AOD animation polish" into pi-dev am: 704a0d6174
am: e9861964bf Change-Id: I135ff3a852d2b1d2288add1c0c94bbf7313d1aec
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
index d5d96fe9d9ee..6da143c0e083 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
@@ -199,6 +199,9 @@ public class KeyguardStatusView extends GridLayout implements
mClockView.setElegantTextHeight(false);
}
+ /**
+ * Moves clock and separator, adjusting margins when slice content changes.
+ */
private void onSliceContentChanged() {
boolean smallClock = mKeyguardSlice.hasHeader() || mPulsing;
float clockScale = smallClock ? mSmallClockScale : 1;
@@ -221,7 +224,7 @@ public class KeyguardStatusView extends GridLayout implements
@Override
public void onLayoutChange(View view, int left, int top, int right, int bottom,
int oldLeft, int oldTop, int oldRight, int oldBottom) {
- int heightOffset = mPulsing ? 0 : getHeight() - mLastLayoutHeight;
+ int heightOffset = mPulsing || mWasPulsing ? 0 : getHeight() - mLastLayoutHeight;
boolean hasHeader = mKeyguardSlice.hasHeader();
boolean smallClock = hasHeader || mPulsing;
long duration = KeyguardSliceView.DEFAULT_ANIM_DURATION;
@@ -457,6 +460,11 @@ public class KeyguardStatusView extends GridLayout implements
mWasPulsing = true;
}
mPulsing = pulsing;
+ // Animation can look really weird when the slice has a header, let's hide the views
+ // immediately instead of fading them away.
+ if (mKeyguardSlice.hasHeader()) {
+ animate = false;
+ }
mKeyguardSlice.setPulsing(pulsing, animate);
updateDozeVisibleViews();
}