diff options
author | 2013-12-04 12:47:05 +0900 | |
---|---|---|
committer | 2013-12-04 16:19:55 +0900 | |
commit | 5e80e699c4369d3f4604728952ac3d4bc0bae23a (patch) | |
tree | 8a65896229e2dadf709b4ba8d03024d263c7de39 /java/src/com/android/inputmethod/latin/ReadOnlyBinaryDictionary.java | |
parent | 294fe541c8689a1cb0783e16b83159a035464a5c (diff) | |
download | latinime-5e80e699c4369d3f4604728952ac3d4bc0bae23a.tar.gz latinime-5e80e699c4369d3f4604728952ac3d4bc0bae23a.tar.xz latinime-5e80e699c4369d3f4604728952ac3d4bc0bae23a.zip |
[RF1] Remove files that don't match the expected format, step 1
This implements the skeleton implementation, and enables a
fallback implementation in the case the file is coming from the
dictionary provider.
- A better scheme should be used for provider-supplied dicts.
- This does not implement the solution for device-generated
dicts yet. This will come in a future change.
- This does not implement the checking process on the native
side yet. This will come in a future change.
Bug: 11281748
Change-Id: Ifa6e237d19dfbffe503e3674915480ea867b0ddf
Diffstat (limited to 'java/src/com/android/inputmethod/latin/ReadOnlyBinaryDictionary.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/ReadOnlyBinaryDictionary.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/ReadOnlyBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ReadOnlyBinaryDictionary.java index 68505ce38..c8e4014bb 100644 --- a/java/src/com/android/inputmethod/latin/ReadOnlyBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/ReadOnlyBinaryDictionary.java @@ -44,6 +44,15 @@ public final class ReadOnlyBinaryDictionary extends Dictionary { locale, dictType, false /* isUpdatable */); } + public boolean hasValidContents() { + mLock.readLock().lock(); + try { + return mBinaryDictionary.hasValidContents(); + } finally { + mLock.readLock().unlock(); + } + } + public boolean isValidDictionary() { return mBinaryDictionary.isValidDictionary(); } |