We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 13ab2c9 + e4c56d9 commit eb00f95Copy full SHA for eb00f95
1 file changed
services/java/com/android/server/VibratorService.java
@@ -441,7 +441,7 @@ private class VibrateThread extends Thread {
441
442
private void delay(long duration) {
443
if (duration > 0) {
444
- long bedtime = SystemClock.uptimeMillis();
+ long bedtime = duration + SystemClock.uptimeMillis();
445
do {
446
try {
447
this.wait(duration);
@@ -451,8 +451,7 @@ private void delay(long duration) {
451
if (mDone) {
452
break;
453
}
454
- duration = duration
455
- - SystemClock.uptimeMillis() - bedtime;
+ duration = bedtime - SystemClock.uptimeMillis();
456
} while (duration > 0);
457
458
0 commit comments