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

Commit ac0d2765 authored by Brad Ebinger's avatar Brad Ebinger Committed by android-build-merger
Browse files

Merge "Adds MMTel APIs in temporary namespace"

am: 4e54d609

Change-Id: I95ad16f1e08ff11f9af8f626f6a8827308e806dd
parents 28064dd5 4e54d609
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -453,6 +453,17 @@ java_library {
        "telecomm/java/com/android/internal/telecom/IInCallService.aidl",
        "telecomm/java/com/android/internal/telecom/ITelecomService.aidl",
        "telecomm/java/com/android/internal/telecom/RemoteServiceCallback.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsCallSessionListener.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsCapabilityCallback.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsConfig.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsConfigCallback.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsMmTelFeature.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsMmTelListener.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsRcsFeature.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsRegistration.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsRegistrationCallback.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsServiceController.aidl",
        "telephony/java/android/telephony/ims/internal/aidl/IImsServiceControllerListener.aidl",
        "telephony/java/android/telephony/mbms/IMbmsDownloadSessionCallback.aidl",
        "telephony/java/android/telephony/mbms/IMbmsStreamingSessionCallback.aidl",
        "telephony/java/android/telephony/mbms/IDownloadStateCallback.aidl",
+364 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License
 */

package android.telephony.ims.internal;

import android.os.RemoteException;
import android.telephony.ims.internal.aidl.IImsCallSessionListener;

import com.android.ims.ImsCallProfile;
import com.android.ims.ImsConferenceState;
import com.android.ims.ImsReasonInfo;
import com.android.ims.ImsStreamMediaProfile;
import com.android.ims.ImsSuppServiceNotification;
import com.android.ims.internal.ImsCallSession;

/**
 * Proxy class for interfacing with the framework's Call session for an ongoing IMS call.
 *
 * DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
 * will break other implementations of ImsCallSessionListener maintained by other ImsServices.
 *
 * @hide
 */
public class ImsCallSessionListener {

    private final IImsCallSessionListener mListener;

    public ImsCallSessionListener(IImsCallSessionListener l) {
        mListener = l;
    }

    /**
     * Called when a request is sent out to initiate a new session
     * and 1xx response is received from the network.
     */
    public void callSessionProgressing(ImsStreamMediaProfile profile)
            throws RemoteException {
        mListener.callSessionProgressing(profile);
    }

    /**
     * Called when the session is initiated.
     *
     * @param profile the associated {@link ImsCallSession}.
     */
    public void callSessionInitiated(ImsCallProfile profile) throws RemoteException {
        mListener.callSessionInitiated(profile);
    }

    /**
     * Called when the session establishment has failed.
     *
     * @param reasonInfo detailed reason of the session establishment failure
     */
    public void callSessionInitiatedFailed(ImsReasonInfo reasonInfo) throws RemoteException {
        mListener.callSessionInitiatedFailed(reasonInfo);
    }

    /**
     * Called when the session is terminated.
     *
     * @param reasonInfo detailed reason of the session termination
     */
    public void callSessionTerminated(ImsReasonInfo reasonInfo) throws RemoteException {
        mListener.callSessionTerminated(reasonInfo);
    }

    /**
     * Called when the session is on hold.
     */
    public void callSessionHeld(ImsCallProfile profile) throws RemoteException {
        mListener.callSessionHeld(profile);
    }

    /**
     * Called when the session hold has failed.
     *
     * @param reasonInfo detailed reason of the session hold failure
     */
    public void callSessionHoldFailed(ImsReasonInfo reasonInfo) throws RemoteException {
        mListener.callSessionHoldFailed(reasonInfo);
    }

    /**
     * Called when the session hold is received from the remote user.
     */
    public void callSessionHoldReceived(ImsCallProfile profile) throws RemoteException {
        mListener.callSessionHoldReceived(profile);
    }

    /**
     * Called when the session resume is done.
     */
    public void callSessionResumed(ImsCallProfile profile) throws RemoteException {
        mListener.callSessionResumed(profile);
    }

    /**
     * Called when the session resume has failed.
     *
     * @param reasonInfo detailed reason of the session resume failure
     */
    public void callSessionResumeFailed(ImsReasonInfo reasonInfo) throws RemoteException {
        mListener.callSessionResumeFailed(reasonInfo);
    }

    /**
     * Called when the session resume is received from the remote user.
     */
    public void callSessionResumeReceived(ImsCallProfile profile) throws RemoteException {
        mListener.callSessionResumeReceived(profile);
    }

    /**
     * Called when the session merge has been started.  At this point, the {@code newSession}
     * represents the session which has been initiated to the IMS conference server for the
     * new merged conference.
     *
     * @param newSession the session object that is merged with an active & hold session
     */
    public void callSessionMergeStarted(ImsCallSession newSession, ImsCallProfile profile)
            throws RemoteException {
        mListener.callSessionMergeStarted(newSession != null ? newSession.getSession() : null,
                profile);
    }

    /**
     * Called when the session merge is successful and the merged session is active.
     *
     * @param newSession the new session object that is used for the conference
     */
    public void callSessionMergeComplete(ImsCallSession newSession) throws RemoteException {
        mListener.callSessionMergeComplete(newSession != null ? newSession.getSession() : null);
    }

    /**
     * Called when the session merge has failed.
     *
     * @param reasonInfo detailed reason of the call merge failure
     */
    public void callSessionMergeFailed(ImsReasonInfo reasonInfo) throws RemoteException {
        mListener.callSessionMergeFailed(reasonInfo);
    }

    /**
     * Called when the session is updated (except for hold/unhold).
     */
    public void callSessionUpdated(ImsCallProfile profile) throws RemoteException {
        mListener.callSessionUpdated(profile);
    }

    /**
     * Called when the session update has failed.
     *
     * @param reasonInfo detailed reason of the session update failure
     */
    public void callSessionUpdateFailed(ImsReasonInfo reasonInfo) throws RemoteException {
        mListener.callSessionUpdateFailed(reasonInfo);
    }

    /**
     * Called when the session update is received from the remote user.
     */
    public void callSessionUpdateReceived(ImsCallProfile profile) throws RemoteException {
        mListener.callSessionUpdateReceived(profile);
    }

    /**
     * Called when the session has been extended to a conference session.
     *
     * @param newSession the session object that is extended to the conference
     *      from the active session
     */
    public void callSessionConferenceExtended(ImsCallSession newSession, ImsCallProfile profile)
            throws RemoteException {
        mListener.callSessionConferenceExtended(newSession != null ? newSession.getSession() : null,
                profile);
    }

    /**
     * Called when the conference extension has failed.
     *
     * @param reasonInfo detailed reason of the conference extension failure
     */
    public void callSessionConferenceExtendFailed(ImsReasonInfo reasonInfo) throws RemoteException {
        mListener.callSessionConferenceExtendFailed(reasonInfo);
    }

    /**
     * Called when the conference extension is received from the remote user.
     */
    public void callSessionConferenceExtendReceived(ImsCallSession newSession,
            ImsCallProfile profile) throws RemoteException {
        mListener.callSessionConferenceExtendReceived(newSession != null
                ? newSession.getSession() : null, profile);
    }

    /**
     * Called when the invitation request of the participants is delivered to the conference
     * server.
     */
    public void callSessionInviteParticipantsRequestDelivered() throws RemoteException {
        mListener.callSessionInviteParticipantsRequestDelivered();
    }

    /**
     * Called when the invitation request of the participants has failed.
     *
     * @param reasonInfo detailed reason of the conference invitation failure
     */
    public void callSessionInviteParticipantsRequestFailed(ImsReasonInfo reasonInfo)
            throws RemoteException {
        mListener.callSessionInviteParticipantsRequestFailed(reasonInfo);
    }

    /**
     * Called when the removal request of the participants is delivered to the conference
     * server.
     */
    public void callSessionRemoveParticipantsRequestDelivered() throws RemoteException {
        mListener.callSessionRemoveParticipantsRequestDelivered();
    }

    /**
     * Called when the removal request of the participants has failed.
     *
     * @param reasonInfo detailed reason of the conference removal failure
     */
    public void callSessionRemoveParticipantsRequestFailed(ImsReasonInfo reasonInfo)
            throws RemoteException {
        mListener.callSessionInviteParticipantsRequestFailed(reasonInfo);
    }

    /**
     * Notifies the framework of the updated Call session conference state.
     *
     * @param state the new {@link ImsConferenceState} associated with the conference.
     */
    public void callSessionConferenceStateUpdated(ImsConferenceState state) throws RemoteException {
        mListener.callSessionConferenceStateUpdated(state);
    }

    /**
     * Notifies the incoming USSD message.
     */
    public void callSessionUssdMessageReceived(int mode, String ussdMessage)
            throws RemoteException {
        mListener.callSessionUssdMessageReceived(mode, ussdMessage);
    }

    /**
     * Notifies of a case where a {@link com.android.ims.internal.ImsCallSession} may potentially
     * handover from one radio technology to another.
     *
     * @param srcAccessTech    The source radio access technology; one of the access technology
     *                         constants defined in {@link android.telephony.ServiceState}.  For
     *                         example
     *                         {@link android.telephony.ServiceState#RIL_RADIO_TECHNOLOGY_LTE}.
     * @param targetAccessTech The target radio access technology; one of the access technology
     *                         constants defined in {@link android.telephony.ServiceState}.  For
     *                         example
     *                         {@link android.telephony.ServiceState#RIL_RADIO_TECHNOLOGY_LTE}.
     */
    public void callSessionMayHandover(int srcAccessTech, int targetAccessTech)
            throws RemoteException {
        mListener.callSessionMayHandover(srcAccessTech, targetAccessTech);
    }

    /**
     * Called when session access technology changes.
     *
     * @param srcAccessTech original access technology
     * @param targetAccessTech new access technology
     * @param reasonInfo
     */
    public void callSessionHandover(int srcAccessTech, int targetAccessTech,
            ImsReasonInfo reasonInfo) throws RemoteException {
        mListener.callSessionHandover(srcAccessTech, targetAccessTech, reasonInfo);
    }

    /**
     * Called when session access technology change fails.
     *
     * @param srcAccessTech original access technology
     * @param targetAccessTech new access technology
     * @param reasonInfo handover failure reason
     */
    public void callSessionHandoverFailed(int srcAccessTech, int targetAccessTech,
            ImsReasonInfo reasonInfo) throws RemoteException {
        mListener.callSessionHandoverFailed(srcAccessTech, targetAccessTech, reasonInfo);
    }

    /**
     * Called when the TTY mode is changed by the remote party.
     *
     * @param mode one of the following: -
     *             {@link com.android.internal.telephony.Phone#TTY_MODE_OFF} -
     *             {@link com.android.internal.telephony.Phone#TTY_MODE_FULL} -
     *             {@link com.android.internal.telephony.Phone#TTY_MODE_HCO} -
     *             {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
     */
    public void callSessionTtyModeReceived(int mode) throws RemoteException {
        mListener.callSessionTtyModeReceived(mode);
    }

    /**
     * Called when the multiparty state is changed for this {@code ImsCallSession}.
     *
     * @param isMultiParty {@code true} if the session became multiparty,
     *                     {@code false} otherwise.
     */

    public void callSessionMultipartyStateChanged(boolean isMultiParty) throws RemoteException {
        mListener.callSessionMultipartyStateChanged(isMultiParty);
    }

    /**
     * Called when the supplementary service information is received for the current session.
     */
    public void callSessionSuppServiceReceived(ImsSuppServiceNotification suppSrvNotification)
            throws RemoteException {
        mListener.callSessionSuppServiceReceived(suppSrvNotification);
    }

    /**
     * Received RTT modify request from the remote party.
     *
     * @param callProfile ImsCallProfile with updated attributes
     */
    public void callSessionRttModifyRequestReceived(ImsCallProfile callProfile)
            throws RemoteException {
        mListener.callSessionRttModifyRequestReceived(callProfile);
    }

    /**
     * @param status the received response for RTT modify request.
     */
    public void callSessionRttModifyResponseReceived(int status) throws RemoteException {
        mListener.callSessionRttModifyResponseReceived(status);
    }

    /**
     * Device received RTT message from Remote UE.
     *
     * @param rttMessage RTT message received
     */
    public void callSessionRttMessageReceived(String rttMessage) throws RemoteException {
        mListener.callSessionRttMessageReceived(rttMessage);
    }
}
+339 −0

File added.

Preview size limit exceeded, changes collapsed.

+141 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.telephony.ims.internal.aidl;

import com.android.ims.ImsStreamMediaProfile;
import com.android.ims.ImsCallProfile;
import com.android.ims.ImsReasonInfo;
import com.android.ims.ImsConferenceState;
import com.android.ims.internal.IImsCallSession;
import com.android.ims.ImsSuppServiceNotification;

/**
 * A listener type for receiving notification on IMS call session events.
 * When an event is generated for an {@link IImsCallSession}, the application is notified
 * by having one of the methods called on the {@link IImsCallSessionListener}.
 * {@hide}
 */
oneway interface IImsCallSessionListener {
    /**
     * Notifies the result of the basic session operation (setup / terminate).
     */
    void callSessionProgressing(in ImsStreamMediaProfile profile);
    void callSessionInitiated(in ImsCallProfile profile);
    void callSessionInitiatedFailed(in ImsReasonInfo reasonInfo);
    void callSessionTerminated(in ImsReasonInfo reasonInfo);

    /**
     * Notifies the result of the call hold/resume operation.
     */
    void callSessionHeld(in ImsCallProfile profile);
    void callSessionHoldFailed(in ImsReasonInfo reasonInfo);
    void callSessionHoldReceived(in ImsCallProfile profile);
    void callSessionResumed(in ImsCallProfile profile);
    void callSessionResumeFailed(in ImsReasonInfo reasonInfo);
    void callSessionResumeReceived(in ImsCallProfile profile);

    /**
     * Notifies the result of call merge operation.
     */
    void callSessionMergeStarted(IImsCallSession newSession, in ImsCallProfile profile);
    void callSessionMergeComplete(IImsCallSession session);
    void callSessionMergeFailed(in ImsReasonInfo reasonInfo);

    /**
     * Notifies the result of call upgrade / downgrade or any other call updates.
     */
    void callSessionUpdated(in ImsCallProfile profile);
    void callSessionUpdateFailed(in ImsReasonInfo reasonInfo);
    void callSessionUpdateReceived(in ImsCallProfile profile);

    /**
     * Notifies the result of conference extension.
     */
    void callSessionConferenceExtended(IImsCallSession newSession, in ImsCallProfile profile);
    void callSessionConferenceExtendFailed(in ImsReasonInfo reasonInfo);
    void callSessionConferenceExtendReceived(IImsCallSession newSession,
            in ImsCallProfile profile);

    /**
     * Notifies the result of the participant invitation / removal to/from the conference session.
     */
    void callSessionInviteParticipantsRequestDelivered();
    void callSessionInviteParticipantsRequestFailed(in ImsReasonInfo reasonInfo);
    void callSessionRemoveParticipantsRequestDelivered();
    void callSessionRemoveParticipantsRequestFailed(in ImsReasonInfo reasonInfo);

    /**
     * Notifies the changes of the conference info. in the conference session.
     */
    void callSessionConferenceStateUpdated(in ImsConferenceState state);

    /**
     * Notifies the incoming USSD message.
     */
    void callSessionUssdMessageReceived(int mode, String ussdMessage);

    /**
     * Notifies of handover information for this call
     */
    void callSessionHandover(int srcAccessTech, int targetAccessTech,
            in ImsReasonInfo reasonInfo);
    void callSessionHandoverFailed(int srcAccessTech, int targetAccessTech,
            in ImsReasonInfo reasonInfo);
    void callSessionMayHandover(int srcAccessTech, int targetAccessTech);

    /**
     * Notifies the TTY mode change by remote party.
     * @param mode one of the following:
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
     * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
     */
    void callSessionTtyModeReceived(int mode);

    /**
     * Notifies of a change to the multiparty state for this {@code ImsCallSession}.
     *
     * @param session The call session.
     * @param isMultiParty {@code true} if the session became multiparty, {@code false} otherwise.
     */
    void callSessionMultipartyStateChanged(boolean isMultiParty);

    /**
     * Notifies the supplementary service information for the current session.
     */
    void callSessionSuppServiceReceived(in ImsSuppServiceNotification suppSrvNotification);

    /**
     * Device received RTT modify request from Remote UE
     * @param session ImsCallProfile with updated attribute
     */
    void callSessionRttModifyRequestReceived(in ImsCallProfile callProfile);

    /* Device issued RTT modify request and inturn received response
     * from Remote UE
     * @param status Will be one of the following values from:
     * - {@link Connection.RttModifyStatus}
     */
    void callSessionRttModifyResponseReceived(int status);

    /*
     * While in call, device received RTT message from Remote UE
     * @param rttMessage Received RTT message
     */
    void callSessionRttMessageReceived(in String rttMessage);
}
+27 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.telephony.ims.internal.aidl;

/**
 * See ImsFeature#CapabilityCallback for more information.
 * {@hide}
 */
oneway interface IImsCapabilityCallback {
    void onQueryCapabilityConfiguration(int capability, int radioTech, boolean enabled);
    void onChangeCapabilityConfigurationError(int capability, int radioTech, int reason);
    void onCapabilitiesStatusChanged(int config);
}
Loading