summaryrefslogtreecommitdiffstats
path: root/chips/src/com/android/ex/chips/RecipientEntry.java
diff options
context:
space:
mode:
Diffstat (limited to 'chips/src/com/android/ex/chips/RecipientEntry.java')
-rw-r--r--chips/src/com/android/ex/chips/RecipientEntry.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/chips/src/com/android/ex/chips/RecipientEntry.java b/chips/src/com/android/ex/chips/RecipientEntry.java
index f7155b0..44bc767 100644
--- a/chips/src/com/android/ex/chips/RecipientEntry.java
+++ b/chips/src/com/android/ex/chips/RecipientEntry.java
@@ -118,6 +118,16 @@ public class RecipientEntry {
}
/**
+ * Construct a RecipientEntry from just a phone number.
+ */
+ public static RecipientEntry constructFakePhoneEntry(final String phoneNumber,
+ final boolean isValid) {
+ return new RecipientEntry(ENTRY_TYPE_PERSON, phoneNumber, phoneNumber,
+ INVALID_DESTINATION_TYPE, null,
+ INVALID_CONTACT, INVALID_CONTACT, null, true, isValid);
+ }
+
+ /**
* @return the display name for the entry. If the display name source is larger than
* {@link DisplayNameSources#PHONE} we use the contact's display name, but if not,
* i.e. the display name came from an email address or a phone number, we don't use it