1 /*
2  * Copyright (c) 2013 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.ims.internal;
18 
19 import android.telephony.CallQuality;
20 import android.telephony.ims.ImsStreamMediaProfile;
21 import android.telephony.ims.ImsCallProfile;
22 import android.telephony.ims.ImsReasonInfo;
23 import android.telephony.ims.ImsConferenceState;
24 import com.android.ims.internal.IImsCallSession;
25 import android.telephony.ims.ImsSuppServiceNotification;
26 
27 /**
28  * A listener type for receiving notification on IMS call session events.
29  * When an event is generated for an {@link IImsCallSession}, the application is notified
30  * by having one of the methods called on the {@link IImsCallSessionListener}.
31  * {@hide}
32  */
33 oneway interface IImsCallSessionListener {
34     /**
35      * Notifies the result of the basic session operation (setup / terminate).
36      */
37     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionProgressing(in IImsCallSession session, in ImsStreamMediaProfile profile)38     void callSessionProgressing(in IImsCallSession session, in ImsStreamMediaProfile profile);
39     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionStarted(in IImsCallSession session, in ImsCallProfile profile)40     void callSessionStarted(in IImsCallSession session, in ImsCallProfile profile);
41     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionStartFailed(in IImsCallSession session, in ImsReasonInfo reasonInfo)42     void callSessionStartFailed(in IImsCallSession session, in ImsReasonInfo reasonInfo);
43     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionTerminated(in IImsCallSession session, in ImsReasonInfo reasonInfo)44     void callSessionTerminated(in IImsCallSession session, in ImsReasonInfo reasonInfo);
45 
46     /**
47      * Notifies the result of the call hold/resume operation.
48      */
49     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionHeld(in IImsCallSession session, in ImsCallProfile profile)50     void callSessionHeld(in IImsCallSession session, in ImsCallProfile profile);
51     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionHoldFailed(in IImsCallSession session, in ImsReasonInfo reasonInfo)52     void callSessionHoldFailed(in IImsCallSession session, in ImsReasonInfo reasonInfo);
53     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionHoldReceived(in IImsCallSession session, in ImsCallProfile profile)54     void callSessionHoldReceived(in IImsCallSession session, in ImsCallProfile profile);
55     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionResumed(in IImsCallSession session, in ImsCallProfile profile)56     void callSessionResumed(in IImsCallSession session, in ImsCallProfile profile);
57     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionResumeFailed(in IImsCallSession session, in ImsReasonInfo reasonInfo)58     void callSessionResumeFailed(in IImsCallSession session, in ImsReasonInfo reasonInfo);
59     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionResumeReceived(in IImsCallSession session, in ImsCallProfile profile)60     void callSessionResumeReceived(in IImsCallSession session, in ImsCallProfile profile);
61 
62     /**
63      * Notifies the result of call merge operation.
64      */
65     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionMergeStarted(in IImsCallSession session, in IImsCallSession newSession, in ImsCallProfile profile)66     void callSessionMergeStarted(in IImsCallSession session,
67             in IImsCallSession newSession, in ImsCallProfile profile);
68     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionMergeComplete(in IImsCallSession session)69     void callSessionMergeComplete(in IImsCallSession session);
70     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionMergeFailed(in IImsCallSession session, in ImsReasonInfo reasonInfo)71     void callSessionMergeFailed(in IImsCallSession session,
72             in ImsReasonInfo reasonInfo);
73 
74     /**
75      * Notifies the result of call upgrade / downgrade or any other call updates.
76      */
77     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionUpdated(in IImsCallSession session, in ImsCallProfile profile)78     void callSessionUpdated(in IImsCallSession session,
79             in ImsCallProfile profile);
callSessionUpdateFailed(in IImsCallSession session, in ImsReasonInfo reasonInfo)80     void callSessionUpdateFailed(in IImsCallSession session,
81             in ImsReasonInfo reasonInfo);
callSessionUpdateReceived(in IImsCallSession session, in ImsCallProfile profile)82     void callSessionUpdateReceived(in IImsCallSession session,
83             in ImsCallProfile profile);
84 
85     /**
86      * Notifies the result of conference extension.
87      */
callSessionConferenceExtended(in IImsCallSession session, in IImsCallSession newSession, in ImsCallProfile profile)88     void callSessionConferenceExtended(in IImsCallSession session,
89             in IImsCallSession newSession, in ImsCallProfile profile);
callSessionConferenceExtendFailed(in IImsCallSession session, in ImsReasonInfo reasonInfo)90     void callSessionConferenceExtendFailed(in IImsCallSession session,
91             in ImsReasonInfo reasonInfo);
callSessionConferenceExtendReceived(in IImsCallSession session, in IImsCallSession newSession, in ImsCallProfile profile)92     void callSessionConferenceExtendReceived(in IImsCallSession session,
93             in IImsCallSession newSession, in ImsCallProfile profile);
94 
95     /**
96      * Notifies the result of the participant invitation / removal to/from the conference session.
97      */
98     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionInviteParticipantsRequestDelivered(in IImsCallSession session)99     void callSessionInviteParticipantsRequestDelivered(in IImsCallSession session);
100     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionInviteParticipantsRequestFailed(in IImsCallSession session, in ImsReasonInfo reasonInfo)101     void callSessionInviteParticipantsRequestFailed(in IImsCallSession session,
102             in ImsReasonInfo reasonInfo);
callSessionRemoveParticipantsRequestDelivered(in IImsCallSession session)103     void callSessionRemoveParticipantsRequestDelivered(in IImsCallSession session);
callSessionRemoveParticipantsRequestFailed(in IImsCallSession session, in ImsReasonInfo reasonInfo)104     void callSessionRemoveParticipantsRequestFailed(in IImsCallSession session,
105             in ImsReasonInfo reasonInfo);
106 
107     /**
108      * Notifies the changes of the conference info. in the conference session.
109      */
110     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionConferenceStateUpdated(in IImsCallSession session, in ImsConferenceState state)111     void callSessionConferenceStateUpdated(in IImsCallSession session,
112             in ImsConferenceState state);
113 
114     /**
115      * Notifies the incoming USSD message.
116      */
callSessionUssdMessageReceived(in IImsCallSession session, int mode, String ussdMessage)117     void callSessionUssdMessageReceived(in IImsCallSession session,
118             int mode, String ussdMessage);
119 
120     /**
121      * Notifies of handover information for this call
122      */
123     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionHandover(in IImsCallSession session, in int srcAccessTech, in int targetAccessTech, in ImsReasonInfo reasonInfo)124     void callSessionHandover(in IImsCallSession session,
125             in int srcAccessTech, in int targetAccessTech, in ImsReasonInfo reasonInfo);
126     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionHandoverFailed(in IImsCallSession session, in int srcAccessTech, in int targetAccessTech, in ImsReasonInfo reasonInfo)127     void callSessionHandoverFailed(in IImsCallSession session,
128             in int srcAccessTech, in int targetAccessTech, in ImsReasonInfo reasonInfo);
callSessionMayHandover(in IImsCallSession session, in int srcAccessTech, in int targetAccessTech)129     void callSessionMayHandover(in IImsCallSession session,
130             in int srcAccessTech, in int targetAccessTech);
131 
132     /**
133      * Notifies the TTY mode change by remote party.
134      * @param mode one of the following:
135      * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
136      * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
137      * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
138      * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
139      */
140     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionTtyModeReceived(in IImsCallSession session, in int mode)141     void callSessionTtyModeReceived(in IImsCallSession session, in int mode);
142 
143     /**
144      * Notifies of a change to the multiparty state for this {@code ImsCallSession}.
145      *
146      * @param session The call session.
147      * @param isMultiParty {@code true} if the session became multiparty, {@code false} otherwise.
148      */
149     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionMultipartyStateChanged(in IImsCallSession session, in boolean isMultiParty)150     void callSessionMultipartyStateChanged(in IImsCallSession session, in boolean isMultiParty);
151 
152     /**
153      * Notifies the supplementary service information for the current session.
154      */
155     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
callSessionSuppServiceReceived(in IImsCallSession session, in ImsSuppServiceNotification suppSrvNotification)156     void callSessionSuppServiceReceived(in IImsCallSession session,
157          in ImsSuppServiceNotification suppSrvNotification);
158 
159     /**
160      * Device received RTT modify request from Remote UE
161      * @param session ImsCallProfile with updated attribute
162      */
callSessionRttModifyRequestReceived(in IImsCallSession session, in ImsCallProfile callProfile)163     void callSessionRttModifyRequestReceived(in IImsCallSession session,
164             in ImsCallProfile callProfile);
165 
166     /**
167      * Device issued RTT modify request and inturn received response
168      * from Remote UE
169      * @param status Will be one of the following values from:
170      * - {@link Connection.RttModifyStatus}
171      */
callSessionRttModifyResponseReceived(in int status)172     void callSessionRttModifyResponseReceived(in int status);
173 
174     /**
175      * While in call, device received RTT message from Remote UE
176      * @param rttMessage Received RTT message
177      */
callSessionRttMessageReceived(in String rttMessage)178     void callSessionRttMessageReceived(in String rttMessage);
179 
180     /**
181      * While in call, there has been a change in RTT audio indicator.
182      * @param profile updated ImsStreamMediaProfile
183      */
callSessionRttAudioIndicatorChanged(in ImsStreamMediaProfile profile)184     void callSessionRttAudioIndicatorChanged(in ImsStreamMediaProfile profile);
185 
186     /**
187      * Notifies about the response for call transfer request.
188      */
callSessionTransferred()189     void callSessionTransferred();
190 
callSessionTransferFailed(in ImsReasonInfo reasonInfo)191     void callSessionTransferFailed(in ImsReasonInfo reasonInfo);
192     /**
193      * Notifies of a change to the call quality.
194      * @param callQuality then updated call quality
195      */
callQualityChanged(in CallQuality callQuality)196     void callQualityChanged(in CallQuality callQuality);
197 }
198