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

Commit 919a155c authored by Wenyi Wang's avatar Wenyi Wang Committed by android-build-merger
Browse files

Backport Telephony.Threads to enable SMS interaction (2/2)

am: 04719722

* commit '04719722':
  Backport Telephony.Threads to enable SMS interaction (2/2)
parents b15c0642 04719722
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@ import android.database.DatabaseUtils;
import android.provider.Telephony;
import android.util.Log;

import com.android.contacts.common.compat.TelephonyThreadsCompat;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -70,7 +72,7 @@ public class SmsInteractionsLoader extends AsyncTaskLoader<List<ContactInteracti
            // original formatting since TalkBack is not reading the normalized numbers correctly
            try {
                threadIdStrings.add(String.valueOf(
                        Telephony.Threads.getOrCreateThreadId(getContext(), phone)));
                        TelephonyThreadsCompat.getOrCreateThreadId(getContext(), phone)));
            } catch (Exception e) {
                // Do nothing. Telephony.Threads.getOrCreateThreadId() throws exceptions when
                // it can't find/create a threadId (b/17657656).