diff options
author | Andrew Lee <anwlee@google.com> | 2015-06-18 19:10:25 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-18 19:10:25 +0000 |
commit | b67f24eb6229ea10afb83f8ef2bf2bc6ba29a8f6 (patch) | |
tree | 7c44206502d3a244a3fc37161d111320f632e366 /src | |
parent | a6d65d510e9ca65b165c9ac41e8261abadb5536e (diff) | |
parent | 42b15233dc5080ac90b1bccc5b588876988bae24 (diff) |
Merge "Clarify phone type magic constant naming." into mnc-dev
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/util/IntentUtil.java | 7 |
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); } } |