am 0155856a: Fix AudioService rotation helper thread
* commit '0155856a1d1cb272d83b6175953dd7151fe65daa': Fix AudioService rotation helper thread
This commit is contained in:
@@ -192,16 +192,18 @@ class RotationHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
int newRotation;
|
|
||||||
while (mWaitCounter < WAIT_TIMES_MS.length) {
|
while (mWaitCounter < WAIT_TIMES_MS.length) {
|
||||||
updateOrientation();
|
|
||||||
int waitTimeMs;
|
int waitTimeMs;
|
||||||
synchronized(mCounterLock) {
|
synchronized(mCounterLock) {
|
||||||
waitTimeMs = WAIT_TIMES_MS[mWaitCounter];
|
waitTimeMs = mWaitCounter < WAIT_TIMES_MS.length ?
|
||||||
|
WAIT_TIMES_MS[mWaitCounter] : 0;
|
||||||
mWaitCounter++;
|
mWaitCounter++;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
if (waitTimeMs > 0) {
|
||||||
sleep(waitTimeMs);
|
sleep(waitTimeMs);
|
||||||
|
updateOrientation();
|
||||||
|
}
|
||||||
} catch (InterruptedException e) { }
|
} catch (InterruptedException e) { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user