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

Commit 23e08ab4 authored by Tyler Gunn's avatar Tyler Gunn Committed by Android (Google) Code Review
Browse files

Merge "Pass ImsReasonInfo to TelephonyConnection." into sc-dev

parents f303aa1f d19fb074
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3116,6 +3116,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {

            if (conn != null) {
                conn.setPreciseDisconnectCause(getPreciseDisconnectCauseFromReasonInfo(reasonInfo));
                conn.setImsReasonInfo(reasonInfo);
            }

            if (reasonInfo.getCode() == ImsReasonInfo.CODE_SIP_ALTERNATE_EMERGENCY_CALL
+25 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.internal.telephony.imsphone;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.net.Uri;
@@ -39,6 +40,7 @@ import android.telephony.ServiceState;
import android.telephony.TelephonyManager;
import android.telephony.ims.AudioCodecAttributes;
import android.telephony.ims.ImsCallProfile;
import android.telephony.ims.ImsReasonInfo;
import android.telephony.ims.ImsStreamMediaProfile;
import android.telephony.ims.RtpHeaderExtension;
import android.telephony.ims.RtpHeaderExtensionType;
@@ -141,6 +143,12 @@ public class ImsPhoneConnection extends Connection implements
     */
    private boolean mIsLocalVideoCapable = true;

    /**
     * When the call is in a disconnected, state, will be set to the {@link ImsReasonInfo}
     * associated with the disconnection, if known.
     */
    private ImsReasonInfo mImsReasonInfo;

    //***** Event Constants
    private static final int EVENT_DTMF_DONE = 1;
    private static final int EVENT_PAUSE_DONE = 2;
@@ -1575,6 +1583,23 @@ public class ImsPhoneConnection extends Connection implements
        return mImsCall.getCallProfile().getAcceptedRtpHeaderExtensionTypes();
    }

    /**
     * For a connection being disconnected, sets the {@link ImsReasonInfo} which describes the
     * reason for the disconnection.
     * @param imsReasonInfo The IMS reason info.
     */
    public void setImsReasonInfo(@Nullable ImsReasonInfo imsReasonInfo) {
        mImsReasonInfo = imsReasonInfo;
    }

    /**
     * @return the {@link ImsReasonInfo} describing why this connection disconnected, or
     * {@code null} otherwise.
     */
    public @Nullable ImsReasonInfo getImsReasonInfo() {
        return mImsReasonInfo;
    }

    /**
     * Converts an {@link ImsCallProfile} verification status to a
     * {@link android.telecom.Connection} verification status.