diff options
author | 2013-03-19 08:12:50 +0000 | |
---|---|---|
committer | 2013-03-19 08:12:50 +0000 | |
commit | 8e005f2989de98cd284f1f5210f4c9d8d658e5e7 (patch) | |
tree | fd393df41d5d7064c17a2623c19deae29740fb4e /java/src/com/android/inputmethod/latin | |
parent | 6d90a10a343723b8613fd22d323c586ecc33b284 (diff) | |
parent | 1061bfdb34bbcb63bf0046eec42313d264ac33fa (diff) | |
download | latinime-8e005f2989de98cd284f1f5210f4c9d8d658e5e7.tar.gz latinime-8e005f2989de98cd284f1f5210f4c9d8d658e5e7.tar.xz latinime-8e005f2989de98cd284f1f5210f4c9d8d658e5e7.zip |
am 1061bfdb: Break dependencies to allow offdevice tests to build
* commit '1061bfdb34bbcb63bf0046eec42313d264ac33fa':
Break dependencies to allow offdevice tests to build
Diffstat (limited to 'java/src/com/android/inputmethod/latin')
4 files changed, 7 insertions, 14 deletions
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java index 7383862b1..18e712212 100644 --- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java @@ -19,7 +19,6 @@ package com.android.inputmethod.latin; import android.text.TextUtils; import android.util.SparseArray; -import com.android.inputmethod.dictionarypack.DictionaryProvider; import com.android.inputmethod.keyboard.ProximityInfo; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; @@ -32,7 +31,6 @@ import java.util.Locale; */ public final class BinaryDictionary extends Dictionary { private static final String TAG = BinaryDictionary.class.getSimpleName(); - public static final String DICTIONARY_PACK_AUTHORITY = DictionaryProvider.AUTHORITY; // Must be equal to MAX_WORD_LENGTH in native/jni/src/defines.h private static final int MAX_WORD_LENGTH = Constants.Dictionary.MAX_WORD_LENGTH; diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java b/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java index 0d0ce5756..4bec99c04 100644 --- a/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java +++ b/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java @@ -27,6 +27,7 @@ import android.os.RemoteException; import android.text.TextUtils; import android.util.Log; +import com.android.inputmethod.dictionarypack.DictionaryPackConstants; import com.android.inputmethod.latin.DictionaryInfoUtils.DictionaryInfo; import java.io.BufferedInputStream; @@ -93,8 +94,7 @@ public final class BinaryDictionaryFileDumper { */ private static Uri.Builder getProviderUriBuilder(final String path) { return new Uri.Builder().scheme(ContentResolver.SCHEME_CONTENT) - .authority(BinaryDictionary.DICTIONARY_PACK_AUTHORITY).appendPath( - path); + .authority(DictionaryPackConstants.AUTHORITY).appendPath(path); } /** diff --git a/java/src/com/android/inputmethod/latin/DictionaryPackInstallBroadcastReceiver.java b/java/src/com/android/inputmethod/latin/DictionaryPackInstallBroadcastReceiver.java index d6c88910f..35f3119ea 100644 --- a/java/src/com/android/inputmethod/latin/DictionaryPackInstallBroadcastReceiver.java +++ b/java/src/com/android/inputmethod/latin/DictionaryPackInstallBroadcastReceiver.java @@ -16,7 +16,7 @@ package com.android.inputmethod.latin; -import com.android.inputmethod.dictionarypack.UpdateHandler; +import com.android.inputmethod.dictionarypack.DictionaryPackConstants; import android.content.BroadcastReceiver; import android.content.Context; @@ -32,11 +32,6 @@ import android.net.Uri; public final class DictionaryPackInstallBroadcastReceiver extends BroadcastReceiver { final LatinIME mService; - /** - * The action of the intent for publishing that new dictionary data is available. - */ - /* package */ static final String NEW_DICTIONARY_INTENT_ACTION = - UpdateHandler.NEW_DICTIONARY_INTENT_ACTION; public DictionaryPackInstallBroadcastReceiver(final LatinIME service) { mService = service; @@ -66,7 +61,7 @@ public final class DictionaryPackInstallBroadcastReceiver extends BroadcastRecei // Search for some dictionary pack in the just-installed package. If found, reread. for (ProviderInfo info : providers) { - if (BinaryDictionary.DICTIONARY_PACK_AUTHORITY.equals(info.authority)) { + if (DictionaryPackConstants.AUTHORITY.equals(info.authority)) { mService.resetSuggestMainDict(); return; } @@ -86,7 +81,7 @@ public final class DictionaryPackInstallBroadcastReceiver extends BroadcastRecei // TODO: Only reload dictionary on REMOVED when the removed package is the one we // read dictionary from? mService.resetSuggestMainDict(); - } else if (action.equals(NEW_DICTIONARY_INTENT_ACTION)) { + } else if (action.equals(DictionaryPackConstants.NEW_DICTIONARY_INTENT_ACTION)) { mService.resetSuggestMainDict(); } } diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 8d4dd3c32..e3650d9cc 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -64,6 +64,7 @@ import com.android.inputmethod.accessibility.AccessibleKeyboardViewProxy; import com.android.inputmethod.annotations.UsedForTesting; import com.android.inputmethod.compat.InputMethodServiceCompatUtils; import com.android.inputmethod.compat.SuggestionSpanUtils; +import com.android.inputmethod.dictionarypack.DictionaryPackConstants; import com.android.inputmethod.event.EventInterpreter; import com.android.inputmethod.keyboard.KeyDetector; import com.android.inputmethod.keyboard.Keyboard; @@ -450,8 +451,7 @@ public final class LatinIME extends InputMethodService implements KeyboardAction registerReceiver(mDictionaryPackInstallReceiver, packageFilter); final IntentFilter newDictFilter = new IntentFilter(); - newDictFilter.addAction( - DictionaryPackInstallBroadcastReceiver.NEW_DICTIONARY_INTENT_ACTION); + newDictFilter.addAction(DictionaryPackConstants.NEW_DICTIONARY_INTENT_ACTION); registerReceiver(mDictionaryPackInstallReceiver, newDictFilter); } } |