summaryrefslogtreecommitdiff
path: root/src/com/android/dialer/calllog/ContactInfoHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/dialer/calllog/ContactInfoHelper.java')
-rw-r--r--src/com/android/dialer/calllog/ContactInfoHelper.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/dialer/calllog/ContactInfoHelper.java b/src/com/android/dialer/calllog/ContactInfoHelper.java
index 1bebfc416..f09c3657e 100644
--- a/src/com/android/dialer/calllog/ContactInfoHelper.java
+++ b/src/com/android/dialer/calllog/ContactInfoHelper.java
@@ -288,4 +288,16 @@ public class ContactInfoHelper {
return mCachedNumberLookupService != null
&& mCachedNumberLookupService.isBusiness(sourceType);
}
+
+ /**
+ * Given a contact's sourceType, return true if the contact came from an
+ * external source.
+ *
+ * @param sourceType sourceType of the contact. This is usually populated by
+ * {@link #mCachedNumberLookupService}.
+ */
+ public boolean isExternal(int sourceType) {
+ return mCachedNumberLookupService != null
+ && mCachedNumberLookupService.isExternal(sourceType);
+ }
}