summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIhab Awad <ihab@google.com>2014-12-17 00:50:09 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-17 00:50:09 +0000
commitfe7b9bc8b9f7c92337249da518ee0a653b61851a (patch)
treea02c1a208c72594202892708a6cb82ad1bc694e2
parente9532d40c0da30226fd7fbe8a8622cefc4abafad (diff)
parentb3c0c7635ff1fc07b09b6082679509b20e63c4da (diff)
am ca73c506: am e3733c84: am c10b11df: Merge "Add phone number annotations for TalkBack" into lmp-mr1-dev
* commit 'ca73c5061f4fec095158b156c8f306777601e25c': Add phone number annotations for TalkBack
-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