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

Commit ec3e01f4 authored by Pranav Madapurmath's avatar Pranav Madapurmath
Browse files

DSDA: Handle call resume failure

Handles the call resume failure across subscriptions. We will attempt to
auto-unhold the foreground call that was previously held as part of
the original operation to swap the foreground and background calls as it
is historically more likely to succeed.

Bug: 390116261
Flag: com.android.server.telecom.flags.enable_call_sequencing
Test: atest CallTest
Test: atest CallSequencingBasicCallTest
Change-Id: Ic795e2468717ae80d7eaa25d83db6c0725dd5d1d
parent 39d84b0c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -259,6 +259,8 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
    private Optional<Integer> mCurrentlyConnectedSubId = Optional.empty();

    private final MmTelFeatureListener mMmTelFeatureListener = new MmTelFeatureListener();
    private com.android.server.telecom.flags.FeatureFlags mTelecomFlags =
            new com.android.server.telecom.flags.FeatureFlagsImpl();
    private class MmTelFeatureListener extends MmTelFeature.Listener {

        private IImsCallSessionListener processIncomingCall(@NonNull IImsCallSession c,
@@ -4086,6 +4088,13 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
                            + " in the single call unhold case");
                }
            }
            ImsPhoneConnection conn = findConnection(imsCall);
            // Send connection event so that Telecom can unhold the call the bg call that was held
            // for calls across phone accounts.
            if (mTelecomFlags.enableCallSequencing() && conn != null
                    && conn.getState() != ImsPhoneCall.State.DISCONNECTED) {
                conn.onConnectionEvent(android.telecom.Connection.EVENT_CALL_RESUME_FAILED, null);
            }
            mPhone.notifySuppServiceFailed(Phone.SuppService.RESUME);
            mMetrics.writeOnImsCallResumeFailed(mPhone.getPhoneId(), imsCall.getCallSession(),
                    reasonInfo);