summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java
diff options
context:
space:
mode:
authorcalderwoodra <calderwoodra@google.com>2018-05-22 15:30:39 -0700
committerCopybara-Service <copybara-piper@google.com>2018-05-29 23:24:53 -0700
commitc5c42189eeab0389a94717de9a66c6d00068e8bf (patch)
treefbecd02f5176af6c8c2ac6bd620e117d341e62bf /java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java
parent4efd0ebf003e985e7cbe40d8ffd9f7ff227a9611 (diff)
Began implementation of Dialer dark theme.
- README on how to properly theme Dialer going forward. - Migrated all widgets to use global colors. - Removed all activity and application themes where it wasn't necessary. - Added themeing test rule for Espresso tests. Bug: 79883035 Test: tap PiperOrigin-RevId: 197634256 Change-Id: I4b7d94d45aeeb59d484b0069fdd1e200a654910b
Diffstat (limited to 'java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java')
-rw-r--r--java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java15
1 files changed, 4 insertions, 11 deletions
diff --git a/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java b/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java
index 230c02328..108a11bbe 100644
--- a/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java
+++ b/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java
@@ -51,6 +51,7 @@ import com.android.dialer.oem.MotorolaUtils;
import com.android.dialer.phonenumberutil.PhoneNumberHelper;
import com.android.dialer.spannable.ContentWithLearnMoreSpanner;
import com.android.dialer.storage.StorageComponent;
+import com.android.dialer.theme.base.ThemeUtil;
import com.android.dialer.util.DialerUtils;
import com.android.voicemail.VoicemailClient;
import com.android.voicemail.VoicemailComponent;
@@ -269,9 +270,7 @@ public class PhoneCallDetailsHelper
views.voicemailTranscriptionBrandingView.setTypeface(typeface);
views.callLocationAndDate.setTypeface(typeface);
views.callLocationAndDate.setTextColor(
- ContextCompat.getColor(
- context,
- details.isRead ? R.color.call_log_detail_color : R.color.call_log_unread_text_color));
+ details.isRead ? ThemeUtil.getTextColorSecondary() : ThemeUtil.getTextColorPrimary());
}
private void setNameView(PhoneCallDetailsViews views, PhoneCallDetails details) {
@@ -392,17 +391,11 @@ public class PhoneCallDetailsHelper
textView.setMovementMethod(LinkMovementMethod.getInstance());
Button positiveButton = dialog.getButton(DialogInterface.BUTTON_POSITIVE);
if (positiveButton != null) {
- positiveButton.setTextColor(
- context
- .getResources()
- .getColor(R.color.voicemail_donation_promo_positive_button_text_color));
+ positiveButton.setTextColor(ThemeUtil.getColorPrimary());
}
Button negativeButton = dialog.getButton(DialogInterface.BUTTON_NEGATIVE);
if (negativeButton != null) {
- negativeButton.setTextColor(
- context
- .getResources()
- .getColor(R.color.voicemail_donation_promo_negative_button_text_color));
+ negativeButton.setTextColor(ThemeUtil.getTextColorSecondary());
}
}