summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--InCallUI/src/com/android/incallui/CallCardFragment.java11
-rw-r--r--InCallUI/src/com/android/incallui/ConferenceParticipantListAdapter.java3
-rw-r--r--InCallUI/src/com/android/incallui/DialpadFragment.java3
3 files changed, 12 insertions, 5 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index 54fbb3008..6685c06ff 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -49,6 +49,7 @@ import android.widget.ImageView;
import android.widget.TextView;
import com.android.contacts.common.util.MaterialColorMapUtils.MaterialPalette;
import com.android.contacts.common.widget.FloatingActionButtonController;
+import com.android.incallui.service.PhoneNumberService;
import com.android.phone.common.animation.AnimUtils;
import java.util.List;
@@ -374,7 +375,9 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
if (TextUtils.isEmpty(name)) {
mPrimaryName.setText(null);
} else {
- mPrimaryName.setText(name);
+ mPrimaryName.setText(nameIsNumber
+ ? PhoneNumberUtils.ttsSpanAsPhoneNumber(name)
+ : name);
// Set direction of the name field
int nameDirection = View.TEXT_DIRECTION_INHERIT;
@@ -399,7 +402,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
mPhoneNumber.setText(null);
mPhoneNumber.setVisibility(View.GONE);
} else {
- mPhoneNumber.setText(number);
+ mPhoneNumber.setText(PhoneNumberUtils.ttsSpanAsPhoneNumber(number));
mPhoneNumber.setVisibility(View.VISIBLE);
mPhoneNumber.setTextDirection(View.TEXT_DIRECTION_LTR);
}
@@ -456,7 +459,9 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
mSecondaryCallConferenceCallIcon.setVisibility(isConference ? View.VISIBLE : View.GONE);
- mSecondaryCallName.setText(name);
+ mSecondaryCallName.setText(nameIsNumber
+ ? PhoneNumberUtils.ttsSpanAsPhoneNumber(name)
+ : name);
if (hasProvider) {
mSecondaryCallProviderLabel.setText(providerLabel);
}
diff --git a/InCallUI/src/com/android/incallui/ConferenceParticipantListAdapter.java b/InCallUI/src/com/android/incallui/ConferenceParticipantListAdapter.java
index 0d5977210..7825dc1ad 100644
--- a/InCallUI/src/com/android/incallui/ConferenceParticipantListAdapter.java
+++ b/InCallUI/src/com/android/incallui/ConferenceParticipantListAdapter.java
@@ -18,6 +18,7 @@ package com.android.incallui;
import android.content.Context;
import android.net.Uri;
+import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
@@ -417,7 +418,7 @@ public class ConferenceParticipantListAdapter extends BaseAdapter {
numberTypeTextView.setVisibility(View.GONE);
} else {
numberTextView.setVisibility(View.VISIBLE);
- numberTextView.setText(callerNumber);
+ numberTextView.setText(PhoneNumberUtils.ttsSpanAsPhoneNumber(callerNumber));
numberTypeTextView.setVisibility(View.VISIBLE);
numberTypeTextView.setText(callerNumberType);
}
diff --git a/InCallUI/src/com/android/incallui/DialpadFragment.java b/InCallUI/src/com/android/incallui/DialpadFragment.java
index 63f6379fc..da3f0cb74 100644
--- a/InCallUI/src/com/android/incallui/DialpadFragment.java
+++ b/InCallUI/src/com/android/incallui/DialpadFragment.java
@@ -20,6 +20,7 @@ import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
+import android.telephony.PhoneNumberUtils;
import android.text.Editable;
import android.text.method.DialerKeyListener;
import android.util.AttributeSet;
@@ -513,7 +514,7 @@ public class DialpadFragment extends BaseFragment<DialpadPresenter, DialpadPrese
* @param text Text to set Dialpad EditText to.
*/
public void setDtmfText(String text) {
- mDtmfDialerField.setText(text);
+ mDtmfDialerField.setText(PhoneNumberUtils.ttsSpanAsPhoneNumber(text));
}
@Override