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

Commit 0096f738 authored by Aishwarya Mallampati's avatar Aishwarya Mallampati Committed by Android (Google) Code Review
Browse files

Merge "Replace callers of SmsApplication with user-aware methods."

parents 4031fda3 f3bdaf21
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -3317,9 +3317,15 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
            return false;
        }

        if (!isSimCall()) {
            // Incoming calls to a specific sim can only respond back using SMS.
            return false;
        }

        // Is there a valid SMS application on the phone?
        if (mContext.getSystemService(TelephonyManager.class)
                .getAndUpdateDefaultRespondViaMessageApplication() == null) {
        TelephonyManager simTm = mContext.getSystemService(TelephonyManager.class)
                .createForPhoneAccountHandle(getTargetPhoneAccount());
        if ((simTm == null) || (simTm.getAndUpdateDefaultRespondViaMessageApplication() == null)) {
            return false;
        }