diff options
| author | 2012-08-27 08:16:02 -0700 | |
|---|---|---|
| committer | 2012-08-27 08:16:02 -0700 | |
| commit | af18865486df1e23e2951983fb0d1d4bf17f4f32 (patch) | |
| tree | 8d1574e853c3c5a2ef4c255205cd0c8e1b6debba /services/java | |
| parent | 68cff8c117b18136de8f652782b364fc48f25a84 (diff) | |
| parent | ba37d595f70d348987a9e60c56c071fdd319260f (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')
| -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); } } |