Hold wake lock while animations to bold clock.

In the bug, it appears that the phone dozed during the transition.
Holding the wake lock will keep the phone awake until the transition
ends. This is a speculative change because I wasn't able to reproduce
the issue.

Bug: 135458132
Test: checked that the transition still works, but I wasn't able to
verify the fix because I'm not able to reproduce the issue.

Change-Id: Ibfd4ae7522c30882051a41927c1714ace3f08b89
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
index 7ec1bda..3da969c 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
@@ -3,7 +3,6 @@
 import static com.android.systemui.util.InjectionInflationController.VIEW_CONTEXT;
 
 import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
 import android.animation.ValueAnimator;
 import android.app.WallpaperManager;
 import android.content.Context;
@@ -34,6 +33,7 @@
 import com.android.systemui.plugins.ClockPlugin;
 import com.android.systemui.plugins.statusbar.StatusBarStateController;
 import com.android.systemui.statusbar.StatusBarState;
+import com.android.systemui.util.wakelock.KeepAwakeAnimationListener;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
@@ -569,11 +569,16 @@
                 view.setScaleX(scale);
                 view.setScaleY(scale);
             });
-            animator.addListener(new AnimatorListenerAdapter() {
+            animator.addListener(new KeepAwakeAnimationListener(getContext()) {
                 @Override
                 public void onAnimationStart(Animator animation) {
                     super.onAnimationStart(animation);
                     view.setVisibility(startVisibility);
+                }
+
+                @Override
+                public void onAnimationEnd(Animator animation) {
+                    super.onAnimationEnd(animation);
                     animation.removeListener(this);
                 }
             });