Merge "Fix spinning TaskPersister" into oc-dev
am: 88c6ec9f17
Change-Id: Ia8a1eeefd133621d1dc47b13fc5e7940c3a215b7
This commit is contained in:
@@ -209,11 +209,12 @@ class TaskSnapshotPersister {
|
||||
SystemClock.sleep(DELAY_MS);
|
||||
}
|
||||
synchronized (mLock) {
|
||||
if (!mWriteQueue.isEmpty()) {
|
||||
final boolean writeQueueEmpty = mWriteQueue.isEmpty();
|
||||
if (!writeQueueEmpty && !mPaused) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
mQueueIdling = true;
|
||||
mQueueIdling = writeQueueEmpty;
|
||||
mLock.wait();
|
||||
mQueueIdling = false;
|
||||
} catch (InterruptedException e) {
|
||||
|
||||
Reference in New Issue
Block a user