aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-04-03 19:27:20 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-04-03 19:27:20 -0700
commit873c20ba06f8d1067be8cde3b698e0ece9cfd98f (patch)
tree235d779441e83b53e93ddcb8d35ab1f1cb862697 /java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java
parent3b9d7fd1792da09c1d436eceb49ee4ea6bc47f07 (diff)
parente40d5633659a401e1357e1c530238ed74cc158f6 (diff)
downloadlatinime-873c20ba06f8d1067be8cde3b698e0ece9cfd98f.tar.gz
latinime-873c20ba06f8d1067be8cde3b698e0ece9cfd98f.tar.xz
latinime-873c20ba06f8d1067be8cde3b698e0ece9cfd98f.zip
am e40d5633: am 43341ba0: Merge "Ask the client to make itself known when it\'s not"
* commit 'e40d5633659a401e1357e1c530238ed74cc158f6': Ask the client to make itself known when it's not
Diffstat (limited to 'java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java')
-rw-r--r--java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java b/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java
index b4727509c..e05a79b7b 100644
--- a/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java
+++ b/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java
@@ -444,7 +444,19 @@ public final class UpdateHandler {
manager.remove(fileId);
}
- private static void publishUpdateMetadataCompleted(final Context context,
+ /**
+ * Sends a broadcast informing listeners that the dictionaries were updated.
+ *
+ * This will call all local listeners through the UpdateEventListener#downloadedMetadata
+ * callback (for example, the dictionary provider interface uses this to stop the Loading
+ * animation) and send a broadcast about the metadata having been updated. For a client of
+ * the dictionary pack like Latin IME, this means it should re-query the dictionary pack
+ * for any relevant new data.
+ *
+ * @param context the context, to send the broadcast.
+ * @param downloadSuccessful whether the download of the metadata was successful or not.
+ */
+ public static void publishUpdateMetadataCompleted(final Context context,
final boolean downloadSuccessful) {
// We need to warn all listeners of what happened. But some listeners may want to
// remove themselves or re-register something in response. Hence we should take a