summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Maxwell <maxwelb@google.com>2015-11-23 18:08:21 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-11-23 18:08:21 +0000
commitbe998efeacd573abb2d33da7af9172094122a025 (patch)
tree7094b9fc5ebdfab623b01793dc0dded692f4bcc5
parent6c0a9d51c709784a401eac269c03839b6a236f00 (diff)
parentd4a030993c4485a821313ed1ecdd6dfd7bdba6f6 (diff)
Merge "Making calls to Resources.getColor backwards compat" into ub-contactsdialer-b-dev
-rw-r--r--src/com/android/dialer/calllog/PhoneCallDetailsHelper.java6
-rw-r--r--src/com/android/dialer/filterednumber/BlockedNumbersFragment.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/dialer/calllog/PhoneCallDetailsHelper.java b/src/com/android/dialer/calllog/PhoneCallDetailsHelper.java
index 96dbf8219..4d201b07b 100644
--- a/src/com/android/dialer/calllog/PhoneCallDetailsHelper.java
+++ b/src/com/android/dialer/calllog/PhoneCallDetailsHelper.java
@@ -24,6 +24,7 @@ import android.content.res.Resources;
import android.graphics.Typeface;
import android.provider.CallLog.Calls;
import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.support.v4.content.ContextCompat;
import android.telecom.PhoneAccount;
import android.text.TextUtils;
import android.text.format.DateUtils;
@@ -152,9 +153,8 @@ public class PhoneCallDetailsHelper {
views.nameView.setTypeface(typeface);
views.voicemailTranscriptionView.setTypeface(typeface);
views.callLocationAndDate.setTypeface(typeface);
- views.callLocationAndDate.setTextColor(mResources.getColor(
- details.isRead ? R.color.call_log_detail_color : R.color.call_log_unread_text_color,
- mContext.getTheme()));
+ views.callLocationAndDate.setTextColor(ContextCompat.getColor(mContext, details.isRead ?
+ R.color.call_log_detail_color : R.color.call_log_unread_text_color));
}
/**
diff --git a/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java b/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java
index 6b3f18a79..073aac2fb 100644
--- a/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java
+++ b/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java
@@ -63,8 +63,8 @@ public class BlockedNumbersFragment extends ListFragment
ImageView addNumberIcon = (ImageView) getActivity().findViewById(R.id.add_number_icon);
LetterTileDrawable drawable = new LetterTileDrawable(getResources());
drawable.setLetter(ADD_BLOCKED_NUMBER_ICON_LETTER);
- drawable.setColor(getResources().getColor(R.color.add_blocked_number_icon_color,
- getActivity().getTheme()));
+ drawable.setColor(ActivityCompat.getColor(getActivity(),
+ R.color.add_blocked_number_icon_color));
drawable.setIsCircular(true);
addNumberIcon.setImageDrawable(drawable);