am a5e28acf: Merge "Fix a bug where AOSP Latin IME would not fill dictionaries"

* commit 'a5e28acf634988f7589e4b1f07962863f15a991a':
  Fix a bug where AOSP Latin IME would not fill dictionaries
main
Jean Chalard 2013-06-28 07:05:33 -07:00 committed by Android Git Automerger
commit 8873ac60f9
2 changed files with 2 additions and 8 deletions

View File

@ -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)

View File

@ -291,13 +291,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);