summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/dialer/util/IntentUtil.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/dialer/util/IntentUtil.java b/src/com/android/dialer/util/IntentUtil.java
index 263d3cd74..7ed99c9c0 100644
--- a/src/com/android/dialer/util/IntentUtil.java
+++ b/src/com/android/dialer/util/IntentUtil.java
@@ -34,6 +34,7 @@ public class IntentUtil {
public static final String CALL_ACTION = Intent.ACTION_CALL;
private static final String SMS_URI_PREFIX = "sms:";
+ private static final int NO_PHONE_TYPE = -1;
/**
* Return an Intent for making a phone call. Scheme (e.g. tel, sip) will be determined
@@ -156,7 +157,7 @@ public class IntentUtil {
return getNewContactIntent(
null /* name */,
phoneNumber /* phoneNumber */,
- -1 /* phoneNumberType */);
+ NO_PHONE_TYPE);
}
public static Intent getNewContactIntent(
@@ -176,7 +177,7 @@ public class IntentUtil {
return getAddToExistingContactIntent(
null /* name */,
phoneNumber /* phoneNumber */,
- -1 /* phoneNumberType */);
+ NO_PHONE_TYPE);
}
public static Intent getAddToExistingContactIntent(
@@ -194,7 +195,7 @@ public class IntentUtil {
if (name != null) {
intent.putExtra(ContactsContract.Intents.Insert.NAME, name);
}
- if (phoneNumberType != -1) {
+ if (phoneNumberType != NO_PHONE_TYPE) {
intent.putExtra(ContactsContract.Intents.Insert.PHONE_TYPE, phoneNumberType);
}
}