diff options
| author | Lucas Dupin <dupin@google.com> | 2019-01-16 18:52:30 -0800 |
|---|---|---|
| committer | Lucas Dupin <dupin@google.com> | 2019-01-25 10:28:01 -0800 |
| commit | 0a5d79707d95afc4a7c18a57cc2b48d098e4ac2d (patch) | |
| tree | 4f4ed07e30ec783ab93c295083494414173d5c16 /core/java/android/os/PowerManager.java | |
| parent | a75a6ee0c1f635dd9b1d77875ce6e62c9e0c5816 (diff) | |
Do not sleep if someone is paying attention
Test: atest AttentionDetectorTest
Test: manual; let device sleep because of timeout (without attention)
Test: manual; let device sleep after maximum attention timeout
Test: manual; touch screen multiple times to avoid timeout
Bug: 111939367
Change-Id: Iafeea7569f84fce08888bc5b6d74ba02fb13fd04
Diffstat (limited to 'core/java/android/os/PowerManager.java')
| -rw-r--r-- | core/java/android/os/PowerManager.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java index 4ce760f2c4a6..7f4254e29aaa 100644 --- a/core/java/android/os/PowerManager.java +++ b/core/java/android/os/PowerManager.java @@ -336,6 +336,13 @@ public final class PowerManager { public static final int USER_ACTIVITY_EVENT_ACCESSIBILITY = 3; /** + * User activity event type: {@link android.service.attention.AttentionService} taking action + * on behalf of user. + * @hide + */ + public static final int USER_ACTIVITY_EVENT_ATTENTION = 4; + + /** * User activity flag: If already dimmed, extend the dim timeout * but do not brighten. This flag is useful for keeping the screen on * a little longer without causing a visible change such as when |
