summaryrefslogtreecommitdiff
path: root/services/java/com
diff options
context:
space:
mode:
author Jean-Baptiste Queru <jbq@google.com> 2012-08-27 08:16:02 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2012-08-27 08:16:02 -0700
commitaf18865486df1e23e2951983fb0d1d4bf17f4f32 (patch)
tree8d1574e853c3c5a2ef4c255205cd0c8e1b6debba /services/java/com
parent68cff8c117b18136de8f652782b364fc48f25a84 (diff)
parentba37d595f70d348987a9e60c56c071fdd319260f (diff)
am ba37d595: am e70a32af: am eb00f951: Merge "VibratorService: Fix to ensure actual delay in a vibrate pattern"
* commit 'ba37d595f70d348987a9e60c56c071fdd319260f': VibratorService: Fix to ensure actual delay in a vibrate pattern
Diffstat (limited to 'services/java/com')
-rwxr-xr-xservices/java/com/android/server/VibratorService.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/services/java/com/android/server/VibratorService.java b/services/java/com/android/server/VibratorService.java
index b6098675b5dc..72fde1123809 100755
--- a/services/java/com/android/server/VibratorService.java
+++ b/services/java/com/android/server/VibratorService.java
@@ -441,7 +441,7 @@ public class VibratorService extends IVibratorService.Stub
private void delay(long duration) {
if (duration > 0) {
- long bedtime = SystemClock.uptimeMillis();
+ long bedtime = duration + SystemClock.uptimeMillis();
do {
try {
this.wait(duration);
@@ -451,8 +451,7 @@ public class VibratorService extends IVibratorService.Stub
if (mDone) {
break;
}
- duration = duration
- - SystemClock.uptimeMillis() - bedtime;
+ duration = bedtime - SystemClock.uptimeMillis();
} while (duration > 0);
}
}