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

Commit 926347bf authored by Brad Ebinger's avatar Brad Ebinger Committed by Gerrit Code Review
Browse files

Merge "Fixes in responding call via sms"

parents 3e9c7d20 3802daba
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.TextUtils;
import android.widget.Toast;

import java.util.ArrayList;
@@ -137,7 +138,7 @@ public class RespondViaSmsManager extends CallsManagerListenerBase {
            int subId = mCallsManager.getPhoneAccountRegistrar().getSubscriptionIdForPhoneAccount(
                    call.getTargetPhoneAccount());
            rejectCallWithMessage(call.getContext(), call.getHandle().getSchemeSpecificPart(),
                    textMessage, subId);
                    textMessage, subId, call.getName());
        }
    }

@@ -176,8 +177,8 @@ public class RespondViaSmsManager extends CallsManagerListenerBase {
     * Reject the call with the specified message. If message is null this call is ignored.
     */
    private void rejectCallWithMessage(Context context, String phoneNumber, String textMessage,
            int subId) {
        if (textMessage != null) {
            int subId, String contactName) {
        if (!TextUtils.isEmpty(textMessage)) {
            final ComponentName component =
                    SmsApplication.getDefaultRespondViaMessageApplication(context,
                            true /*updateIfNeeded*/);
@@ -191,7 +192,7 @@ public class RespondViaSmsManager extends CallsManagerListenerBase {
                }

                SomeArgs args = SomeArgs.obtain();
                args.arg1 = phoneNumber;
                args.arg1 = !TextUtils.isEmpty(contactName) ? contactName : phoneNumber;
                args.arg2 = context;
                mHandler.obtainMessage(MSG_SHOW_SENT_TOAST, args).sendToTarget();
                intent.setComponent(component);