Merge "Always cancel clock animation" into pi-dev

am: a1cb973366

Change-Id: I20406102b51c0dcbbd4a1fc122b89f98e2412607
This commit is contained in:
Lucas Dupin
2018-06-06 15:24:17 -07:00
committed by android-build-merger
2 changed files with 3 additions and 3 deletions

View File

@@ -328,7 +328,7 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe
} }
public boolean hasHeader() { public boolean hasHeader() {
return mTitle.getVisibility() == VISIBLE; return mHasHeader;
} }
/** /**

View File

@@ -231,9 +231,9 @@ public class KeyguardStatusView extends GridLayout implements
if (view == mClockView) { if (view == mClockView) {
float clockScale = smallClock ? mSmallClockScale : 1; float clockScale = smallClock ? mSmallClockScale : 1;
Paint.Style style = smallClock ? Paint.Style.FILL_AND_STROKE : Paint.Style.FILL; Paint.Style style = smallClock ? Paint.Style.FILL_AND_STROKE : Paint.Style.FILL;
mClockView.animate().cancel();
if (shouldAnimate) { if (shouldAnimate) {
mClockView.setY(oldTop + heightOffset); mClockView.setY(oldTop + heightOffset);
mClockView.animate().cancel();
mClockView.animate() mClockView.animate()
.setInterpolator(Interpolators.FAST_OUT_SLOW_IN) .setInterpolator(Interpolators.FAST_OUT_SLOW_IN)
.setDuration(duration) .setDuration(duration)
@@ -257,10 +257,10 @@ public class KeyguardStatusView extends GridLayout implements
} else if (view == mClockSeparator) { } else if (view == mClockSeparator) {
boolean hasSeparator = hasHeader && !mPulsing; boolean hasSeparator = hasHeader && !mPulsing;
float alpha = hasSeparator ? 1 : 0; float alpha = hasSeparator ? 1 : 0;
mClockSeparator.animate().cancel();
if (shouldAnimate) { if (shouldAnimate) {
boolean isAwake = mDarkAmount != 0; boolean isAwake = mDarkAmount != 0;
mClockSeparator.setY(oldTop + heightOffset); mClockSeparator.setY(oldTop + heightOffset);
mClockSeparator.animate().cancel();
mClockSeparator.animate() mClockSeparator.animate()
.setInterpolator(Interpolators.FAST_OUT_SLOW_IN) .setInterpolator(Interpolators.FAST_OUT_SLOW_IN)
.setDuration(duration) .setDuration(duration)