Skip to content
Snippets Groups Projects
Commit 555c4236 authored by Jean Chalard's avatar Jean Chalard
Browse files

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
parent 4ded1af2
No related branches found
No related tags found
No related merge requests found
......@@ -439,7 +439,6 @@ public final class BinaryDictionaryFileDumper {
final ContentProviderClient client, final String clientId) throws RemoteException {
final String metadataFileUri = MetadataFileUriGetter.getMetadataUri(context);
final String metadataAdditionalId = MetadataFileUriGetter.getMetadataAdditionalId(context);
if (TextUtils.isEmpty(metadataFileUri)) return;
// Tell the content provider to reset all information about this client id
final Uri metadataContentUri = getProviderUriBuilder(clientId)
.appendPath(QUERY_PATH_METADATA)
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment