Skip to content
Snippets Groups Projects
Commit 2b72aa07 authored by Keisuke Kuroyanagi's avatar Keisuke Kuroyanagi
Browse files

Disconnect app data search client after fetching all data.

Bug: 13138201
Change-Id: Ibaa3c2c22a4fe44ea23e92ce8576141bbad09b12
parent 584e9c9c
No related branches found
No related tags found
No related merge requests found
...@@ -232,6 +232,12 @@ public class DictionaryFacilitatorForSuggest { ...@@ -232,6 +232,12 @@ public class DictionaryFacilitatorForSuggest {
return null != mPersonalizationDictionary; return null != mPersonalizationDictionary;
} }
public void flushPersonalizationDictionary() {
if (hasPersonalizationDictionary()) {
mPersonalizationDictionary.flush();
}
}
public void waitForLoadingMainDictionary(final long timeout, final TimeUnit unit) public void waitForLoadingMainDictionary(final long timeout, final TimeUnit unit)
throws InterruptedException { throws InterruptedException {
mLatchForWaitingLoadingMainDictionary.await(timeout, unit); mLatchForWaitingLoadingMainDictionary.await(timeout, unit);
......
...@@ -68,6 +68,11 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB ...@@ -68,6 +68,11 @@ public abstract class DecayingExpandableBinaryDictionaryBase extends ExpandableB
dumpAllWordsForDebug(); dumpAllWordsForDebug();
} }
// Flush pending writes. // Flush pending writes.
flush();
// TODO: Quit depending on finalize() and really close the dictionary file.
}
public void flush() {
asyncFlushBinaryDictionary(); asyncFlushBinaryDictionary();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment