summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Maxwell <maxwelb@google.com>2015-12-04 15:28:44 -0800
committerBrandon Maxwell <maxwelb@google.com>2015-12-04 15:28:44 -0800
commit3ba35809f5927edb356fac2149f47326ed8a1aa0 (patch)
treee6cc48bd8b0829ace848fa567be6da995d959724
parente9bb8949f98aa492e61adc9de5986d69a3259ac8 (diff)
Using Compat code for createTtsSpannable
Bug:25776171 Change-Id: Ic1fbe7a69ac33c4d39d0b66cb88c4ab67f74a3b2
-rw-r--r--InCallUI/src/com/android/incallui/CallCardFragment.java11
-rw-r--r--InCallUI/src/com/android/incallui/ConferenceParticipantListAdapter.java4
-rw-r--r--InCallUI/src/com/android/incallui/DialpadFragment.java4
3 files changed, 9 insertions, 10 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index 3c92a768d..3efdb7570 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -28,13 +28,12 @@ import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.os.Bundle;
-import android.os.Trace;
import android.os.Handler;
import android.os.Looper;
+import android.os.Trace;
import android.support.v4.graphics.drawable.RoundedBitmapDrawable;
import android.support.v4.graphics.drawable.RoundedBitmapDrawableFactory;
import android.telecom.DisconnectCause;
-import android.telecom.VideoProfile;
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
import android.text.format.DateUtils;
@@ -46,7 +45,6 @@ import android.view.ViewPropertyAnimator;
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
import android.view.accessibility.AccessibilityEvent;
-import android.view.accessibility.AccessibilityManager;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageButton;
@@ -57,6 +55,7 @@ import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
+import com.android.contacts.common.compat.PhoneNumberUtilsCompat;
import com.android.contacts.common.util.MaterialColorMapUtils.MaterialPalette;
import com.android.contacts.common.widget.FloatingActionButtonController;
import com.android.phone.common.animation.AnimUtils;
@@ -496,7 +495,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
mPrimaryName.setText(null);
} else {
mPrimaryName.setText(nameIsNumber
- ? PhoneNumberUtils.createTtsSpannable(name)
+ ? PhoneNumberUtilsCompat.createTtsSpannable(name)
: name);
// Set direction of the name field
@@ -529,7 +528,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
mPhoneNumber.setText(null);
mPhoneNumber.setVisibility(View.GONE);
} else {
- mPhoneNumber.setText(PhoneNumberUtils.createTtsSpannable(number));
+ mPhoneNumber.setText(PhoneNumberUtilsCompat.createTtsSpannable(number));
mPhoneNumber.setVisibility(View.VISIBLE);
mPhoneNumber.setTextDirection(View.TEXT_DIRECTION_LTR);
}
@@ -600,7 +599,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
mSecondaryCallVideoCallIcon.setVisibility(isVideoCall ? View.VISIBLE : View.GONE);
mSecondaryCallName.setText(nameIsNumber
- ? PhoneNumberUtils.createTtsSpannable(name)
+ ? PhoneNumberUtilsCompat.createTtsSpannable(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 a595c43ef..ad8de7432 100644
--- a/InCallUI/src/com/android/incallui/ConferenceParticipantListAdapter.java
+++ b/InCallUI/src/com/android/incallui/ConferenceParticipantListAdapter.java
@@ -20,7 +20,6 @@ import com.google.common.base.MoreObjects;
import android.content.Context;
import android.net.Uri;
-import android.telephony.PhoneNumberUtils;
import android.text.BidiFormatter;
import android.text.TextDirectionHeuristics;
import android.text.TextUtils;
@@ -34,6 +33,7 @@ import android.widget.TextView;
import com.android.contacts.common.ContactPhotoManager;
import com.android.contacts.common.ContactPhotoManager.DefaultImageRequest;
+import com.android.contacts.common.compat.PhoneNumberUtilsCompat;
import com.android.contacts.common.preference.ContactsPreferences;
import com.android.contacts.common.util.ContactDisplayUtils;
import com.android.incallui.ContactInfoCache.ContactCacheEntry;
@@ -438,7 +438,7 @@ public class ConferenceParticipantListAdapter extends BaseAdapter {
numberTypeTextView.setVisibility(View.GONE);
} else {
numberTextView.setVisibility(View.VISIBLE);
- numberTextView.setText(PhoneNumberUtils.createTtsSpannable(
+ numberTextView.setText(PhoneNumberUtilsCompat.createTtsSpannable(
BidiFormatter.getInstance().unicodeWrap(
callerNumber, TextDirectionHeuristics.LTR)));
numberTypeTextView.setVisibility(View.VISIBLE);
diff --git a/InCallUI/src/com/android/incallui/DialpadFragment.java b/InCallUI/src/com/android/incallui/DialpadFragment.java
index 371f5c50a..ab44cf2ca 100644
--- a/InCallUI/src/com/android/incallui/DialpadFragment.java
+++ b/InCallUI/src/com/android/incallui/DialpadFragment.java
@@ -20,7 +20,6 @@ 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;
@@ -34,6 +33,7 @@ import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
+import com.android.contacts.common.compat.PhoneNumberUtilsCompat;
import com.android.phone.common.dialpad.DialpadKeyButton;
import com.android.phone.common.dialpad.DialpadView;
@@ -483,7 +483,7 @@ public class DialpadFragment extends BaseFragment<DialpadPresenter, DialpadPrese
* @param text Text to set Dialpad EditText to.
*/
public void setDtmfText(String text) {
- mDtmfDialerField.setText(PhoneNumberUtils.createTtsSpannable(text));
+ mDtmfDialerField.setText(PhoneNumberUtilsCompat.createTtsSpannable(text));
}
@Override