From c6799ffeab17d3e0dc54a1718dad9890e5493ae0 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Sat, 23 Feb 2013 01:35:21 -0800 Subject: Send the dictionaries descriptions to the dict pack Bug: 8255795 Change-Id: I12a5922f50c2d2e3aa639457abcc1483e6a48721 --- java/src/com/android/inputmethod/latin/makedict/FormatSpec.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'java/src/com/android/inputmethod/latin/makedict/FormatSpec.java') diff --git a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java index 60ba66e27..e1e5e5500 100644 --- a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java +++ b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java @@ -259,6 +259,7 @@ public final class FormatSpec { private static final String DICTIONARY_VERSION_ATTRIBUTE = "version"; private static final String DICTIONARY_LOCALE_ATTRIBUTE = "locale"; private static final String DICTIONARY_ID_ATTRIBUTE = "dictionary"; + private static final String DICTIONARY_DESCRIPTION_ATTRIBUTE = "description"; public FileHeader(final int headerSize, final DictionaryOptions dictionaryOptions, final FormatOptions formatOptions) { mHeaderSize = headerSize; @@ -280,6 +281,13 @@ public final class FormatSpec { public String getId() { return mDictionaryOptions.mAttributes.get(FileHeader.DICTIONARY_ID_ATTRIBUTE); } + + // Helper method to get the description + public String getDescription() { + // TODO: Right now each dictionary file comes with a description in its own language. + // It will display as is no matter the device's locale. It should be internationalized. + return mDictionaryOptions.mAttributes.get(FileHeader.DICTIONARY_DESCRIPTION_ATTRIBUTE); + } } private FormatSpec() { -- cgit v1.2.3-83-g751a