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

Commit 89901a6c authored by Daniel Bright's avatar Daniel Bright Committed by Automerger Merge Worker
Browse files

Merge "Add callSessionIntiating + callSessionInitatingFailed" am: cc7c94c4...

Merge "Add callSessionIntiating + callSessionInitatingFailed" am: cc7c94c4 am: 54c80ca1 am: 1637b855

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1520003

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I526dac0395abe35b39f4c696648f82fa490a9dab
parents 6b9bce08 1637b855
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -12114,7 +12114,9 @@ package android.telephony.ims {
    method public void callSessionHoldFailed(android.telephony.ims.ImsReasonInfo);
    method public void callSessionHoldReceived(android.telephony.ims.ImsCallProfile);
    method public void callSessionInitiated(android.telephony.ims.ImsCallProfile);
    method public void callSessionInitiatedFailed(android.telephony.ims.ImsReasonInfo);
    method @Deprecated public void callSessionInitiatedFailed(android.telephony.ims.ImsReasonInfo);
    method public void callSessionInitiating(@NonNull android.telephony.ims.ImsCallProfile);
    method public void callSessionInitiatingFailed(@NonNull android.telephony.ims.ImsReasonInfo);
    method public void callSessionInviteParticipantsRequestDelivered();
    method public void callSessionInviteParticipantsRequestFailed(android.telephony.ims.ImsReasonInfo);
    method @Deprecated public void callSessionMayHandover(int, int);
+36 −3
Original line number Diff line number Diff line
@@ -101,10 +101,29 @@ public class ImsCallSession {
     */
    public static class Listener {
        /**
         * Called when a request is sent out to initiate a new session
         * and 1xx response is received from the network.
         * Called when the session is initiating.
         *
         * @param session the session object that carries out the IMS session
         * see: {@link ImsCallSessionListener#callSessionInitiating(ImsCallProfile)}
         */
        public void callSessionInitiating(ImsCallSession session,
                ImsCallProfile profile) {
            // no-op
        }

        /**
         * Called when the session failed before initiating was called.
         *
         * see: {@link ImsCallSessionListener#callSessionInitiatingFailed(ImsReasonInfo)}
         */
        public void callSessionInitiatingFailed(ImsCallSession session,
                ImsReasonInfo reasonInfo) {
            // no-op
        }

        /**
         * Called when the session is progressing.
         *
         * see: {@link ImsCallSessionListener#callSessionProgressing(ImsStreamMediaProfile)}
         */
        public void callSessionProgressing(ImsCallSession session,
                ImsStreamMediaProfile profile) {
@@ -1178,6 +1197,13 @@ public class ImsCallSession {
        /**
         * Notifies the result of the basic session operation (setup / terminate).
         */
        @Override
        public void callSessionInitiating(ImsCallProfile profile) {
            if (mListener != null) {
                mListener.callSessionInitiating(ImsCallSession.this, profile);
            }
        }

        @Override
        public void callSessionProgressing(ImsStreamMediaProfile profile) {
            if (mListener != null) {
@@ -1192,6 +1218,13 @@ public class ImsCallSession {
            }
        }

        @Override
        public void callSessionInitiatingFailed(ImsReasonInfo reasonInfo) {
            if (mListener != null) {
                mListener.callSessionStartFailed(ImsCallSession.this, reasonInfo);
            }
        }

        @Override
        public void callSessionInitiatedFailed(ImsReasonInfo reasonInfo) {
            if (mListener != null) {
+46 −3
Original line number Diff line number Diff line
@@ -53,8 +53,45 @@ public class ImsCallSessionListener {
    }

    /**
     * A request has been sent out to initiate a new IMS call session and a 1xx response has been
     * received from the network.
     * Called when the network first begins to establish the call session and is now connecting
     * to the remote party. This must be called once after {@link ImsCallSessionImplBase#start} and
     * before any other method on this listener.  After this is called,
     * {@link #callSessionProgressing(ImsStreamMediaProfile)} must be called to communicate any
     * further updates.
     * <p/>
     * Once this is called, {@link #callSessionTerminated} must be called
     * to end the call session.  In the event that the session failed before the remote party
     * was contacted, {@link #callSessionInitiatingFailed} must be called.
     *
     * @param profile the associated {@link ImsCallProfile}.
     */
    public void callSessionInitiating(@NonNull ImsCallProfile profile) {
        try {
            mListener.callSessionInitiating(profile);
        } catch (RemoteException e) {
            e.rethrowFromSystemServer();
        }
    }

    /**
     * The IMS call session establishment has failed while initiating.
     *
     * @param reasonInfo {@link ImsReasonInfo} detailing the reason of the IMS call session
     * establishment failure.
     */
    public void callSessionInitiatingFailed(@NonNull ImsReasonInfo reasonInfo) {
        try {
            mListener.callSessionInitiatingFailed(reasonInfo);
        } catch (RemoteException e) {
            e.rethrowFromSystemServer();
        }
    }

    /**
     * Called after the network has contacted the remote party and the call state should move to
     * ALERTING.
     *
     * @param profile the associated {@link ImsCallProfile}.
     */
    public void callSessionProgressing(ImsStreamMediaProfile profile) {
        try {
@@ -65,7 +102,8 @@ public class ImsCallSessionListener {
    }

    /**
     * The IMS call session has been initiated.
     * Called once the outgoing IMS call session has been begun between the local and remote party.
     * The call state should move to ACTIVE.
     *
     * @param profile the associated {@link ImsCallProfile}.
     */
@@ -82,7 +120,12 @@ public class ImsCallSessionListener {
     *
     * @param reasonInfo {@link ImsReasonInfo} detailing the reason of the IMS call session
     * establishment failure.
     * @deprecated {@link #callSessionInitiated(ImsCallProfile)} is called immediately after
     * the session is first started which meant that there was no time in which a call to this
     * method was technically valid.  This method is replaced starting Android S in favor of
     * {@link #callSessionInitiatingFailed(ImsReasonInfo)}.
     */
    @Deprecated
    public void callSessionInitiatedFailed(ImsReasonInfo reasonInfo) {
        try {
            mListener.callSessionInitiatedFailed(reasonInfo);
+2 −0
Original line number Diff line number Diff line
@@ -37,6 +37,8 @@ oneway interface IImsCallSessionListener {
    /**
     * Notifies the result of the basic session operation (setup / terminate).
     */
    void callSessionInitiating(in ImsCallProfile profile);
    void callSessionInitiatingFailed(in ImsReasonInfo reasonInfo);
    void callSessionProgressing(in ImsStreamMediaProfile profile);
    void callSessionInitiated(in ImsCallProfile profile);
    void callSessionInitiatedFailed(in ImsReasonInfo reasonInfo);