Allow color customization for call number and timestamp on callog page

Bug: 142439196
Test: Manually
Change-Id: Ia318dbe3cd0e3e2e5e10fa204fc7b491d03fce6c
diff --git a/res/layout/call_history_list_item.xml b/res/layout/call_history_list_item.xml
index e2fd81e..feb9b2e 100644
--- a/res/layout/call_history_list_item.xml
+++ b/res/layout/call_history_list_item.xml
@@ -77,7 +77,6 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginStart="@dimen/call_history_icons_margin"
-        android:textAppearance="?android:attr/textAppearanceSmall"
         android:singleLine="true"
         app:layout_constraintTop_toBottomOf="@id/title"
         app:layout_constraintStart_toEndOf="@id/call_type_icons"
@@ -89,7 +88,6 @@
         android:layout_height="wrap_content"
         android:layout_marginStart="@dimen/call_history_icons_margin"
         android:layout_marginEnd="@dimen/call_history_text_margin_end"
-        android:textAppearance="?android:attr/textAppearanceSmall"
         android:singleLine="true"
         app:layout_constraintTop_toBottomOf="@id/title"
         app:layout_constraintBottom_toBottomOf="parent"
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 9a3a945..ac49ed1 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -118,6 +118,12 @@
     <style name="TextAppearance.CallLogTitleDefault" parent="@style/TextAppearance.Body1"/>
     <!-- Customized text color for missed calls can be added here -->
     <style name="TextAppearance.CallLogTitleMissedCall" parent="@style/TextAppearance.Body1"/>
+    <style name="TextAppearance.CallLogCallCountDefault" parent="@style/TextAppearance.Body3"/>
+    <!-- Customized text color for missed calls can be added here -->
+    <style name="TextAppearance.CallLogCallCountMissedCall" parent="@style/TextAppearance.Body3"/>
+    <style name="TextAppearance.CallLogTimestampDefault" parent="@style/TextAppearance.Body3"/>
+    <!-- Customized text color for missed calls can be added here -->
+    <style name="TextAppearance.CallLogTimestampMissedCall" parent="@style/TextAppearance.Body3"/>
 
     <!-- Contact details -->
     <style name="TextAppearance.ContactDetailsTitle" parent="@style/TextAppearance.Display2"/>
diff --git a/src/com/android/car/dialer/ui/calllog/CallLogViewHolder.java b/src/com/android/car/dialer/ui/calllog/CallLogViewHolder.java
index fd0a734..913ba95 100644
--- a/src/com/android/car/dialer/ui/calllog/CallLogViewHolder.java
+++ b/src/com/android/car/dialer/ui/calllog/CallLogViewHolder.java
@@ -71,22 +71,26 @@
                 mAvatarView,
                 uiCallLog.getAvatarUri(),
                 uiCallLog.getTitle());
-        mTitleView.setText(uiCallLog.getTitle());
-        if (uiCallLog.getMostRecentCallType() == CallHistoryLiveData.CallType.MISSED_TYPE) {
-            mTitleView.setTextAppearance(R.style.TextAppearance_CallLogTitleMissedCall);
-        } else {
-            mTitleView.setTextAppearance(R.style.TextAppearance_CallLogTitleDefault);
-        }
 
+        mTitleView.setText(uiCallLog.getTitle());
         for (PhoneCallLog.Record record : uiCallLog.getCallRecords()) {
             mCallTypeIconsView.add(record.getCallType());
         }
-
         mCallCountTextView.setText(mCallTypeIconsView.getCallCountText());
         mCallCountTextView.setVisibility(
                 mCallTypeIconsView.getCallCountText() == null ? View.GONE : View.VISIBLE);
         mTextView.setText(uiCallLog.getText());
 
+        if (uiCallLog.getMostRecentCallType() == CallHistoryLiveData.CallType.MISSED_TYPE) {
+            mTitleView.setTextAppearance(R.style.TextAppearance_CallLogTitleMissedCall);
+            mCallCountTextView.setTextAppearance(R.style.TextAppearance_CallLogCallCountMissedCall);
+            mTextView.setTextAppearance(R.style.TextAppearance_CallLogTimestampMissedCall);
+        } else {
+            mTitleView.setTextAppearance(R.style.TextAppearance_CallLogTitleDefault);
+            mCallCountTextView.setTextAppearance(R.style.TextAppearance_CallLogCallCountDefault);
+            mTextView.setTextAppearance(R.style.TextAppearance_CallLogTimestampDefault);
+        }
+
         mPlaceCallView.setOnClickListener(
                 view -> UiCallManager.get().placeCall(uiCallLog.getNumber()));