aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-01-29 16:34:14 +0900
committerJean Chalard <jchalard@google.com>2013-01-31 09:26:52 +0900
commitaf4a7e8c4b2a41e9be48965133ab489cc9484764 (patch)
treefc79d019b4178ae67f02dfbb87478380da62023e /java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
parent3d0477fbd2b9b79fe3e8fdc9de2a8776fe76be78 (diff)
downloadlatinime-af4a7e8c4b2a41e9be48965133ab489cc9484764.tar.gz
latinime-af4a7e8c4b2a41e9be48965133ab489cc9484764.tar.xz
latinime-af4a7e8c4b2a41e9be48965133ab489cc9484764.zip
Create methods in LatinIME to make the current dict lists
Bug: 7005813 Change-Id: I82232af8e3071333b6fd01e4453b6b3c0a3ddb1f
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/FormatSpec.java')
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/FormatSpec.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
index c22ea3ba1..83acca874 100644
--- a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
+++ b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
@@ -256,12 +256,24 @@ public final class FormatSpec {
public final int mHeaderSize;
public final DictionaryOptions mDictionaryOptions;
public final FormatOptions mFormatOptions;
+ private static final String DICTIONARY_VERSION_ATTRIBUTE = "version";
+ private static final String DICTIONARY_LOCALE_ATTRIBUTE = "locale";
public FileHeader(final int headerSize, final DictionaryOptions dictionaryOptions,
final FormatOptions formatOptions) {
mHeaderSize = headerSize;
mDictionaryOptions = dictionaryOptions;
mFormatOptions = formatOptions;
}
+
+ // Helper method to get the locale as a String
+ public String getLocaleString() {
+ return mDictionaryOptions.mAttributes.get(FileHeader.DICTIONARY_LOCALE_ATTRIBUTE);
+ }
+
+ // Helper method to get the version String
+ public String getVersion() {
+ return mDictionaryOptions.mAttributes.get(FileHeader.DICTIONARY_VERSION_ATTRIBUTE);
+ }
}
private FormatSpec() {