Consolidate onDictionaryClosed

Bug: 9429906
Change-Id: I51eef4c321cc268eac1c8dfd6561ab6e716a1fb0
main
Satoshi Kataoka 2013-08-19 17:43:00 +09:00
parent 8135b653aa
commit 6484a4f886
2 changed files with 5 additions and 4 deletions

View File

@ -31,5 +31,4 @@ public class PersonalizationDictionarySessionRegister {
public static void onRemoveData(Context context, String type) { public static void onRemoveData(Context context, String type) {
} }
} }

View File

@ -16,6 +16,8 @@
package com.android.inputmethod.latin.personalization; package com.android.inputmethod.latin.personalization;
import android.content.Context;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.util.ArrayList; import java.util.ArrayList;
@ -48,7 +50,7 @@ public abstract class PersonalizationDictionaryUpdateSession {
public abstract void onDictionaryReady(); public abstract void onDictionaryReady();
public abstract void onDictionaryClosed(); public abstract void onDictionaryClosed(Context context);
public void setPredictionDictionary(String locale, DynamicPredictionDictionaryBase dictionary) { public void setPredictionDictionary(String locale, DynamicPredictionDictionaryBase dictionary) {
mPredictionDictionary = new WeakReference<DynamicPredictionDictionaryBase>(dictionary); mPredictionDictionary = new WeakReference<DynamicPredictionDictionaryBase>(dictionary);
@ -68,9 +70,9 @@ public abstract class PersonalizationDictionaryUpdateSession {
} }
public void closeSession() { public void closeSession(Context context) {
unsetPredictionDictionary(); unsetPredictionDictionary();
onDictionaryClosed(); onDictionaryClosed(context);
} }
public void addBigramToPersonalizationDictionary(String word0, String word1, boolean isValid, public void addBigramToPersonalizationDictionary(String word0, String word1, boolean isValid,