summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorMakoto Onuki <omakoto@google.com>2014-08-11 10:27:39 -0700
committerMakoto Onuki <omakoto@google.com>2014-08-11 10:29:57 -0700
commit11d1e5f60f518e805c5f358f5376b87c08ef69d9 (patch)
tree8374eace979466b494b964fbd6b72b0ddf8266eb /src/com
parent9c9432da4380689419c9b18fb8955eeaec8ca86d (diff)
downloadpackages_providers_ContactsProvider-11d1e5f60f518e805c5f358f5376b87c08ef69d9.zip
packages_providers_ContactsProvider-11d1e5f60f518e805c5f358f5376b87c08ef69d9.tar.gz
packages_providers_ContactsProvider-11d1e5f60f518e805c5f358f5376b87c08ef69d9.tar.bz2
Fix getMimeTypeId/getPackageId
In the old code we only put ids to the cache in the insert case, but the select case. This means once the process restarts it'd never put anything in the cache. Also added the test for the conflict case. Bug 16574964 Change-Id: I9979b61b6e1a3f04a81bcf2b78a678378f1a009c
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/providers/contacts/ContactsDatabaseHelper.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/com/android/providers/contacts/ContactsDatabaseHelper.java b/src/com/android/providers/contacts/ContactsDatabaseHelper.java
index a0f22f8..c8990ea 100644
--- a/src/com/android/providers/contacts/ContactsDatabaseHelper.java
+++ b/src/com/android/providers/contacts/ContactsDatabaseHelper.java
@@ -4510,6 +4510,7 @@ public class ContactsDatabaseHelper extends SQLiteOpenHelper {
// Then, try the database.
long id = queryIdWithOneArg(db, querySql, value);
if (id >= 0) {
+ cache.put(value, id);
return id;
}