Skip to content
Snippets Groups Projects
Commit 6484a4f8 authored by Satoshi Kataoka's avatar Satoshi Kataoka
Browse files

Consolidate onDictionaryClosed

Bug: 9429906
Change-Id: I51eef4c321cc268eac1c8dfd6561ab6e716a1fb0
parent 8135b653
No related branches found
No related tags found
No related merge requests found
...@@ -31,5 +31,4 @@ public class PersonalizationDictionarySessionRegister { ...@@ -31,5 +31,4 @@ public class PersonalizationDictionarySessionRegister {
public static void onRemoveData(Context context, String type) { public static void onRemoveData(Context context, String type) {
} }
} }
...@@ -16,6 +16,8 @@ ...@@ -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 { ...@@ -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 { ...@@ -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,
......
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