summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2019-06-19 20:53:18 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-06-19 20:53:18 +0000
commit20ddfc3a377bea56edbe7018cce20c34c1976f01 (patch)
tree2106de5db3a3338b926f1100380958f25b752101
parent8c609b6283fbff3fe3416d205569f7b2d9ddd7db (diff)
parent33259ad52e17096db6586aef0e5379baab2f762b (diff)
Merge "Hold wake lock while animations to bold clock." into qt-r1-dev
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
index 7ec1bda26cf8..3da969c8542e 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
@@ -3,7 +3,6 @@ package com.android.keyguard;
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.colorextraction.SysuiColorExtractor;
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 @@ public class KeyguardClockSwitch extends RelativeLayout {
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);
}
});