Don't notify dictpack for updates for service dump

Bug:19961803
Change-Id: I464e840bc5f75d164a519d84b0f09d8e64ed5061
main
Jatin Matani 2015-03-27 11:10:00 -07:00
parent 1b8cd52d7f
commit 2cc2d31418
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);
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 =