Loading src/com/android/contacts/interactions/SmsInteractionsLoader.java +10 −2 Original line number Diff line number Diff line Loading @@ -66,8 +66,13 @@ public class SmsInteractionsLoader extends AsyncTaskLoader<List<ContactInteracti // Retrieve the thread IDs List<String> threadIdStrings = new ArrayList<>(); for (String phone : mPhoneNums) { try { threadIdStrings.add(String.valueOf( Telephony.Threads.getOrCreateThreadId(getContext(), phone))); } catch (Exception e) { // Do nothing. Telephony.Threads.getOrCreateThreadId() throws exceptions when // it can't find/create a threadId (b/17657656). } } // Query the SMS database for the threads Loading @@ -94,6 +99,9 @@ public class SmsInteractionsLoader extends AsyncTaskLoader<List<ContactInteracti * Return the most recent messages between a list of threads */ private Cursor getSmsCursorFromThreads(List<String> threadIds) { if (threadIds.size() == 0) { return null; } String selection = Telephony.Sms.THREAD_ID + " IN " + ContactInteractionUtil.questionMarks(threadIds.size()); Loading Loading
src/com/android/contacts/interactions/SmsInteractionsLoader.java +10 −2 Original line number Diff line number Diff line Loading @@ -66,8 +66,13 @@ public class SmsInteractionsLoader extends AsyncTaskLoader<List<ContactInteracti // Retrieve the thread IDs List<String> threadIdStrings = new ArrayList<>(); for (String phone : mPhoneNums) { try { threadIdStrings.add(String.valueOf( Telephony.Threads.getOrCreateThreadId(getContext(), phone))); } catch (Exception e) { // Do nothing. Telephony.Threads.getOrCreateThreadId() throws exceptions when // it can't find/create a threadId (b/17657656). } } // Query the SMS database for the threads Loading @@ -94,6 +99,9 @@ public class SmsInteractionsLoader extends AsyncTaskLoader<List<ContactInteracti * Return the most recent messages between a list of threads */ private Cursor getSmsCursorFromThreads(List<String> threadIds) { if (threadIds.size() == 0) { return null; } String selection = Telephony.Sms.THREAD_ID + " IN " + ContactInteractionUtil.questionMarks(threadIds.size()); Loading