Merge "Don't notify dictpack for updates for service dump"

main
Jatin Matani 2015-03-27 19:54:32 +00:00 committed by Android (Google) Code Review
commit 8de99ce3d8
2 changed files with 6 additions and 4 deletions

View File

@ -273,12 +273,14 @@ final public class BinaryDictionaryGetter {
* @return The list of addresses of valid dictionary files, or null.
*/
public static ArrayList<AssetFileAddress> getDictionaryFiles(final Locale locale,
final Context context) {
final Context context, boolean notifyDictionaryPackForUpdates) {
final boolean hasDefaultWordList = DictionaryInfoUtils.isDictionaryAvailable(
context, locale);
BinaryDictionaryFileDumper.cacheWordListsFromContentProvider(locale, context,
hasDefaultWordList);
if (notifyDictionaryPackForUpdates) {
BinaryDictionaryFileDumper.cacheWordListsFromContentProvider(locale, context,
hasDefaultWordList);
}
final File[] cachedWordLists = getCachedWordLists(locale.toString(), context);
final String mainDictId = DictionaryInfoUtils.getMainDictId(locale);
final DictPackSettings dictPackSettings = new DictPackSettings(context);

View File

@ -53,7 +53,7 @@ public final class DictionaryFactory {
final LinkedList<Dictionary> dictList = new LinkedList<>();
final ArrayList<AssetFileAddress> assetFileList =
BinaryDictionaryGetter.getDictionaryFiles(locale, context);
BinaryDictionaryGetter.getDictionaryFiles(locale, context, true);
if (null != assetFileList) {
for (final AssetFileAddress f : assetFileList) {
final ReadOnlyBinaryDictionary readOnlyBinaryDictionary =