summaryrefslogtreecommitdiffstats
path: root/core/java/android/os
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-10-04 13:18:36 -0700
committerJeff Brown <jeffbrown@google.com>2012-10-04 16:22:04 -0700
commit93cbbb25a56356cd36523809783a277fe92e312e (patch)
treec88c6f2adca001c4ed87324a33cb67073b2a0e08 /core/java/android/os
parentdce8b948320e933e46e4a38c496f56555472495f (diff)
downloadframeworks_base-93cbbb25a56356cd36523809783a277fe92e312e.zip
frameworks_base-93cbbb25a56356cd36523809783a277fe92e312e.tar.gz
frameworks_base-93cbbb25a56356cd36523809783a277fe92e312e.tar.bz2
Allow phone to go to sleep while in call.
Bug: 7279383 Change-Id: Ia05490218f40a1843507b95ff48fa07910e582d4
Diffstat (limited to 'core/java/android/os')
-rw-r--r--core/java/android/os/PowerManager.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java
index fb02c0a..7e11c22 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -178,6 +178,16 @@ public final class PowerManager {
/**
* Wake lock level: Turns the screen off when the proximity sensor activates.
* <p>
+ * If the proximity sensor detects that an object is nearby, the screen turns off
+ * immediately. Shortly after the object moves away, the screen turns on again.
+ * </p><p>
+ * A proximity wake lock does not prevent the device from falling asleep
+ * unlike {@link #FULL_WAKE_LOCK}, {@link #SCREEN_BRIGHT_WAKE_LOCK} and
+ * {@link #SCREEN_DIM_WAKE_LOCK}. If there is no user activity and no other
+ * wake locks are held, then the device will fall asleep (and lock) as usual.
+ * However, the device will not fall asleep while the screen has been turned off
+ * by the proximity sensor because it effectively counts as ongoing user activity.
+ * </p><p>
* Since not all devices have proximity sensors, use {@link #isWakeLockLevelSupported}
* to determine whether this wake lock level is supported.
* </p>