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

Commit 809c4662 authored by Pranav Madapurmath's avatar Pranav Madapurmath
Browse files

DSDA: Correct call swap error message

Corrects the call swap error message. Previously, the message was
misleading stating that a call cannot be placed because the active call
is unholdable. Since this if for the swap case, the error message should
be reflected accordingly.

Bug: 396638090
Flag: EXEMPT bugfix
Test: Manual verification
Change-Id: I754f6fe850501137352be015c6873f2d9300762b
parent cec70ca3
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
@@ -416,7 +416,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());
@@ -1165,6 +1165,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) {