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

Commit 92b6b709 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "AOD: Skip window animations while dozing" into oc-dr1-dev

parents 25937550 e94c15ca
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ import android.graphics.Rect;
import android.os.Bundle;
import android.os.IBinder;
import android.os.Looper;
import android.os.PowerManager;
import android.os.RemoteException;
import android.util.Slog;
import android.view.animation.Animation;
@@ -1310,6 +1311,14 @@ public interface WindowManagerPolicy {
     */
    public boolean isScreenOn();

    /**
     * @return whether the device is currently {@link PowerManager#isInteractive() interactive}.
     *
     * Note: the screen can be on while the device is not interactive, e.g. when the device is
     * showing Ambient Display.
     */
    boolean isInteractive();

    /**
     * Tell the policy that the lid switch has changed state.
     * @param whenNanos The time when the change occurred in uptime nanoseconds.
+6 −1
Original line number Diff line number Diff line
@@ -563,7 +563,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
    int mPanicPressOnBackBehavior;
    int mShortPressOnSleepBehavior;
    int mShortPressWindowBehavior;
    boolean mAwake;
    volatile boolean mAwake;
    boolean mScreenOnEarly;
    boolean mScreenOnFully;
    ScreenOnListener mScreenOnListener;
@@ -6813,6 +6813,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        }
    }

    @Override
    public boolean isInteractive() {
        return mAwake;
    }

    /** {@inheritDoc} */
    @Override
    public void enableKeyguard(boolean enabled) {
+2 −1
Original line number Diff line number Diff line
@@ -350,7 +350,7 @@ public class AppWindowAnimator {

    // This must be called while inside a transaction.
    boolean stepAnimationLocked(long currentTime) {
        if (mService.okToDisplay()) {
        if (mService.okToAnimate()) {
            // We will run animations as long as the display isn't frozen.

            if (animation == sDummyAnimation) {
@@ -416,6 +416,7 @@ public class AppWindowAnimator {
        if (DEBUG_ANIM) Slog.v(TAG, "Animation done in " + mAppToken
                + ": reportedVisible=" + mAppToken.reportedVisible
                + " okToDisplay=" + mService.okToDisplay()
                + " okToAnimate=" + mService.okToAnimate()
                + " startingDisplayed=" + mAppToken.startingDisplayed);

        transformation.clear();
+1 −1
Original line number Diff line number Diff line
@@ -436,7 +436,7 @@ public class AppWindowContainerController

            // If we are preparing an app transition, then delay changing
            // the visibility of this token until we execute that transition.
            if (mService.okToDisplay() && mService.mAppTransition.isTransitionSet()) {
            if (mService.okToAnimate() && mService.mAppTransition.isTransitionSet()) {
                // A dummy animation is a placeholder animation which informs others that an
                // animation is going on (in this case an application transition). If the animation
                // was transferred from another application/animator, no dummy animator should be
+1 −1
Original line number Diff line number Diff line
@@ -290,7 +290,7 @@ class DimLayerController {
            state.dimLayer.setLayer(dimLayer);
        }
        if (state.dimLayer.isAnimating()) {
            if (!mDisplayContent.mService.okToDisplay()) {
            if (!mDisplayContent.mService.okToAnimate()) {
                // Jump to the end of the animation.
                state.dimLayer.show();
            } else {
Loading