aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-04-01 02:01:48 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-04-01 02:01:48 -0700
commite40d5633659a401e1357e1c530238ed74cc158f6 (patch)
tree95bb790b3dd0e7cc9754d3f2512477487b84cd98 /java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java
parent151e4e182c86a2b7aea534bda777e9e9aafa549b (diff)
parent43341ba04298f9548e3ee6f37403eaf333dfa3bc (diff)
downloadlatinime-e40d5633659a401e1357e1c530238ed74cc158f6.tar.gz
latinime-e40d5633659a401e1357e1c530238ed74cc158f6.tar.xz
latinime-e40d5633659a401e1357e1c530238ed74cc158f6.zip
am 43341ba0: Merge "Ask the client to make itself known when it\'s not"
* commit '43341ba04298f9548e3ee6f37403eaf333dfa3bc': Ask the client to make itself known when it's not
Diffstat (limited to 'java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java')
-rw-r--r--java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java b/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java
index 4bec99c04..562e1d0b7 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java
@@ -450,4 +450,25 @@ public final class BinaryDictionaryFileDumper {
info.toContentValues());
}
}
+
+ /**
+ * Initialize a client record with the dictionary content provider.
+ *
+ * This merely acquires the content provider and calls
+ * #reinitializeClientRecordInDictionaryContentProvider.
+ *
+ * @param context the context for resources and providers.
+ * @param clientId the client ID to use.
+ */
+ public static void initializeClientRecordHelper(final Context context,
+ final String clientId) {
+ try {
+ final ContentProviderClient client = context.getContentResolver().
+ acquireContentProviderClient(getProviderUriBuilder("").build());
+ if (null == client) return;
+ reinitializeClientRecordInDictionaryContentProvider(context, client, clientId);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Cannot contact the dictionary content provider", e);
+ }
+ }
}