Loading core/java/android/view/WindowManagerPolicy.java +9 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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. Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +6 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -6813,6 +6813,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } @Override public boolean isInteractive() { return mAwake; } /** {@inheritDoc} */ @Override public void enableKeyguard(boolean enabled) { Loading services/core/java/com/android/server/wm/AppWindowAnimator.java +2 −1 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading @@ -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(); Loading services/core/java/com/android/server/wm/AppWindowContainerController.java +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading services/core/java/com/android/server/wm/DimLayerController.java +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
core/java/android/view/WindowManagerPolicy.java +9 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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. Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +6 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -6813,6 +6813,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } @Override public boolean isInteractive() { return mAwake; } /** {@inheritDoc} */ @Override public void enableKeyguard(boolean enabled) { Loading
services/core/java/com/android/server/wm/AppWindowAnimator.java +2 −1 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading @@ -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(); Loading
services/core/java/com/android/server/wm/AppWindowContainerController.java +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
services/core/java/com/android/server/wm/DimLayerController.java +1 −1 Original line number Diff line number Diff line Loading @@ -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