Merge "Add callSessionIntiating + callSessionInitatingFailed"
This commit is contained in:
@@ -11126,7 +11126,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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user