diff options
author | Andrew Lee <anwlee@google.com> | 2015-06-18 11:40:29 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2015-06-18 11:40:29 -0700 |
commit | 42b15233dc5080ac90b1bccc5b588876988bae24 (patch) | |
tree | 74d2d041d300db89321295e5c1185e4f7cd8faf3 /src | |
parent | e224017d69630c3b3aea2667e26ab91bb9ecc0be (diff) |
Clarify phone type magic constant naming.
Bug: 21895943
Change-Id: I562eea49292704aa8b8c76706fa1ea196a180eed
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); } } |