diff options
Diffstat (limited to 'java/com/android/contacts/common/model')
3 files changed, 7 insertions, 4 deletions
diff --git a/java/com/android/contacts/common/model/ContactLoader.java b/java/com/android/contacts/common/model/ContactLoader.java index 55464b161..d2c757709 100644 --- a/java/com/android/contacts/common/model/ContactLoader.java +++ b/java/com/android/contacts/common/model/ContactLoader.java @@ -44,10 +44,10 @@ import com.android.contacts.common.model.dataitem.PhoneDataItem; 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.common.LogUtil; import com.android.dialer.location.GeoUtil; import com.android.dialer.util.PermissionsUtil; +import com.android.dialer.util.UriUtils; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -522,6 +522,7 @@ public class ContactLoader extends AsyncTaskLoader<Contact> { cursorColumnToContentValues(cursor, cv, ContactQuery.TIMES_USED); cursorColumnToContentValues(cursor, cv, ContactQuery.LAST_TIME_USED); cursorColumnToContentValues(cursor, cv, ContactQuery.CARRIER_PRESENCE); + return cv; } @@ -730,6 +731,7 @@ public class ContactLoader extends AsyncTaskLoader<Contact> { intent.setClassName(servicePackageName, serviceName); intent.setAction(Intent.ACTION_VIEW); intent.setDataAndType(uri, RawContacts.CONTENT_ITEM_TYPE); + intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); try { context.startService(intent); } catch (Exception e) { diff --git a/java/com/android/contacts/common/model/account/AccountType.java b/java/com/android/contacts/common/model/account/AccountType.java index 1ae485a5f..ed0d421a9 100644 --- a/java/com/android/contacts/common/model/account/AccountType.java +++ b/java/com/android/contacts/common/model/account/AccountType.java @@ -25,6 +25,7 @@ import android.provider.ContactsContract.CommonDataKinds.StructuredPostal; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.RawContacts; import android.support.annotation.VisibleForTesting; +import android.support.v4.content.ContextCompat; import android.util.ArrayMap; import android.view.inputmethod.EditorInfo; import android.widget.EditText; @@ -113,7 +114,7 @@ public abstract class AccountType { final PackageManager pm = context.getPackageManager(); return pm.getDrawable(syncAdapterPackageName, iconRes, null); } else if (titleRes != -1) { - return context.getResources().getDrawable(iconRes); + return ContextCompat.getDrawable(context, iconRes); } else { return null; } diff --git a/java/com/android/contacts/common/model/account/BaseAccountType.java b/java/com/android/contacts/common/model/account/BaseAccountType.java index 8e9ba738c..ccdad3641 100644 --- a/java/com/android/contacts/common/model/account/BaseAccountType.java +++ b/java/com/android/contacts/common/model/account/BaseAccountType.java @@ -307,7 +307,7 @@ public abstract class BaseAccountType extends AccountType { DataKind kind = addKind( new DataKind(Phone.CONTENT_ITEM_TYPE, R.string.phoneLabelsGroup, Weight.PHONE, true)); - kind.iconAltRes = R.drawable.quantum_ic_message_white_24; + kind.iconAltRes = R.drawable.quantum_ic_message_vd_theme_24; kind.iconAltDescriptionRes = R.string.sms; kind.actionHeader = new PhoneActionInflater(); kind.actionAltHeader = new PhoneActionAltInflater(); @@ -1228,7 +1228,7 @@ public abstract class BaseAccountType extends AccountType { new PhoneActionInflater(), new SimpleInflater(Phone.NUMBER)); - kind.iconAltRes = R.drawable.quantum_ic_message_white_24; + kind.iconAltRes = R.drawable.quantum_ic_message_vd_theme_24; kind.iconAltDescriptionRes = R.string.sms; kind.actionAltHeader = new PhoneActionAltInflater(); |