summaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorDan Zivkovic <zivkovic@google.com>2015-05-06 09:30:47 -0700
committerDan Zivkovic <zivkovic@google.com>2015-05-06 09:30:47 -0700
commitbdc55e77f74c655cc2aeb97a5684c266cd75a85c (patch)
treea1dd35b26f5d5e3abc149e24ad1c4b255695a6bd /java/src
parent58bc0e057e3eb4d42e5693c9fb7c0c6bf8545c3a (diff)
downloadandroid_packages_inputmethods_LatinIME-bdc55e77f74c655cc2aeb97a5684c266cd75a85c.tar.gz
android_packages_inputmethods_LatinIME-bdc55e77f74c655cc2aeb97a5684c266cd75a85c.tar.bz2
android_packages_inputmethods_LatinIME-bdc55e77f74c655cc2aeb97a5684c266cd75a85c.zip
Metadata URI does not need additionalId.
Bug 20701628. Change-Id: Ifba1e7dd7f9934c8c13279dfb95bf02c0e30e650
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/dictionarypack/MetadataDbHelper.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/dictionarypack/MetadataDbHelper.java b/java/src/com/android/inputmethod/dictionarypack/MetadataDbHelper.java
index fbc899192..c6a7b9112 100644
--- a/java/src/com/android/inputmethod/dictionarypack/MetadataDbHelper.java
+++ b/java/src/com/android/inputmethod/dictionarypack/MetadataDbHelper.java
@@ -345,6 +345,8 @@ public class MetadataDbHelper extends SQLiteOpenHelper {
return null != getMetadataUriAsString(context, clientId);
}
+ private static final MetadataUriGetter sMetadataUriGetter = new MetadataUriGetter();
+
/**
* Returns the metadata URI as a string.
*
@@ -358,13 +360,12 @@ public class MetadataDbHelper extends SQLiteOpenHelper {
public static String getMetadataUriAsString(final Context context, final String clientId) {
SQLiteDatabase defaultDb = MetadataDbHelper.getDb(context, null);
final Cursor cursor = defaultDb.query(MetadataDbHelper.CLIENT_TABLE_NAME,
- new String[] { MetadataDbHelper.CLIENT_METADATA_URI_COLUMN,
- MetadataDbHelper.CLIENT_METADATA_ADDITIONAL_ID_COLUMN },
+ new String[] { MetadataDbHelper.CLIENT_METADATA_URI_COLUMN },
MetadataDbHelper.CLIENT_CLIENT_ID_COLUMN + " = ?", new String[] { clientId },
null, null, null, null);
try {
if (!cursor.moveToFirst()) return null;
- return MetadataUriGetter.getUri(context, cursor.getString(0), cursor.getString(1));
+ return sMetadataUriGetter.getUri(context, cursor.getString(0));
} finally {
cursor.close();
}