diff options
author | emancebo <emancebo@cyngn.com> | 2015-07-13 15:24:55 -0700 |
---|---|---|
committer | Richard MacGregor <rmacgregor@cyngn.com> | 2016-04-07 13:31:51 -0700 |
commit | 01c7baf0157231d9231853ea812d97646c779e5b (patch) | |
tree | 50091471e021ee193ea72dcf87d1b7c3e27842ed | |
parent | edec4c11c704e9908f1d4f915a4ec2e0eefe54fe (diff) | |
download | packages_providers_ContactsProvider-01c7baf0157231d9231853ea812d97646c779e5b.zip packages_providers_ContactsProvider-01c7baf0157231d9231853ea812d97646c779e5b.tar.gz packages_providers_ContactsProvider-01c7baf0157231d9231853ea812d97646c779e5b.tar.bz2 |
Query skype mime type when getting CALLABLE contacts
TODO: pass in mime type so that this is not skype specific
Change-Id: I37dd1119bea41e2c544b18773b134de41105da2e
-rw-r--r-- | src/com/android/providers/contacts/ContactsProvider2.java | 8 |
1 files 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); } |