aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-02-22 20:49:48 -0800
committerJean Chalard <jchalard@google.com>2013-02-22 20:49:48 -0800
commit2521edec09373b2810093462c89221a2aca9e369 (patch)
tree4aa902e278342f98e455a11ff25f18f1660beb6f /java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
parent8f794c72db07786c866e357c7853c339882b45ef (diff)
downloadlatinime-2521edec09373b2810093462c89221a2aca9e369.tar.gz
latinime-2521edec09373b2810093462c89221a2aca9e369.tar.xz
latinime-2521edec09373b2810093462c89221a2aca9e369.zip
Fix a bug with the passed dictionary id
We used to make the dictionary that we passed to the dictionary pack as an initial value based on the locale. This is wrong - it should be read from the dictionary. This change fixes that. Bug: 7005813 Change-Id: Ib08ed31dd9c216f6f7b9c6c3174ca514bf96e06f
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/FormatSpec.java')
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/FormatSpec.java6
1 files changed, 6 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 83acca874..60ba66e27 100644
--- a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
+++ b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
@@ -258,6 +258,7 @@ public final class FormatSpec {
public final FormatOptions mFormatOptions;
private static final String DICTIONARY_VERSION_ATTRIBUTE = "version";
private static final String DICTIONARY_LOCALE_ATTRIBUTE = "locale";
+ private static final String DICTIONARY_ID_ATTRIBUTE = "dictionary";
public FileHeader(final int headerSize, final DictionaryOptions dictionaryOptions,
final FormatOptions formatOptions) {
mHeaderSize = headerSize;
@@ -274,6 +275,11 @@ public final class FormatSpec {
public String getVersion() {
return mDictionaryOptions.mAttributes.get(FileHeader.DICTIONARY_VERSION_ATTRIBUTE);
}
+
+ // Helper method to get the dictionary ID as a String
+ public String getId() {
+ return mDictionaryOptions.mAttributes.get(FileHeader.DICTIONARY_ID_ATTRIBUTE);
+ }
}
private FormatSpec() {