diff options
| author | 2012-08-27 07:55:41 -0700 | |
|---|---|---|
| committer | 2012-08-27 07:55:41 -0700 | |
| commit | eb00f951439cd724863d267e8e8d77414383d93f (patch) | |
| tree | d5dae63b27d4f434ea887c173b15404f9906d57f /services/java | |
| parent | 13ab2c9fdaec119a40b628ae772fd1462fbb826d (diff) | |
| parent | e4c56d9367ae89c705b92e44f327bd1d0132129c (diff) | |
Merge "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); } } |