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
This commit is contained in:
committed by
Android Git Automerger
commit
af18865486
@@ -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