Don't notify dictpack for updates for service dump
Bug:19961803 Change-Id: I464e840bc5f75d164a519d84b0f09d8e64ed5061main
parent
1b8cd52d7f
commit
2cc2d31418
|
@ -273,12 +273,14 @@ final public class BinaryDictionaryGetter {
|
||||||
* @return The list of addresses of valid dictionary files, or null.
|
* @return The list of addresses of valid dictionary files, or null.
|
||||||
*/
|
*/
|
||||||
public static ArrayList<AssetFileAddress> getDictionaryFiles(final Locale locale,
|
public static ArrayList<AssetFileAddress> getDictionaryFiles(final Locale locale,
|
||||||
final Context context) {
|
final Context context, boolean notifyDictionaryPackForUpdates) {
|
||||||
|
|
||||||
final boolean hasDefaultWordList = DictionaryInfoUtils.isDictionaryAvailable(
|
final boolean hasDefaultWordList = DictionaryInfoUtils.isDictionaryAvailable(
|
||||||
context, locale);
|
context, locale);
|
||||||
BinaryDictionaryFileDumper.cacheWordListsFromContentProvider(locale, context,
|
if (notifyDictionaryPackForUpdates) {
|
||||||
hasDefaultWordList);
|
BinaryDictionaryFileDumper.cacheWordListsFromContentProvider(locale, context,
|
||||||
|
hasDefaultWordList);
|
||||||
|
}
|
||||||
final File[] cachedWordLists = getCachedWordLists(locale.toString(), context);
|
final File[] cachedWordLists = getCachedWordLists(locale.toString(), context);
|
||||||
final String mainDictId = DictionaryInfoUtils.getMainDictId(locale);
|
final String mainDictId = DictionaryInfoUtils.getMainDictId(locale);
|
||||||
final DictPackSettings dictPackSettings = new DictPackSettings(context);
|
final DictPackSettings dictPackSettings = new DictPackSettings(context);
|
||||||
|
|
|
@ -53,7 +53,7 @@ public final class DictionaryFactory {
|
||||||
|
|
||||||
final LinkedList<Dictionary> dictList = new LinkedList<>();
|
final LinkedList<Dictionary> dictList = new LinkedList<>();
|
||||||
final ArrayList<AssetFileAddress> assetFileList =
|
final ArrayList<AssetFileAddress> assetFileList =
|
||||||
BinaryDictionaryGetter.getDictionaryFiles(locale, context);
|
BinaryDictionaryGetter.getDictionaryFiles(locale, context, true);
|
||||||
if (null != assetFileList) {
|
if (null != assetFileList) {
|
||||||
for (final AssetFileAddress f : assetFileList) {
|
for (final AssetFileAddress f : assetFileList) {
|
||||||
final ReadOnlyBinaryDictionary readOnlyBinaryDictionary =
|
final ReadOnlyBinaryDictionary readOnlyBinaryDictionary =
|
||||||
|
|
Loading…
Reference in New Issue