diff options
| author | Jean-Baptiste Queru <jbq@google.com> | 2012-08-27 08:11:19 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2012-08-27 08:11:19 -0700 |
| commit | e70a32afc5b27ddc9681efd867780a0c4c77edd3 (patch) | |
| tree | 6605c9c68c6e1bf62ce16c04412f76f9b7419998 | |
| parent | 5a60f058891fa5417df7d53be28521b604071fea (diff) | |
| parent | eb00f951439cd724863d267e8e8d77414383d93f (diff) | |
| download | frameworks_base-e70a32afc5b27ddc9681efd867780a0c4c77edd3.zip frameworks_base-e70a32afc5b27ddc9681efd867780a0c4c77edd3.tar.gz frameworks_base-e70a32afc5b27ddc9681efd867780a0c4c77edd3.tar.bz2 | |
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
| -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 b609867..72fde11 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); } } |
