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
diff --git a/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java b/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java
index ac8e897..533f53f 100644
--- a/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java
+++ b/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java
@@ -27,6 +27,10 @@
 
     private final long mContactId;
 
+    private final Long mDirectoryId;
+
+    private final String mLookupKey;
+
     private final long mDataId;
 
     private final RecipientEntry mEntry;
@@ -39,6 +43,8 @@
         mDisplay = entry.getDisplayName();
         mValue = entry.getDestination().trim();
         mContactId = entry.getContactId();
+        mDirectoryId = entry.getDirectoryId();
+        mLookupKey = entry.getLookupKey();
         mDataId = entry.getDataId();
         mEntry = entry;
     }
@@ -69,6 +75,16 @@
     }
 
     @Override
+    public Long getDirectoryId() {
+        return mDirectoryId;
+    }
+
+    @Override
+    public String getLookupKey() {
+        return mLookupKey;
+    }
+
+    @Override
     public long getDataId() {
         return mDataId;
     }
@@ -93,11 +109,6 @@
     }
 
     @Override
-    public boolean isGalContact() {
-        return mEntry.isGalContact();
-    }
-
-    @Override
     public String toString() {
         return mDisplay + " <" + mValue + ">";
     }