From 01c7baf0157231d9231853ea812d97646c779e5b Mon Sep 17 00:00:00 2001 From: emancebo Date: Mon, 13 Jul 2015 15:24:55 -0700 Subject: Query skype mime type when getting CALLABLE contacts TODO: pass in mime type so that this is not skype specific Change-Id: I37dd1119bea41e2c544b18773b134de41105da2e --- src/com/android/providers/contacts/ContactsProvider2.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/android/providers/contacts/ContactsProvider2.java b/src/com/android/providers/contacts/ContactsProvider2.java index 67719cc..2182aca 100644 --- a/src/com/android/providers/contacts/ContactsProvider2.java +++ b/src/com/android/providers/contacts/ContactsProvider2.java @@ -5805,10 +5805,12 @@ public class ContactsProvider2 extends AbstractContactsProvider DataColumns.MIMETYPE_ID + "=" + mDbHelper.get().getMimeTypeIdForPhone(); final String mimeTypeIsSipExpression = DataColumns.MIMETYPE_ID + "=" + mDbHelper.get().getMimeTypeIdForSip(); + final String mimeTypeIsSkypeExpression = DataColumns.MIMETYPE_ID + "=" + + mDbHelper.get().getMimeTypeId("vnd.android.cursor.item/com.skype.android.skypecall.action"); setTablesAndProjectionMapForData(qb, uri, projection, false); if (match == CALLABLES) { qb.appendWhere(" AND ((" + mimeTypeIsPhoneExpression + - ") OR (" + mimeTypeIsSipExpression + "))"); + ") OR (" + mimeTypeIsSipExpression + ") OR (" + mimeTypeIsSkypeExpression + "))"); } else { qb.appendWhere(" AND " + mimeTypeIsPhoneExpression); } @@ -5855,6 +5857,8 @@ public class ContactsProvider2 extends AbstractContactsProvider DataColumns.MIMETYPE_ID + "=" + mDbHelper.get().getMimeTypeIdForPhone(); final String mimeTypeIsSipExpression = DataColumns.MIMETYPE_ID + "=" + mDbHelper.get().getMimeTypeIdForSip(); + final String mimeTypeIsSkypeExpression = DataColumns.MIMETYPE_ID + "=" + + mDbHelper.get().getMimeTypeId("vnd.android.cursor.item/com.skype.android.skypecall.action"); String typeParam = uri.getQueryParameter(DataUsageFeedback.USAGE_TYPE); final int typeInt = getDataUsageFeedbackType(typeParam, @@ -5862,7 +5866,7 @@ public class ContactsProvider2 extends AbstractContactsProvider setTablesAndProjectionMapForData(qb, uri, projection, true, typeInt); if (match == CALLABLES_FILTER) { qb.appendWhere(" AND ((" + mimeTypeIsPhoneExpression + - ") OR (" + mimeTypeIsSipExpression + "))"); + ") OR (" + mimeTypeIsSipExpression + ") OR (" + mimeTypeIsSkypeExpression + "))"); } else { qb.appendWhere(" AND " + mimeTypeIsPhoneExpression); } -- cgit v1.1