am 8de99ce3: Merge "Don\'t notify dictpack for updates for service dump"

* commit '8de99ce3d8960684c28f2f8810b6dbefeb8853f3':
  Don't notify dictpack for updates for service dump
main
Jatin Matani 2015-03-27 21:08:21 +00:00 committed by Android Git Automerger
commit c509c3e90b
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 =