Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64ee1086 authored by Ajay Panicker's avatar Ajay Panicker Committed by android-build-merger
Browse files

Merge "Remove use of Contacts.IN_VISIBLE_GROUP" am: 378d3a23 am: 49173395 am: 57ecefa8

am: 2550a7cd

Change-Id: Ic56625974ff55751aae596232e0d3a29f2315899
parents 7744c035 2550a7cd
Loading
Loading
Loading
Loading
+7 −12
Original line number Diff line number Diff line
@@ -97,8 +97,6 @@ public class BluetoothPbapVcardManager {
    // here.
    static final String CALLLOG_SORT_ORDER = Calls._ID + " DESC";

    private static final String CLAUSE_ONLY_VISIBLE = Contacts.IN_VISIBLE_GROUP + "=1";

    public BluetoothPbapVcardManager(final Context context) {
        mContext = context;
        mResolver = mContext.getContentResolver();
@@ -161,8 +159,8 @@ public class BluetoothPbapVcardManager {
        final Uri myUri = DevicePolicyUtils.getEnterprisePhoneUri(mContext);
        Cursor contactCursor = null;
        try {
            contactCursor = mResolver.query(myUri, new String[] {Phone.CONTACT_ID},
                    CLAUSE_ONLY_VISIBLE, null, Phone.CONTACT_ID);
            contactCursor = mResolver.query(
                    myUri, new String[] {Phone.CONTACT_ID}, null, null, Phone.CONTACT_ID);
            if (contactCursor == null) {
                return 0;
            }
@@ -263,8 +261,7 @@ public class BluetoothPbapVcardManager {
            if (orderByWhat == BluetoothPbapObexServer.ORDER_BY_ALPHABETICAL) {
                orderBy = Phone.DISPLAY_NAME;
            }
            contactCursor = mResolver.query(myUri, PHONES_CONTACTS_PROJECTION,
                CLAUSE_ONLY_VISIBLE, null, orderBy);
            contactCursor = mResolver.query(myUri, PHONES_CONTACTS_PROJECTION, null, null, orderBy);
            if (contactCursor != null) {
                appendDistinctNameIdList(nameList,
                        mContext.getString(android.R.string.unknownName),
@@ -301,8 +298,7 @@ public class BluetoothPbapVcardManager {
        }

        try {
            contactCursor = mResolver.query(uri, projection, CLAUSE_ONLY_VISIBLE, null,
                    Phone.CONTACT_ID);
            contactCursor = mResolver.query(uri, projection, null, null, Phone.CONTACT_ID);

            if (contactCursor != null) {
                appendDistinctNameIdList(nameList,
@@ -411,8 +407,8 @@ public class BluetoothPbapVcardManager {
            Phone.CONTACT_ID
        });
        try {
            contactCursor = mResolver.query(myUri, PHONES_CONTACTS_PROJECTION, CLAUSE_ONLY_VISIBLE,
                    null, Phone.CONTACT_ID);
            contactCursor = mResolver.query(
                    myUri, PHONES_CONTACTS_PROJECTION, null, null, Phone.CONTACT_ID);
            if (contactCursor != null) {
                contactIdCursor = ContactCursorFilter.filterByRange(contactCursor, startPoint,
                        endPoint);
@@ -447,8 +443,7 @@ public class BluetoothPbapVcardManager {
            if (orderByWhat == BluetoothPbapObexServer.ORDER_BY_ALPHABETICAL) {
                orderBy = Phone.DISPLAY_NAME;
            }
            contactCursor = mResolver.query(myUri, PHONES_CONTACTS_PROJECTION,
                CLAUSE_ONLY_VISIBLE, null, orderBy);
            contactCursor = mResolver.query(myUri, PHONES_CONTACTS_PROJECTION, null, null, orderBy);
        } catch (CursorWindowAllocationException e) {
            Log.e(TAG,
                "CursorWindowAllocationException while composing phonebook one vcard");
+1 −1

File changed.

Contains only whitespace changes.