summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-06-18 19:42:53 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-18 19:42:53 +0000
commit62d27683c748cdde235898475386125fa3986aec (patch)
tree3dc373b9f786fedf9edc19c3f992bbf6f217bd8d
parent1e7e5b9544b6d76d8468872be55a78398d17b7a7 (diff)
parentd49ad423d033d49a3c61bf7fc527bffbe0db5e22 (diff)
am d49ad423: am b67f24eb: Merge "Clarify phone type magic constant naming." into mnc-dev
* commit 'd49ad423d033d49a3c61bf7fc527bffbe0db5e22': Clarify phone type magic constant naming.
-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);
}
}