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
This commit is contained in:
committed by
Android Git Automerger
commit
e70a32afc5
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user