diff options
author | The Android Automerger <android-build@android.com> | 2010-01-26 15:16:04 -0800 |
---|---|---|
committer | The Android Automerger <android-build@android.com> | 2010-01-26 15:16:04 -0800 |
commit | 5a955cfe72b96a943774b43844c36551f0f5a242 (patch) | |
tree | 36189bca6eb63c2280def3217d2cffaa08be43a0 | |
parent | bb0135d1923734eee0d8078e4462310f81d0ddf9 (diff) | |
parent | 2cbf43b9b0429b4b09ed6f67abe56e20bcdf9f6a (diff) | |
download | Mms-eclair-release.tar.gz |
Merge branch 'eclair' into eclair-releaseandroid-2.1_r2.1sandroid-2.1_r2.1pandroid-2.1_r2eclair-sholes-release2eclair-release
-rw-r--r-- | src/com/android/mms/util/ContactInfoCache.java | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/com/android/mms/util/ContactInfoCache.java b/src/com/android/mms/util/ContactInfoCache.java index 72a21c67..fa7d495d 100644 --- a/src/com/android/mms/util/ContactInfoCache.java +++ b/src/com/android/mms/util/ContactInfoCache.java @@ -106,17 +106,9 @@ public class ContactInfoCache { private final Context mContext; - private String[] mContactInfoSelectionArgs = new String[1]; - // cached contact info private final HashMap<String, CacheEntry> mCache = new HashMap<String, CacheEntry>(); - // for background cache rebuilding - private Thread mCacheRebuilder = null; - private Object mCacheRebuildLock = new Object(); - private boolean mPhoneCacheInvalidated = false; - private boolean mEmailCacheInvalidated = false; - /** * CacheEntry stores the caller id or email lookup info. */ @@ -294,7 +286,8 @@ public class ContactInfoCache { //if (LOCAL_DEBUG) log("queryContactInfoByNumber: number=" + number); - mContactInfoSelectionArgs[0] = number; + String contactInfoSelectionArgs[] = new String[1]; + contactInfoSelectionArgs[0] = number; // We need to include the phone number in the selection string itself rather then // selection arguments, because SQLite needs to see the exact pattern of GLOB @@ -305,7 +298,7 @@ public class ContactInfoCache { PHONES_WITH_PRESENCE_URI, CALLER_ID_PROJECTION, selection, - mContactInfoSelectionArgs, + contactInfoSelectionArgs, null); if (cursor == null) { @@ -476,13 +469,14 @@ public class ContactInfoCache { private CacheEntry queryEmailDisplayName(String email) { CacheEntry entry = new CacheEntry(); - mContactInfoSelectionArgs[0] = email; + String contactInfoSelectionArgs[] = new String[1]; + contactInfoSelectionArgs[0] = email; Cursor cursor = SqliteWrapper.query(mContext, mContext.getContentResolver(), EMAIL_WITH_PRESENCE_URI, EMAIL_PROJECTION, EMAIL_SELECTION, - mContactInfoSelectionArgs, + contactInfoSelectionArgs, null); if (cursor != null) { |