From 76d5f512f99700a963aa20a02590833e37221bff Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Thu, 28 Mar 2013 18:59:19 +0900 Subject: Ask the client to make itself known when it's not Upon invoking the settings of the dictionary pack with an unknown client, we now launch an intent to ask the client to make itself known. This change also includes the code that receives this intent and acts upon it. Bug: 8492879 Change-Id: I2c6496dea845646961ecafcf64e282cb93ee91dc --- .../android/inputmethod/dictionarypack/UpdateHandler.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java') 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 -- cgit v1.2.3-83-g751a