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

Commit 45e8eb40 authored by Bryce Lee's avatar Bryce Lee
Browse files

Reference the correct capability type for reply capability.

In this class, we reference the Call capability. However, the can method
actually checks against the Connection capabilities.

Bug: 29905086
Change-Id: I5f713afb2ccbea711343196019b82e6db59017c0
parent 6df997ac
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.telecom.Connection;
import android.telecom.Response;
import android.telephony.PhoneNumberUtils;
import android.telephony.SubscriptionManager;
@@ -131,8 +132,7 @@ public class RespondViaSmsManager extends CallsManagerListenerBase {
    public void onIncomingCallRejected(Call call, boolean rejectWithMessage, String textMessage) {
        if (rejectWithMessage
                && call.getHandle() != null
                && !call.can(
                        android.telecom.Call.Details.CAPABILITY_CAN_SEND_RESPONSE_VIA_CONNECTION)) {
                && !call.can(Connection.CAPABILITY_CAN_SEND_RESPONSE_VIA_CONNECTION)) {
            int subId = mCallsManager.getPhoneAccountRegistrar().getSubscriptionIdForPhoneAccount(
                    call.getTargetPhoneAccount());
            rejectCallWithMessage(call.getContext(), call.getHandle().getSchemeSpecificPart(),