diff options
| author | 2012-08-27 08:13:27 -0700 | |
|---|---|---|
| committer | 2012-08-27 08:13:27 -0700 | |
| commit | ba37d595f70d348987a9e60c56c071fdd319260f (patch) | |
| tree | a6d35f5db94c8de10a8ada585c94aba8b235e907 /services/java | |
| parent | 2f1ec0db61554c3c26fe22cbb8f31ef6e6f15ef0 (diff) | |
| parent | e70a32afc5b27ddc9681efd867780a0c4c77edd3 (diff) | |
am e70a32af: am eb00f951: Merge "VibratorService: Fix to ensure actual delay in a vibrate pattern"
* commit 'e70a32afc5b27ddc9681efd867780a0c4c77edd3':
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); } } |