diff options
author | Eric Erfanian <erfanian@google.com> | 2017-05-05 15:29:54 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-05 15:29:54 +0000 |
commit | 43b3152d075138b11e1fe297682b3bbc775e5641 (patch) | |
tree | 3a325b0effac02fbd228b8ddf2f96589e5df72cd /java/com/android/contacts/common/model/ContactLoader.java | |
parent | 2034759538273aed8a0b412d8fb90994eba1f7ea (diff) | |
parent | 300a8683b9c28424fb0f0c571a0abe128c461f69 (diff) |
Update Dialer to V10 RC16 am: 10b34a5ebf
am: 300a8683b9
Change-Id: If5695bad59f8a4dab6e6c90b54943b900bd2652a
Diffstat (limited to 'java/com/android/contacts/common/model/ContactLoader.java')
-rw-r--r-- | java/com/android/contacts/common/model/ContactLoader.java | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/java/com/android/contacts/common/model/ContactLoader.java b/java/com/android/contacts/common/model/ContactLoader.java index eb16bffcd..8e9ef9429 100644 --- a/java/com/android/contacts/common/model/ContactLoader.java +++ b/java/com/android/contacts/common/model/ContactLoader.java @@ -36,8 +36,6 @@ import android.provider.ContactsContract.Directory; import android.provider.ContactsContract.Groups; import android.provider.ContactsContract.RawContacts; import android.text.TextUtils; -import android.util.Log; -import com.android.contacts.common.GeoUtil; import com.android.contacts.common.GroupMetaData; import com.android.contacts.common.model.account.AccountType; import com.android.contacts.common.model.account.AccountTypeWithDataSet; @@ -47,7 +45,8 @@ import com.android.contacts.common.model.dataitem.PhotoDataItem; import com.android.contacts.common.util.Constants; import com.android.contacts.common.util.ContactLoaderUtils; import com.android.contacts.common.util.UriUtils; -import com.android.dialer.compat.CompatUtils; +import com.android.dialer.common.LogUtil; +import com.android.dialer.location.GeoUtil; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -218,7 +217,7 @@ public class ContactLoader extends AsyncTaskLoader<Contact> { @Override public Contact loadInBackground() { - Log.e(TAG, "loadInBackground=" + mLookupUri); + LogUtil.e(TAG, "loadInBackground=" + mLookupUri); try { final ContentResolver resolver = getContext().getContentResolver(); final Uri uriCurrentFormat = ContactLoaderUtils.ensureIsContactUri(resolver, mLookupUri); @@ -264,7 +263,7 @@ public class ContactLoader extends AsyncTaskLoader<Contact> { } return result; } catch (Exception e) { - Log.e(TAG, "Error loading the contact: " + mLookupUri, e); + LogUtil.e(TAG, "Error loading the contact: " + mLookupUri, e); return Contact.forError(mRequestedUri, e); } } @@ -274,7 +273,7 @@ public class ContactLoader extends AsyncTaskLoader<Contact> { Cursor cursor = resolver.query(entityUri, ContactQuery.COLUMNS, null, null, Contacts.Entity.RAW_CONTACT_ID); if (cursor == null) { - Log.e(TAG, "No cursor returned in loadContactEntity"); + LogUtil.e(TAG, "No cursor returned in loadContactEntity"); return Contact.forNotFound(mRequestedUri); } @@ -521,10 +520,7 @@ public class ContactLoader extends AsyncTaskLoader<Contact> { cursorColumnToContentValues(cursor, cv, ContactQuery.CHAT_CAPABILITY); cursorColumnToContentValues(cursor, cv, ContactQuery.TIMES_USED); cursorColumnToContentValues(cursor, cv, ContactQuery.LAST_TIME_USED); - if (CompatUtils.isMarshmallowCompatible()) { - cursorColumnToContentValues(cursor, cv, ContactQuery.CARRIER_PRESENCE); - } - + cursorColumnToContentValues(cursor, cv, ContactQuery.CARRIER_PRESENCE); return cv; } @@ -577,7 +573,7 @@ public class ContactLoader extends AsyncTaskLoader<Contact> { Resources resources = pm.getResourcesForApplication(packageName); directoryType = resources.getString(typeResourceId); } catch (NameNotFoundException e) { - Log.w( + LogUtil.w( TAG, "Contact directory resource not found: " + packageName + "." + typeResourceId); } } @@ -692,7 +688,7 @@ public class ContactLoader extends AsyncTaskLoader<Contact> { mLookupUri = result.getLookupUri(); if (!result.isDirectoryEntry()) { - Log.i(TAG, "Registering content observer for " + mLookupUri); + LogUtil.i(TAG, "Registering content observer for " + mLookupUri); if (mObserver == null) { mObserver = new ForceLoadContentObserver(); } @@ -732,7 +728,7 @@ public class ContactLoader extends AsyncTaskLoader<Contact> { try { context.startService(intent); } catch (Exception e) { - Log.e(TAG, "Error sending message to source-app", e); + LogUtil.e(TAG, "Error sending message to source-app", e); } } } @@ -919,9 +915,7 @@ public class ContactLoader extends AsyncTaskLoader<Contact> { static { List<String> projectionList = Lists.newArrayList(COLUMNS_INTERNAL); - if (CompatUtils.isMarshmallowCompatible()) { - projectionList.add(Data.CARRIER_PRESENCE); - } + projectionList.add(Data.CARRIER_PRESENCE); COLUMNS = projectionList.toArray(new String[projectionList.size()]); } } |