am af188654: am ba37d595: am e70a32af: am eb00f951: Merge "VibratorService: Fix to ensure actual delay in a vibrate pattern"
* commit 'af18865486df1e23e2951983fb0d1d4bf17f4f32': VibratorService: Fix to ensure actual delay in a vibrate pattern
This commit is contained in:
committed by
Android Git Automerger
commit
ab9dfc573a
@@ -441,7 +441,7 @@ public class VibratorService extends IVibratorService.Stub
|
|||||||
|
|
||||||
private void delay(long duration) {
|
private void delay(long duration) {
|
||||||
if (duration > 0) {
|
if (duration > 0) {
|
||||||
long bedtime = SystemClock.uptimeMillis();
|
long bedtime = duration + SystemClock.uptimeMillis();
|
||||||
do {
|
do {
|
||||||
try {
|
try {
|
||||||
this.wait(duration);
|
this.wait(duration);
|
||||||
@@ -451,8 +451,7 @@ public class VibratorService extends IVibratorService.Stub
|
|||||||
if (mDone) {
|
if (mDone) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
duration = duration
|
duration = bedtime - SystemClock.uptimeMillis();
|
||||||
- SystemClock.uptimeMillis() - bedtime;
|
|
||||||
} while (duration > 0);
|
} while (duration > 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user