summaryrefslogtreecommitdiffstats
path: root/chips/src/com/android/ex/chips/recipientchip
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2013-12-06 02:16:40 +0000
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2013-12-06 02:16:40 +0000
commitaecf604ef14f07e078c309b015c2333e22640789 (patch)
tree3015ce491d513fb452665aa7f093138599800a20 /chips/src/com/android/ex/chips/recipientchip
parent0ab100671fdff8675ea1f74f15627f09c7f7506f (diff)
parent3e8176df16950c067bcb1b37e62b2fc07d74065a (diff)
downloadandroid_frameworks_ex-aecf604ef14f07e078c309b015c2333e22640789.tar.gz
android_frameworks_ex-aecf604ef14f07e078c309b015c2333e22640789.tar.bz2
android_frameworks_ex-aecf604ef14f07e078c309b015c2333e22640789.zip
Android 4.4.1 Release 1
Diffstat (limited to 'chips/src/com/android/ex/chips/recipientchip')
-rw-r--r--chips/src/com/android/ex/chips/recipientchip/BaseRecipientChip.java7
-rw-r--r--chips/src/com/android/ex/chips/recipientchip/InvisibleRecipientChip.java5
-rw-r--r--chips/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java5
-rw-r--r--chips/src/com/android/ex/chips/recipientchip/VisibleRecipientChip.java5
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();
}