diff options
| author | 2012-08-27 08:11:19 -0700 | |
|---|---|---|
| committer | 2012-08-27 08:11:19 -0700 | |
| commit | e70a32afc5b27ddc9681efd867780a0c4c77edd3 (patch) | |
| tree | 6605c9c68c6e1bf62ce16c04412f76f9b7419998 /services/java | |
| parent | 5a60f058891fa5417df7d53be28521b604071fea (diff) | |
| parent | eb00f951439cd724863d267e8e8d77414383d93f (diff) | |
am eb00f951: Merge "VibratorService: Fix to ensure actual delay in a vibrate pattern"
* commit 'eb00f951439cd724863d267e8e8d77414383d93f':
VibratorService: Fix to ensure actual delay in a vibrate pattern
Diffstat (limited to 'services/java')
| -rwxr-xr-x | services/java/com/android/server/VibratorService.java | 5 |
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); } } |