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

Commit 8cadeab1 authored by Andre Eisenbach's avatar Andre Eisenbach
Browse files

Fixed merge error in BluetoothPbapVcardManager.java

Change-Id: Idf60aae9a94527479e3cc9c9552fc19ec15a396c
parent 6d40286e
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -259,23 +259,23 @@ public class BluetoothPbapVcardManager {

        final Uri myUri = DevicePolicyUtils.getEnterprisePhoneUri(mContext);
        Cursor contactCursor = null;
        // By default order is indexed
        String orderBy = Phone.CONTACT_ID;
        try {
            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, CLAUSE_ONLY_VISIBLE,
                    null, Phone.CONTACT_ID);
            if (contactCursor != null) {
                appendDistinctNameIdList(nameList,
                        mContext.getString(android.R.string.unknownName),
                        contactCursor);
                        mContext.getString(android.R.string.unknownName), contactCursor,
                        Phone.CONTACT_ID, Phone.DISPLAY_NAME);
                if (orderByWhat == BluetoothPbapObexServer.ORDER_BY_INDEXED) {
                    if (V) Log.v(TAG, "getPhonebookNameList, order by index");
                    // Do not need to do anything, as we sort it by index already
                } else if (orderByWhat == BluetoothPbapObexServer.ORDER_BY_ALPHABETICAL) {
                    if (V) Log.v(TAG, "getPhonebookNameList, order by alpha");
                    Collections.sort(nameList);
                }
            }
        } catch (CursorWindowAllocationException e) {
            Log.e(TAG, "CursorWindowAllocationException while getting phonebook name list");
        } catch (Exception e) {
            Log.e(TAG, "Exception while getting phonebook name list", e);
            Log.e(TAG, "Exception while getting Phonebook name list", e);
        } finally {
            if (contactCursor != null) {
                contactCursor.close();