Loading src/com/android/bluetooth/pbap/BluetoothPbapVcardManager.java +5 −6 Original line number Diff line number Diff line Loading @@ -835,7 +835,7 @@ public class BluetoothPbapVcardManager { /** * Get size of the cursor without duplicated contact id. This assumes the * given cursor is sorted by CONATCT_ID. * given cursor is sorted by CONTACT_ID. */ private static final int getDistinctContactIdSize(Cursor cursor) { final int contactIdColumn = cursor.getColumnIndex(Data.CONTACT_ID); Loading @@ -858,14 +858,13 @@ public class BluetoothPbapVcardManager { /** * Append "display_name,contact_id" string array from cursor to ArrayList. * This assumes the given cursor is sorted by CONATCT_ID. * This assumes the given cursor is sorted by CONTACT_ID. */ private static void appendDistinctNameIdList(ArrayList<String> resultList, String defaultName, Cursor cursor) { final int contactIdColumn = cursor.getColumnIndex(Data.CONTACT_ID); final int idColumn = cursor.getColumnIndex(Data._ID); final int nameColumn = cursor.getColumnIndex(Data.DISPLAY_NAME); long previousContactId = -1; cursor.moveToPosition(-1); while (cursor.moveToNext()) { final long contactId = cursor.getLong(contactIdColumn != -1 ? contactIdColumn : idColumn); Loading @@ -874,9 +873,9 @@ public class BluetoothPbapVcardManager { displayName = defaultName; } if (previousContactId != contactId) { previousContactId = contactId; resultList.add(displayName + "," + contactId); String newString = displayName + "," + contactId; if (!resultList.contains(newString)) { resultList.add(newString); } } if (V) { Loading Loading
src/com/android/bluetooth/pbap/BluetoothPbapVcardManager.java +5 −6 Original line number Diff line number Diff line Loading @@ -835,7 +835,7 @@ public class BluetoothPbapVcardManager { /** * Get size of the cursor without duplicated contact id. This assumes the * given cursor is sorted by CONATCT_ID. * given cursor is sorted by CONTACT_ID. */ private static final int getDistinctContactIdSize(Cursor cursor) { final int contactIdColumn = cursor.getColumnIndex(Data.CONTACT_ID); Loading @@ -858,14 +858,13 @@ public class BluetoothPbapVcardManager { /** * Append "display_name,contact_id" string array from cursor to ArrayList. * This assumes the given cursor is sorted by CONATCT_ID. * This assumes the given cursor is sorted by CONTACT_ID. */ private static void appendDistinctNameIdList(ArrayList<String> resultList, String defaultName, Cursor cursor) { final int contactIdColumn = cursor.getColumnIndex(Data.CONTACT_ID); final int idColumn = cursor.getColumnIndex(Data._ID); final int nameColumn = cursor.getColumnIndex(Data.DISPLAY_NAME); long previousContactId = -1; cursor.moveToPosition(-1); while (cursor.moveToNext()) { final long contactId = cursor.getLong(contactIdColumn != -1 ? contactIdColumn : idColumn); Loading @@ -874,9 +873,9 @@ public class BluetoothPbapVcardManager { displayName = defaultName; } if (previousContactId != contactId) { previousContactId = contactId; resultList.add(displayName + "," + contactId); String newString = displayName + "," + contactId; if (!resultList.contains(newString)) { resultList.add(newString); } } if (V) { Loading