From ae07c2be104a1f95426b697f3074bea72bc140e1 Mon Sep 17 00:00:00 2001 From: Scott Kennedy Date: Thu, 21 Nov 2013 14:31:33 -0800 Subject: Fix directory lookups The previous "fix" disabled the lookups. Now we will do the lookups, with the proper lookup key and directory id. We also do a much better job of showing directory images. Bug: 11693322 Bug: 12793279 Change-Id: I372711fd7b485f3183516fce2b11f9eff46a9b23 --- .../ex/chips/recipientchip/SimpleRecipientChip.java | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'chips/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java') diff --git a/chips/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java b/chips/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java index ac8e897..533f53f 100644 --- a/chips/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java +++ b/chips/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java @@ -27,6 +27,10 @@ class SimpleRecipientChip implements BaseRecipientChip { private final long mContactId; + private final Long mDirectoryId; + + private final String mLookupKey; + private final long mDataId; private final RecipientEntry mEntry; @@ -39,6 +43,8 @@ class SimpleRecipientChip implements BaseRecipientChip { mDisplay = entry.getDisplayName(); mValue = entry.getDestination().trim(); mContactId = entry.getContactId(); + mDirectoryId = entry.getDirectoryId(); + mLookupKey = entry.getLookupKey(); mDataId = entry.getDataId(); mEntry = entry; } @@ -68,6 +74,16 @@ class SimpleRecipientChip implements BaseRecipientChip { return mContactId; } + @Override + public Long getDirectoryId() { + return mDirectoryId; + } + + @Override + public String getLookupKey() { + return mLookupKey; + } + @Override public long getDataId() { return mDataId; @@ -92,11 +108,6 @@ class SimpleRecipientChip implements BaseRecipientChip { return !TextUtils.isEmpty(mOriginalText) ? mOriginalText : mEntry.getDestination(); } - @Override - public boolean isGalContact() { - return mEntry.isGalContact(); - } - @Override public String toString() { return mDisplay + " <" + mValue + ">"; -- cgit v1.2.3