diff options
Diffstat (limited to 'src/com/android/mms/util/ContactInfoCache.java')
-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) { |