Merge "Fix: release lock in UserHistoryDictionary."
This commit is contained in:
commit
49910a9d77
1 changed files with 5 additions and 1 deletions
|
@ -320,7 +320,11 @@ public final class UserHistoryDictionary extends ExpandableDictionary {
|
|||
mUserHistoryDictionary.mBigramListLock.unlock();
|
||||
}
|
||||
} else if (mUserHistoryDictionary.mBigramListLock.tryLock()) {
|
||||
doWriteTaskLocked();
|
||||
try {
|
||||
doWriteTaskLocked();
|
||||
} finally {
|
||||
mUserHistoryDictionary.mBigramListLock.unlock();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue