diff options
author | John Spurlock <jspurlock@google.com> | 2014-09-16 09:12:03 -0400 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2014-09-16 09:12:03 -0400 |
commit | 50a8ea6ec2a41cee05d1509f10c795d6b3bb90a8 (patch) | |
tree | 597282dce452a190de0a1d456a4c6cc9597b1d5f /packages/SystemUI/src/com/android/systemui/doze | |
parent | 41f766394d07d09113d2e64a6917d069d41026c6 (diff) | |
download | frameworks_base-50a8ea6ec2a41cee05d1509f10c795d6b3bb90a8.zip frameworks_base-50a8ea6ec2a41cee05d1509f10c795d6b3bb90a8.tar.gz frameworks_base-50a8ea6ec2a41cee05d1509f10c795d6b3bb90a8.tar.bz2 |
Doze: Workaround vibration-related pickup gestures.
Ensure the pickup is registered a safe period of time after the
last notification before resetting the notification pulse schedule.
Bug:17496795
Change-Id: I0edc9bcbdf078cbf55df5935744a3eee7e902b5d
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/doze')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/doze/DozeService.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java index dae15e6..e2c8ff9 100644 --- a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java +++ b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java @@ -411,7 +411,15 @@ public class DozeService extends DreamService { } requestPulse(); setListening(true); // reregister, this sensor only fires once - resetNotificationResets(); + + // reset the notification pulse schedule, but only if we think we were not triggered + // by a notification-related vibration + final long timeSinceNotification = System.currentTimeMillis() - mNotificationPulseTime; + if (timeSinceNotification < mDozeParameters.getPickupVibrationThreshold()) { + if (DEBUG) Log.d(mTag, "Not resetting schedule, recent notification"); + } else { + resetNotificationResets(); + } } } } |