summaryrefslogtreecommitdiff
path: root/core/java/android/os/PowerManager.java
diff options
context:
space:
mode:
authorLucas Dupin <dupin@google.com>2018-02-08 13:14:50 -0800
committerLucas Dupin <dupin@google.com>2018-03-20 15:59:51 -0700
commit16cfe45dec96154d37b36364f67cedce16ca2484 (patch)
tree5cc7fae63407667bdd70de41c4a0a21b73312018 /core/java/android/os/PowerManager.java
parentc1812aa644864412ff2827a49cefc78a94c2fdd7 (diff)
Screen off animation
SysUI can now control the screen off animation as long as config_dozeAfterScreenOff is set to false. The current implementation collapses the notification shade and moves the clock whenever the use is on the lock screen, or will fade the scrims and show the clock when the keyguard is occluded. Display state change (on, doze, doze_suspended) is delayed to let the animations occur at 60Hz. Test: atest packages/SystemUI/tests/src/com/android/systemui/doze/DozeUiTest.java Test: atest packages/SystemUI/tests/src/com/android/systemui/doze/DozeWallpaperStateTest.java Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java Test: atest tests/src/com/android/systemui/statusbar/phone/DozeScrimControllerTest.java Test: atest tests/src/com/android/systemui/statusbar/phone/DozeParametersTest.java Test: atest packages/SystemUI/tests/src/com/android/systemui/keyguard/WakefulnessLifecycleTest.java Fixes: 73178121 Change-Id: Id5d964452f342d4e97bedf1084efa808604e602c
Diffstat (limited to 'core/java/android/os/PowerManager.java')
-rw-r--r--core/java/android/os/PowerManager.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java
index 66fa6294ecee..c00100b7e0cf 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -1280,6 +1280,19 @@ public final class PowerManager {
}
/**
+ * If true, the doze component is not started until after the screen has been
+ * turned off and the screen off animation has been performed.
+ * @hide
+ */
+ public void setDozeAfterScreenOff(boolean dozeAfterScreenOf) {
+ try {
+ mService.setDozeAfterScreenOff(dozeAfterScreenOf);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
* Returns the reason the phone was last shutdown. Calling app must have the
* {@link android.Manifest.permission#DEVICE_POWER} permission to request this information.
* @return Reason for shutdown as an int, {@link #SHUTDOWN_REASON_UNKNOWN} if the file could