diff options
author | Scott Kennedy <skennedy@google.com> | 2013-11-13 15:58:08 -0800 |
---|---|---|
committer | Scott Kennedy <skennedy@google.com> | 2013-11-14 17:43:35 +0000 |
commit | 3e8176df16950c067bcb1b37e62b2fc07d74065a (patch) | |
tree | 3015ce491d513fb452665aa7f093138599800a20 /chips/src/com/android/ex/chips/recipientchip | |
parent | 72dbb5bf7e2e40cc5c2a31d09b079cb053b1b639 (diff) | |
download | android_frameworks_ex-3e8176df16950c067bcb1b37e62b2fc07d74065a.tar.gz android_frameworks_ex-3e8176df16950c067bcb1b37e62b2fc07d74065a.tar.bz2 android_frameworks_ex-3e8176df16950c067bcb1b37e62b2fc07d74065a.zip |
Don't show the alternates dialog for GAL contacts
There's a bug in the chips code that causes this to show either no
alternates, or a different person, which is scaring people.
The proper future fix is to store some more information about GAL
contacts so we can do a proper lookup.
Bug: 11535331
Change-Id: Id8b6fc834446afe33bd6ec4e99b3d2b75b985bde
Diffstat (limited to 'chips/src/com/android/ex/chips/recipientchip')
4 files changed, 22 insertions, 0 deletions
diff --git a/chips/src/com/android/ex/chips/recipientchip/BaseRecipientChip.java b/chips/src/com/android/ex/chips/recipientchip/BaseRecipientChip.java index a080ee7..032d3b2 100644 --- a/chips/src/com/android/ex/chips/recipientchip/BaseRecipientChip.java +++ b/chips/src/com/android/ex/chips/recipientchip/BaseRecipientChip.java @@ -70,4 +70,11 @@ interface BaseRecipientChip { * before any reverse lookups. */ CharSequence getOriginalText(); + + /** + * Checks if this contact was retrieved from a GAL lookup. + * + * @return <code>true</code> if it came from GAL, <code>false</code> otherwise + */ + boolean isGalContact(); } diff --git a/chips/src/com/android/ex/chips/recipientchip/InvisibleRecipientChip.java b/chips/src/com/android/ex/chips/recipientchip/InvisibleRecipientChip.java index 0380a81..11a66da 100644 --- a/chips/src/com/android/ex/chips/recipientchip/InvisibleRecipientChip.java +++ b/chips/src/com/android/ex/chips/recipientchip/InvisibleRecipientChip.java @@ -82,6 +82,11 @@ public class InvisibleRecipientChip extends ReplacementSpan implements DrawableR } @Override + public boolean isGalContact() { + return mDelegate.isGalContact(); + } + + @Override public void draw(final Canvas canvas, final CharSequence text, final int start, final int end, final float x, final int top, final int y, final int bottom, final Paint paint) { // Do nothing. diff --git a/chips/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java b/chips/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java index c04b3be..ac8e897 100644 --- a/chips/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java +++ b/chips/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java @@ -93,6 +93,11 @@ class SimpleRecipientChip implements BaseRecipientChip { } @Override + public boolean isGalContact() { + return mEntry.isGalContact(); + } + + @Override public String toString() { return mDisplay + " <" + mValue + ">"; } diff --git a/chips/src/com/android/ex/chips/recipientchip/VisibleRecipientChip.java b/chips/src/com/android/ex/chips/recipientchip/VisibleRecipientChip.java index acade7f..4637f69 100644 --- a/chips/src/com/android/ex/chips/recipientchip/VisibleRecipientChip.java +++ b/chips/src/com/android/ex/chips/recipientchip/VisibleRecipientChip.java @@ -83,6 +83,11 @@ public class VisibleRecipientChip extends ImageSpan implements DrawableRecipient } @Override + public boolean isGalContact() { + return mDelegate.isGalContact(); + } + + @Override public Rect getBounds() { return getDrawable().getBounds(); } |