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

Commit e86130a7 authored by Pranav Madapurmath's avatar Pranav Madapurmath Committed by Android (Google) Code Review
Browse files

Merge "DSDA: Correct call swap error message" into main

parents 5ffb358f 809c4662
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -429,6 +429,9 @@
    <!-- In-call screen: error message shown when the user attempts to place a call, but the live
         call cannot be held. -->
    <string name="callFailed_unholdable_call">Cannot place a call as there is an unholdable call. Disconnect the call prior to placing a new call.</string>
    <!-- In-call screen: error message shown when the user attempts to place a call, but the live
         call cannot be swapped with the held call. -->
    <string name="callSwapFailed_unholdable_call">Cannot swap the active call because it does not support holding. Disconnect the call to make the held call active.</string>
    <!-- In-call screen: error message shown when the user has attempted to place a new outgoing
         call while there is already a call in ringing state. -->
    <string name="callFailed_already_ringing">Cannot place a call as there is an unanswered incoming call. Answer or reject the incoming call prior to placing a new call.</string>
+8 −1
Original line number Diff line number Diff line
@@ -429,7 +429,7 @@ public class CallSequencingController {
                        Log.w(this, "unholdCall: Unable to hold the active call (%s),"
                                        + " aborting swap to %s", activeCallId, call.getId(),
                                call.getId());
                        showErrorDialogForCannotHoldCall(call, false);
                        showErrorDialogForCannotSwapCall(call);
                    } else {
                        Log.w(this, "unholdCall: %s is an emergency call, aborting swap to %s",
                                activeCallId, call.getId());
@@ -1178,6 +1178,13 @@ public class CallSequencingController {
        showErrorDialogForFailedCall(call, null, resourceId, reason);
    }

    private void showErrorDialogForCannotSwapCall(Call call) {
        int resourceId = R.string.callSwapFailed_unholdable_call;
        String reason = " unable to swap the live call. Disconnect the call to switch to "
                + "the held call.";
        showErrorDialogForFailedCall(call, null, resourceId, reason);
    }

    private void showErrorDialogForCannotHoldCall(Call call, boolean setCallFailure) {
        CallFailureCause cause = null;
        if (setCallFailure) {