Merge "Fix NPE in getPhoneType/getEmailType" into ub-contactsdialer-a-dev
diff --git a/src/com/android/contacts/common/model/ValuesDelta.java b/src/com/android/contacts/common/model/ValuesDelta.java
index 36321d2..77259f6 100644
--- a/src/com/android/contacts/common/model/ValuesDelta.java
+++ b/src/com/android/contacts/common/model/ValuesDelta.java
@@ -545,11 +545,11 @@
         return getAsString(ContactsContract.CommonDataKinds.Phone.NORMALIZED_NUMBER);
     }
 
-    public boolean phoneHasType() {
-        return containsKey(ContactsContract.CommonDataKinds.Phone.TYPE);
+    public boolean hasPhoneType() {
+        return getPhoneType() != null;
     }
 
-    public int getPhoneType() {
+    public Integer getPhoneType() {
         return getAsInteger(ContactsContract.CommonDataKinds.Phone.TYPE);
     }
 
@@ -561,11 +561,11 @@
         return getAsString(ContactsContract.CommonDataKinds.Email.DATA);
     }
 
-    public boolean emailHasType() {
-        return containsKey(ContactsContract.CommonDataKinds.Email.TYPE);
+    public boolean hasEmailType() {
+        return getEmailType() != null;
     }
 
-    public int getEmailType() {
+    public Integer getEmailType() {
         return getAsInteger(ContactsContract.CommonDataKinds.Email.TYPE);
     }