Merge "Fix: release lock in UserHistoryDictionary."
commit
49910a9d77
|
@ -320,7 +320,11 @@ public final class UserHistoryDictionary extends ExpandableDictionary {
|
||||||
mUserHistoryDictionary.mBigramListLock.unlock();
|
mUserHistoryDictionary.mBigramListLock.unlock();
|
||||||
}
|
}
|
||||||
} else if (mUserHistoryDictionary.mBigramListLock.tryLock()) {
|
} else if (mUserHistoryDictionary.mBigramListLock.tryLock()) {
|
||||||
doWriteTaskLocked();
|
try {
|
||||||
|
doWriteTaskLocked();
|
||||||
|
} finally {
|
||||||
|
mUserHistoryDictionary.mBigramListLock.unlock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue