diff options
author | Tom Taylor <tomtaylor@google.com> | 2013-03-21 10:28:50 -0700 |
---|---|---|
committer | Tom Taylor <tomtaylor@google.com> | 2013-03-21 10:28:50 -0700 |
commit | 6413ac6689b3d33cf2e42715575d3119d2c90f00 (patch) | |
tree | 94f0daca3e03cae478fa3f6c203fde1c0201cdb7 /chips/src/com/android/ex/chips/RecipientEntry.java | |
parent | 0175956f49bb05f18e303c59b86a5224d7c9c294 (diff) | |
download | android_frameworks_ex-6413ac6689b3d33cf2e42715575d3119d2c90f00.tar.gz android_frameworks_ex-6413ac6689b3d33cf2e42715575d3119d2c90f00.tar.bz2 android_frameworks_ex-6413ac6689b3d33cf2e42715575d3119d2c90f00.zip |
Area code gets eaten in Chips
Bug 8436028
New code for tokenizing an address stripped the area code from a manually
entered phone number. When chips is in "phone number" mode, call a new
function (essentially the old function before the change) to create
a fake entry directly from the phone number.
Change-Id: I2d62ff24aacd8eadb9086840bd4d003cf39db177
Diffstat (limited to 'chips/src/com/android/ex/chips/RecipientEntry.java')
-rw-r--r-- | chips/src/com/android/ex/chips/RecipientEntry.java | 10 |
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 |