From 555c4236db885532e51d8a26d715608b2b738c1b Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Fri, 28 Jun 2013 12:48:41 +0900 Subject: Fix a bug where AOSP Latin IME would not fill dictionaries There is no reason not to contact the dictionary provider when we don't have internet permission or when the URL is empty. It knows how to handle both these cases. Bug: 9388602 Change-Id: I30c4540551ad2f5e527d3acd1842bbd749feca89 --- .../com/android/inputmethod/latin/BinaryDictionaryGetter.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java') diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java b/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java index d0af59db0..f9a36b890 100644 --- a/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java +++ b/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java @@ -293,13 +293,8 @@ final public class BinaryDictionaryGetter { final Context context) { final boolean hasDefaultWordList = DictionaryFactory.isDictionaryAvailable(context, locale); - // We need internet access to do the following. Only do this if the package actually - // has the permission. - if (context.checkCallingOrSelfPermission(android.Manifest.permission.INTERNET) - == PackageManager.PERMISSION_GRANTED) { - BinaryDictionaryFileDumper.cacheWordListsFromContentProvider(locale, context, - hasDefaultWordList); - } + BinaryDictionaryFileDumper.cacheWordListsFromContentProvider(locale, context, + hasDefaultWordList); final File[] cachedWordLists = getCachedWordLists(locale.toString(), context); final String mainDictId = DictionaryInfoUtils.getMainDictId(locale); final DictPackSettings dictPackSettings = new DictPackSettings(context); -- cgit v1.2.3-83-g751a