Merge "Move PhoneNumberFormatter to common."
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 3d0d953..0958dd8 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1029,92 +1029,6 @@
and will not be synced. -->
<string name="account_phone" product="default">Phone-only, unsynced</string>
- <!-- Action string for calling a custom phone number -->
- <string name="call_custom">Call <xliff:g id="custom">%s</xliff:g></string>
- <!-- Action string for calling a home phone number -->
- <string name="call_home">Call home</string>
- <!-- Action string for calling a mobile phone number -->
- <string name="call_mobile">Call mobile</string>
- <!-- Action string for calling a work phone number -->
- <string name="call_work">Call work</string>
- <!-- Action string for calling a work fax phone number -->
- <string name="call_fax_work">Call work fax</string>
- <!-- Action string for calling a home fax phone number -->
- <string name="call_fax_home">Call home fax</string>
- <!-- Action string for calling a pager phone number -->
- <string name="call_pager">Call pager</string>
- <!-- Action string for calling an other phone number -->
- <string name="call_other">Call</string>
- <!-- Action string for calling a callback number -->
- <string name="call_callback">Call callback</string>
- <!-- Action string for calling a car phone number -->
- <string name="call_car">Call car</string>
- <!-- Action string for calling a company main phone number -->
- <string name="call_company_main">Call company main</string>
- <!-- Action string for calling a ISDN phone number -->
- <string name="call_isdn">Call ISDN</string>
- <!-- Action string for calling a main phone number -->
- <string name="call_main">Call main</string>
- <!-- Action string for calling an other fax phone number -->
- <string name="call_other_fax">Call fax</string>
- <!-- Action string for calling a radio phone number -->
- <string name="call_radio">Call radio</string>
- <!-- Action string for calling a Telex phone number -->
- <string name="call_telex">Call telex</string>
- <!-- Action string for calling a TTY/TDD phone number -->
- <string name="call_tty_tdd">Call TTY/TDD</string>
- <!-- Action string for calling a work mobile phone number -->
- <string name="call_work_mobile">Call work mobile</string>
- <!-- Action string for calling a work pager phone number -->
- <string name="call_work_pager">Call work pager</string>
- <!-- Action string for calling an assistant phone number -->
- <string name="call_assistant">Call <xliff:g id="assistant">%s</xliff:g></string>
- <!-- Action string for calling a MMS phone number -->
- <string name="call_mms">Call MMS</string>
-
- <!-- Action string for sending an SMS to a custom phone number -->
- <string name="sms_custom">Text <xliff:g id="custom">%s</xliff:g></string>
- <!-- Action string for sending an SMS to a home phone number -->
- <string name="sms_home">Text home</string>
- <!-- Action string for sending an SMS to a mobile phone number -->
- <string name="sms_mobile">Text mobile</string>
- <!-- Action string for sending an SMS to a work phone number -->
- <string name="sms_work">Text work</string>
- <!-- Action string for sending an SMS to a work fax phone number -->
- <string name="sms_fax_work">Text work fax</string>
- <!-- Action string for sending an SMS to a home fax phone number -->
- <string name="sms_fax_home">Text home fax</string>
- <!-- Action string for sending an SMS to a pager phone number -->
- <string name="sms_pager">Text pager</string>
- <!-- Action string for sending an SMS to an other phone number -->
- <string name="sms_other">Text</string>
- <!-- Action string for sending an SMS to a callback number -->
- <string name="sms_callback">Text callback</string>
- <!-- Action string for sending an SMS to a car phone number -->
- <string name="sms_car">Text car</string>
- <!-- Action string for sending an SMS to a company main phone number -->
- <string name="sms_company_main">Text company main</string>
- <!-- Action string for sending an SMS to a ISDN phone number -->
- <string name="sms_isdn">Text ISDN</string>
- <!-- Action string for sending an SMS to a main phone number -->
- <string name="sms_main">Text main</string>
- <!-- Action string for sending an SMS to an other fax phone number -->
- <string name="sms_other_fax">Text fax</string>
- <!-- Action string for sending an SMS to a radio phone number -->
- <string name="sms_radio">Text radio</string>
- <!-- Action string for sending an SMS to a Telex phone number -->
- <string name="sms_telex">Text telex</string>
- <!-- Action string for sending an SMS to a TTY/TDD phone number -->
- <string name="sms_tty_tdd">Text TTY/TDD</string>
- <!-- Action string for sending an SMS to a work mobile phone number -->
- <string name="sms_work_mobile">Text work mobile</string>
- <!-- Action string for sending an SMS to a work pager phone number -->
- <string name="sms_work_pager">Text work pager</string>
- <!-- Action string for sending an SMS to an assistant phone number -->
- <string name="sms_assistant">Text <xliff:g id="assistant">%s</xliff:g></string>
- <!-- Action string for sending an SMS to a MMS phone number -->
- <string name="sms_mms">Text MMS</string>
-
<!-- Generic action string for text messaging a contact. Used by AccessibilityService to announce the purpose of the view. [CHAR LIMIT=NONE] -->
<string name="sms">Text message</string>
diff --git a/src/com/android/contacts/ContactTileLoaderFactory.java b/src/com/android/contacts/ContactTileLoaderFactory.java
index 3a23400..f3ca47a 100644
--- a/src/com/android/contacts/ContactTileLoaderFactory.java
+++ b/src/com/android/contacts/ContactTileLoaderFactory.java
@@ -22,10 +22,9 @@
import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.provider.ContactsContract.Contacts;
-import com.android.contacts.list.ContactTileView;
-
/**
- * Used to create {@link CursorLoader}s to load different groups of {@link ContactTileView}s
+ * Used to create {@link CursorLoader}s to load different groups of
+ * {@link com.android.contacts.list.ContactTileView}.
*/
public final class ContactTileLoaderFactory {
diff --git a/src/com/android/contacts/interactions/PhoneNumberInteraction.java b/src/com/android/contacts/interactions/PhoneNumberInteraction.java
index 7ecd5d8..2cf0601 100644
--- a/src/com/android/contacts/interactions/PhoneNumberInteraction.java
+++ b/src/com/android/contacts/interactions/PhoneNumberInteraction.java
@@ -20,7 +20,6 @@
import android.app.Dialog;
import android.app.DialogFragment;
import android.app.FragmentManager;
-import android.content.ContentValues;
import android.content.Context;
import android.content.CursorLoader;
import android.content.DialogInterface;
@@ -53,10 +52,7 @@
import com.android.contacts.common.Collapser.Collapsible;
import com.android.contacts.common.MoreContactUtils;
import com.android.contacts.common.activity.TransactionSafeActivity;
-import com.android.contacts.model.AccountTypeManager;
-import com.android.contacts.model.account.AccountType;
-import com.android.contacts.model.account.AccountType.StringInflater;
-import com.android.contacts.model.dataitem.DataKind;
+import com.android.contacts.common.util.ContactDisplayUtils;
import com.google.common.annotations.VisibleForTesting;
import java.util.ArrayList;
@@ -75,12 +71,6 @@
public class PhoneNumberInteraction implements OnLoadCompleteListener<Cursor> {
private static final String TAG = PhoneNumberInteraction.class.getSimpleName();
- @VisibleForTesting
- /* package */ enum InteractionType {
- PHONE_CALL,
- SMS
- }
-
/**
* A model object for capturing a phone number for a given contact.
*/
@@ -162,14 +152,12 @@
* A list adapter that populates the list of contact's phone numbers.
*/
private static class PhoneItemAdapter extends ArrayAdapter<PhoneItem> {
- private final InteractionType mInteractionType;
- private final AccountTypeManager mAccountTypeManager;
+ private final int mInteractionType;
public PhoneItemAdapter(Context context, List<PhoneItem> list,
- InteractionType interactionType) {
+ int interactionType) {
super(context, R.layout.phone_disambig_item, android.R.id.text2, list);
mInteractionType = interactionType;
- mAccountTypeManager = AccountTypeManager.getInstance(context);
}
@Override
@@ -177,20 +165,11 @@
final View view = super.getView(position, convertView, parent);
final PhoneItem item = getItem(position);
- final AccountType accountType = mAccountTypeManager.getAccountType(
- item.accountType, item.dataSet);
final TextView typeView = (TextView) view.findViewById(android.R.id.text1);
- final DataKind kind = accountType.getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
- if (kind != null) {
- ContentValues values = new ContentValues();
- values.put(Phone.TYPE, item.type);
- values.put(Phone.LABEL, item.label);
- StringInflater header = (mInteractionType == InteractionType.SMS)
- ? kind.actionAltHeader : kind.actionHeader;
- typeView.setText(header.inflateUsing(getContext(), values));
- } else {
- typeView.setText(R.string.call_other);
- }
+ CharSequence value = ContactDisplayUtils.getLabelForCallOrSms((int) item.type,
+ item.label, mInteractionType, getContext());
+
+ typeView.setText(value);
return view;
}
}
@@ -213,13 +192,13 @@
private static final String ARG_INTERACTION_TYPE = "interactionType";
private static final String ARG_CALL_ORIGIN = "callOrigin";
- private InteractionType mInteractionType;
+ private int mInteractionType;
private ListAdapter mPhonesAdapter;
private List<PhoneItem> mPhoneList;
private String mCallOrigin;
public static void show(FragmentManager fragmentManager,
- ArrayList<PhoneItem> phoneList, InteractionType interactionType,
+ ArrayList<PhoneItem> phoneList, int interactionType,
String callOrigin) {
PhoneDisambiguationDialogFragment fragment = new PhoneDisambiguationDialogFragment();
Bundle bundle = new Bundle();
@@ -234,8 +213,7 @@
public Dialog onCreateDialog(Bundle savedInstanceState) {
final Activity activity = getActivity();
mPhoneList = getArguments().getParcelableArrayList(ARG_PHONE_LIST);
- mInteractionType =
- (InteractionType) getArguments().getSerializable(ARG_INTERACTION_TYPE);
+ mInteractionType = getArguments().getInt(ARG_INTERACTION_TYPE);
mCallOrigin = getArguments().getString(ARG_CALL_ORIGIN);
mPhonesAdapter = new PhoneItemAdapter(activity, mPhoneList, mInteractionType);
@@ -243,7 +221,7 @@
final View setPrimaryView = inflater.inflate(R.layout.set_primary_checkbox, null);
return new AlertDialog.Builder(activity)
.setAdapter(mPhonesAdapter, this)
- .setTitle(mInteractionType == InteractionType.SMS
+ .setTitle(mInteractionType == ContactDisplayUtils.INTERACTION_SMS
? R.string.sms_disambig_title : R.string.call_disambig_title)
.setView(setPrimaryView)
.create();
@@ -291,7 +269,7 @@
private final Context mContext;
private final OnDismissListener mDismissListener;
- private final InteractionType mInteractionType;
+ private final int mInteractionType;
private final String mCallOrigin;
@@ -304,12 +282,12 @@
* require a {@link TransactionSafeActivity} (i.e. see {@link #startInteractionForPhoneCall}).
*/
@VisibleForTesting
- /* package */ PhoneNumberInteraction(Context context, InteractionType interactionType,
+ /* package */ PhoneNumberInteraction(Context context, int interactionType,
DialogInterface.OnDismissListener dismissListener) {
this(context, interactionType, dismissListener, null);
}
- private PhoneNumberInteraction(Context context, InteractionType interactionType,
+ private PhoneNumberInteraction(Context context, int interactionType,
DialogInterface.OnDismissListener dismissListener, String callOrigin) {
mContext = context;
mInteractionType = interactionType;
@@ -322,11 +300,11 @@
}
private static void performAction(
- Context context, String phoneNumber, InteractionType interactionType,
+ Context context, String phoneNumber, int interactionType,
String callOrigin) {
Intent intent;
switch (interactionType) {
- case SMS:
+ case ContactDisplayUtils.INTERACTION_SMS:
intent = new Intent(
Intent.ACTION_SENDTO, Uri.fromParts("sms", phoneNumber, null));
break;
@@ -448,7 +426,7 @@
* data Uri won't.
*/
public static void startInteractionForPhoneCall(TransactionSafeActivity activity, Uri uri) {
- (new PhoneNumberInteraction(activity, InteractionType.PHONE_CALL, null))
+ (new PhoneNumberInteraction(activity, ContactDisplayUtils.INTERACTION_CALL, null))
.startInteraction(uri);
}
@@ -462,7 +440,7 @@
*/
public static void startInteractionForPhoneCall(TransactionSafeActivity activity, Uri uri,
String callOrigin) {
- (new PhoneNumberInteraction(activity, InteractionType.PHONE_CALL, null, callOrigin))
+ (new PhoneNumberInteraction(activity, ContactDisplayUtils.INTERACTION_CALL, null, callOrigin))
.startInteraction(uri);
}
@@ -479,7 +457,8 @@
* data Uri won't.
*/
public static void startInteractionForTextMessage(TransactionSafeActivity activity, Uri uri) {
- (new PhoneNumberInteraction(activity, InteractionType.SMS, null)).startInteraction(uri);
+ (new PhoneNumberInteraction(activity, ContactDisplayUtils.INTERACTION_SMS, null))
+ .startInteraction(uri);
}
@VisibleForTesting
diff --git a/src/com/android/contacts/model/account/BaseAccountType.java b/src/com/android/contacts/model/account/BaseAccountType.java
index 7f9e1ef..6b4d623 100644
--- a/src/com/android/contacts/model/account/BaseAccountType.java
+++ b/src/com/android/contacts/model/account/BaseAccountType.java
@@ -39,6 +39,7 @@
import android.view.inputmethod.EditorInfo;
import com.android.contacts.R;
+import com.android.contacts.common.util.ContactDisplayUtils;
import com.android.contacts.model.dataitem.DataKind;
import com.android.contacts.test.NeededForTesting;
import com.android.contacts.util.DateUtils;
@@ -540,70 +541,24 @@
public static class PhoneActionInflater extends CommonInflater {
@Override
protected boolean isCustom(Integer type) {
- return type == Phone.TYPE_CUSTOM || type == Phone.TYPE_ASSISTANT;
+ return ContactDisplayUtils.isCustomPhoneType(type);
}
@Override
protected int getTypeLabelResource(Integer type) {
- if (type == null) return R.string.call_other;
- switch (type) {
- case Phone.TYPE_HOME: return R.string.call_home;
- case Phone.TYPE_MOBILE: return R.string.call_mobile;
- case Phone.TYPE_WORK: return R.string.call_work;
- case Phone.TYPE_FAX_WORK: return R.string.call_fax_work;
- case Phone.TYPE_FAX_HOME: return R.string.call_fax_home;
- case Phone.TYPE_PAGER: return R.string.call_pager;
- case Phone.TYPE_OTHER: return R.string.call_other;
- case Phone.TYPE_CALLBACK: return R.string.call_callback;
- case Phone.TYPE_CAR: return R.string.call_car;
- case Phone.TYPE_COMPANY_MAIN: return R.string.call_company_main;
- case Phone.TYPE_ISDN: return R.string.call_isdn;
- case Phone.TYPE_MAIN: return R.string.call_main;
- case Phone.TYPE_OTHER_FAX: return R.string.call_other_fax;
- case Phone.TYPE_RADIO: return R.string.call_radio;
- case Phone.TYPE_TELEX: return R.string.call_telex;
- case Phone.TYPE_TTY_TDD: return R.string.call_tty_tdd;
- case Phone.TYPE_WORK_MOBILE: return R.string.call_work_mobile;
- case Phone.TYPE_WORK_PAGER: return R.string.call_work_pager;
- case Phone.TYPE_ASSISTANT: return R.string.call_assistant;
- case Phone.TYPE_MMS: return R.string.call_mms;
- default: return R.string.call_custom;
- }
+ return ContactDisplayUtils.getPhoneLabelResourceId(type);
}
}
public static class PhoneActionAltInflater extends CommonInflater {
@Override
protected boolean isCustom(Integer type) {
- return (type == Phone.TYPE_CUSTOM || type == Phone.TYPE_ASSISTANT);
+ return ContactDisplayUtils.isCustomPhoneType(type);
}
@Override
protected int getTypeLabelResource(Integer type) {
- if (type == null) return R.string.sms_other;
- switch (type) {
- case Phone.TYPE_HOME: return R.string.sms_home;
- case Phone.TYPE_MOBILE: return R.string.sms_mobile;
- case Phone.TYPE_WORK: return R.string.sms_work;
- case Phone.TYPE_FAX_WORK: return R.string.sms_fax_work;
- case Phone.TYPE_FAX_HOME: return R.string.sms_fax_home;
- case Phone.TYPE_PAGER: return R.string.sms_pager;
- case Phone.TYPE_OTHER: return R.string.sms_other;
- case Phone.TYPE_CALLBACK: return R.string.sms_callback;
- case Phone.TYPE_CAR: return R.string.sms_car;
- case Phone.TYPE_COMPANY_MAIN: return R.string.sms_company_main;
- case Phone.TYPE_ISDN: return R.string.sms_isdn;
- case Phone.TYPE_MAIN: return R.string.sms_main;
- case Phone.TYPE_OTHER_FAX: return R.string.sms_other_fax;
- case Phone.TYPE_RADIO: return R.string.sms_radio;
- case Phone.TYPE_TELEX: return R.string.sms_telex;
- case Phone.TYPE_TTY_TDD: return R.string.sms_tty_tdd;
- case Phone.TYPE_WORK_MOBILE: return R.string.sms_work_mobile;
- case Phone.TYPE_WORK_PAGER: return R.string.sms_work_pager;
- case Phone.TYPE_ASSISTANT: return R.string.sms_assistant;
- case Phone.TYPE_MMS: return R.string.sms_mms;
- default: return R.string.sms_custom;
- }
+ return ContactDisplayUtils.getSmsLabelResourceId(type);
}
}
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index 0d9f3de..8eb14c2 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -71,7 +71,7 @@
import com.android.contacts.util.DataStatus;
import com.android.contacts.util.ImageViewDrawableSetter;
import com.android.contacts.util.SchedulingUtils;
-import com.android.contacts.util.StopWatch;
+import com.android.contacts.common.util.StopWatch;
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
diff --git a/src/com/android/contacts/util/StopWatch.java b/src/com/android/contacts/util/StopWatch.java
deleted file mode 100644
index c53f346..0000000
--- a/src/com/android/contacts/util/StopWatch.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.contacts.util;
-
-import android.util.Log;
-
-import com.google.common.collect.Lists;
-
-import java.util.ArrayList;
-
-/**
- * A {@link StopWatch} records start, laps and stop, and print them to logcat.
- */
-public class StopWatch {
-
- private final String mLabel;
-
- private final ArrayList<Long> mTimes = Lists.newArrayList();
- private final ArrayList<String> mLapLabels = Lists.newArrayList();
-
- private StopWatch(String label) {
- mLabel = label;
- lap("");
- }
-
- /**
- * Create a new instance and start it.
- */
- public static StopWatch start(String label) {
- return new StopWatch(label);
- }
-
- /**
- * Record a lap.
- */
- public void lap(String lapLabel) {
- mTimes.add(System.currentTimeMillis());
- mLapLabels.add(lapLabel);
- }
-
- /**
- * Stop it and log the result, if the total time >= {@code timeThresholdToLog}.
- */
- public void stopAndLog(String TAG, int timeThresholdToLog) {
-
- lap("");
-
- final long start = mTimes.get(0);
- final long stop = mTimes.get(mTimes.size() - 1);
-
- final long total = stop - start;
- if (total < timeThresholdToLog) return;
-
- final StringBuilder sb = new StringBuilder();
- sb.append(mLabel);
- sb.append(",");
- sb.append(total);
- sb.append(": ");
-
- long last = start;
- for (int i = 1; i < mTimes.size(); i++) {
- final long current = mTimes.get(i);
- sb.append(mLapLabels.get(i));
- sb.append(",");
- sb.append((current - last));
- sb.append(" ");
- last = current;
- }
- Log.v(TAG, sb.toString());
- }
-
- /**
- * Return a dummy instance that does no operations.
- */
- public static StopWatch getNullStopWatch() {
- return NullStopWatch.INSTANCE;
- }
-
- private static class NullStopWatch extends StopWatch {
- public static final NullStopWatch INSTANCE = new NullStopWatch();
-
- public NullStopWatch() {
- super(null);
- }
-
- @Override
- public void lap(String lapLabel) {
- // noop
- }
-
- @Override
- public void stopAndLog(String TAG, int timeThresholdToLog) {
- // noop
- }
- }
-}
diff --git a/tests/src/com/android/contacts/interactions/PhoneNumberInteractionTest.java b/tests/src/com/android/contacts/interactions/PhoneNumberInteractionTest.java
index a82e0f6..4e347b7 100644
--- a/tests/src/com/android/contacts/interactions/PhoneNumberInteractionTest.java
+++ b/tests/src/com/android/contacts/interactions/PhoneNumberInteractionTest.java
@@ -30,7 +30,7 @@
import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import com.android.contacts.interactions.PhoneNumberInteraction.InteractionType;
+import com.android.contacts.common.util.ContactDisplayUtils;
import com.android.contacts.interactions.PhoneNumberInteraction.PhoneItem;
import com.android.contacts.tests.mocks.ContactsMockContext;
import com.android.contacts.tests.mocks.MockContentProvider;
@@ -60,7 +60,7 @@
private final static class TestPhoneNumberInteraction extends PhoneNumberInteraction {
private ArrayList<PhoneItem> mPhoneList;
- public TestPhoneNumberInteraction(Context context, InteractionType interactionType,
+ public TestPhoneNumberInteraction(Context context, int interactionType,
OnDismissListener dismissListener) {
super(context, interactionType, dismissListener);
}
@@ -94,7 +94,7 @@
Phone.CONTENT_ITEM_TYPE);
TestPhoneNumberInteraction interaction = new TestPhoneNumberInteraction(
- mContext, InteractionType.SMS, null);
+ mContext, ContactDisplayUtils.INTERACTION_SMS, null);
interaction.startInteraction(contactUri);
interaction.getLoader().waitForLoader();
@@ -113,7 +113,7 @@
Phone.CONTENT_ITEM_TYPE);
TestPhoneNumberInteraction interaction = new TestPhoneNumberInteraction(
- mContext, InteractionType.SMS, null);
+ mContext, ContactDisplayUtils.INTERACTION_SMS, null);
interaction.startInteraction(dataUri);
interaction.getLoader().waitForLoader();
@@ -134,7 +134,7 @@
2, "456", 1, null, null, Phone.TYPE_HOME, null, Phone.CONTENT_ITEM_TYPE);
TestPhoneNumberInteraction interaction = new TestPhoneNumberInteraction(
- mContext, InteractionType.SMS, null);
+ mContext, ContactDisplayUtils.INTERACTION_SMS, null);
interaction.startInteraction(contactUri);
interaction.getLoader().waitForLoader();
@@ -175,7 +175,7 @@
Phone.CONTENT_ITEM_TYPE);
TestPhoneNumberInteraction interaction = new TestPhoneNumberInteraction(
- mContext, InteractionType.PHONE_CALL, null);
+ mContext, ContactDisplayUtils.INTERACTION_CALL, null);
interaction.startInteraction(contactUri);
interaction.getLoader().waitForLoader();
@@ -193,7 +193,7 @@
.returnRow(1, "example@example.com", 0, null, null, Phone.TYPE_HOME, null,
SipAddress.CONTENT_ITEM_TYPE);
TestPhoneNumberInteraction interaction = new TestPhoneNumberInteraction(
- mContext, InteractionType.PHONE_CALL, null);
+ mContext, ContactDisplayUtils.INTERACTION_CALL, null);
interaction.startInteraction(contactUri);
interaction.getLoader().waitForLoader();
@@ -214,7 +214,7 @@
Phone.CONTENT_ITEM_TYPE);
TestPhoneNumberInteraction interaction = new TestPhoneNumberInteraction(
- mContext, InteractionType.PHONE_CALL, null);
+ mContext, ContactDisplayUtils.INTERACTION_CALL, null);
interaction.startInteraction(contactUri);
interaction.getLoader().waitForLoader();