Skip to content
Snippets Groups Projects
Commit 25848af5 authored by Jean Chalard's avatar Jean Chalard
Browse files

Tiny refactoring

Add a warning comment and make it so that openNative()
is only called in one place in the code.

Bug: 11281748
Change-Id: Ic7819a01deb62cf145ebf9d620da2d15fae19313
parent b6764c51
No related branches found
No related tags found
No related merge requests found
......@@ -376,7 +376,10 @@ public final class BinaryDictionary extends Dictionary {
private void reopen() {
close();
final File dictFile = new File(mDictFilePath);
mNativeDict = openNative(dictFile.getAbsolutePath(), 0 /* startOffset */,
// WARNING: Because we pass 0 as the offstet and file.length() as the length, this can
// only be called for actual files. Right now it's only called by the flush() family of
// functions, which require an updatable dictionary, so it's okay. But beware.
loadDictionary(dictFile.getAbsolutePath(), 0 /* startOffset */,
dictFile.length(), true /* isUpdatable */);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment