Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33259ad5 authored by Robert Snoeberger's avatar Robert Snoeberger
Browse files

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
parent 64b89ace
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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);
                }
            });