Merge "IMS: RTT interface changes"
This commit is contained in:
@@ -345,4 +345,29 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
|
||||
public boolean isMultiparty() throws RemoteException {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Device issues RTT modify request
|
||||
* @param toProfile The profile with requested changes made
|
||||
*/
|
||||
@Override
|
||||
public void sendRttModifyRequest(ImsCallProfile toProfile) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Device responds to Remote RTT modify request
|
||||
* @param status true Accepted the request
|
||||
* false Declined the request
|
||||
*/
|
||||
@Override
|
||||
public void sendRttModifyResponse(boolean status) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Device sends RTT message
|
||||
* @param rttMessage RTT message to be sent
|
||||
*/
|
||||
@Override
|
||||
public void sendRttMessage(String rttMessage) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,5 +247,35 @@ public class ImsCallSessionListenerImplBase extends IImsCallSessionListener.Stub
|
||||
ImsSuppServiceNotification suppSrvNotification) {
|
||||
// no-op
|
||||
}
|
||||
|
||||
/**
|
||||
* Received RTT modify request from Remote Party
|
||||
* @param session The call session.
|
||||
* @param callProfile ImsCallProfile with updated attribute
|
||||
*/
|
||||
@Override
|
||||
public void callSessionRttModifyRequestReceived(IImsCallSession session,
|
||||
ImsCallProfile callProfile) {
|
||||
// no-op
|
||||
}
|
||||
|
||||
/**
|
||||
* Received response for RTT modify request
|
||||
* @param status true : Accepted the request
|
||||
* false : Declined the request
|
||||
*/
|
||||
@Override
|
||||
public void callSessionRttModifyResponseReceived(int status) {
|
||||
// no -op
|
||||
}
|
||||
|
||||
/**
|
||||
* Device received RTT message from Remote UE
|
||||
* @param rttMessage RTT message received
|
||||
*/
|
||||
@Override
|
||||
public void callSessionRttMessageReceived(String rttMessage) {
|
||||
// no-op
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -475,9 +475,15 @@ public class ImsConfig {
|
||||
*/
|
||||
public static final int VICE_SETTING_ENABLED = 65;
|
||||
|
||||
/**
|
||||
* RTT status: Enabled (1), or Disabled (0).
|
||||
* Value is in Integer format.
|
||||
*/
|
||||
public static final int RTT_SETTING_ENABLED = 66;
|
||||
|
||||
// Expand the operator config items as needed here, need to change
|
||||
// PROVISIONED_CONFIG_END after that.
|
||||
public static final int PROVISIONED_CONFIG_END = VICE_SETTING_ENABLED;
|
||||
public static final int PROVISIONED_CONFIG_END = RTT_SETTING_ENABLED;
|
||||
|
||||
// Expand the operator config items as needed here.
|
||||
}
|
||||
|
||||
@@ -72,14 +72,20 @@ public class ImsStreamMediaProfile implements Parcelable {
|
||||
public static final int VIDEO_QUALITY_VGA_LANDSCAPE = (1 << 3);
|
||||
public static final int VIDEO_QUALITY_VGA_PORTRAIT = (1 << 4);
|
||||
|
||||
/**
|
||||
* RTT Modes
|
||||
*/
|
||||
public static final int RTT_MODE_DISABLED = 0;
|
||||
public static final int RTT_MODE_FULL = 1;
|
||||
|
||||
// Audio related information
|
||||
public int mAudioQuality;
|
||||
public int mAudioDirection;
|
||||
// Video related information
|
||||
public int mVideoQuality;
|
||||
public int mVideoDirection;
|
||||
|
||||
|
||||
// Rtt related information
|
||||
public int mRttMode;
|
||||
|
||||
public ImsStreamMediaProfile(Parcel in) {
|
||||
readFromParcel(in);
|
||||
@@ -90,6 +96,7 @@ public class ImsStreamMediaProfile implements Parcelable {
|
||||
mAudioDirection = DIRECTION_SEND_RECEIVE;
|
||||
mVideoQuality = VIDEO_QUALITY_NONE;
|
||||
mVideoDirection = DIRECTION_INVALID;
|
||||
mRttMode = RTT_MODE_DISABLED;
|
||||
}
|
||||
|
||||
public ImsStreamMediaProfile(int audioQuality, int audioDirection,
|
||||
@@ -100,11 +107,16 @@ public class ImsStreamMediaProfile implements Parcelable {
|
||||
mVideoDirection = videoDirection;
|
||||
}
|
||||
|
||||
public ImsStreamMediaProfile(int rttMode) {
|
||||
mRttMode = rttMode;
|
||||
}
|
||||
|
||||
public void copyFrom(ImsStreamMediaProfile profile) {
|
||||
mAudioQuality = profile.mAudioQuality;
|
||||
mAudioDirection = profile.mAudioDirection;
|
||||
mVideoQuality = profile.mVideoQuality;
|
||||
mVideoDirection = profile.mVideoDirection;
|
||||
mRttMode = profile.mRttMode;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -112,7 +124,8 @@ public class ImsStreamMediaProfile implements Parcelable {
|
||||
return "{ audioQuality=" + mAudioQuality +
|
||||
", audioDirection=" + mAudioDirection +
|
||||
", videoQuality=" + mVideoQuality +
|
||||
", videoDirection=" + mVideoDirection + " }";
|
||||
", videoDirection=" + mVideoDirection +
|
||||
", rttMode=" + mRttMode + " }";
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -126,6 +139,7 @@ public class ImsStreamMediaProfile implements Parcelable {
|
||||
out.writeInt(mAudioDirection);
|
||||
out.writeInt(mVideoQuality);
|
||||
out.writeInt(mVideoDirection);
|
||||
out.writeInt(mRttMode);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
@@ -133,6 +147,7 @@ public class ImsStreamMediaProfile implements Parcelable {
|
||||
mAudioDirection = in.readInt();
|
||||
mVideoQuality = in.readInt();
|
||||
mVideoDirection = in.readInt();
|
||||
mRttMode = in.readInt();
|
||||
}
|
||||
|
||||
public static final Creator<ImsStreamMediaProfile> CREATOR =
|
||||
@@ -147,4 +162,20 @@ public class ImsStreamMediaProfile implements Parcelable {
|
||||
return new ImsStreamMediaProfile[size];
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Determines if it's RTT call
|
||||
* @return true if RTT call, false otherwise.
|
||||
*/
|
||||
public boolean isRttCall() {
|
||||
return (mRttMode == RTT_MODE_FULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the RttCall attribute
|
||||
*/
|
||||
public void setRttMode(int rttMode) {
|
||||
mRttMode = rttMode;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -255,4 +255,23 @@ interface IImsCallSession {
|
||||
* @return {@code True} if the session is multiparty.
|
||||
*/
|
||||
boolean isMultiparty();
|
||||
|
||||
/**
|
||||
* Device issues RTT modify request
|
||||
* @param toProfile The profile with requested changes made
|
||||
*/
|
||||
void sendRttModifyRequest(in ImsCallProfile toProfile);
|
||||
|
||||
/*
|
||||
* Device responds to Remote RTT modify request
|
||||
* @param status true : Accepted the request
|
||||
* false : Declined the request
|
||||
*/
|
||||
void sendRttModifyResponse(in boolean status);
|
||||
|
||||
/*
|
||||
* Device sends RTT message
|
||||
* @param rttMessage RTT message to be sent
|
||||
*/
|
||||
void sendRttMessage(in String rttMessage);
|
||||
}
|
||||
|
||||
@@ -130,4 +130,24 @@ interface IImsCallSessionListener {
|
||||
*/
|
||||
void callSessionSuppServiceReceived(in IImsCallSession session,
|
||||
in ImsSuppServiceNotification suppSrvNotification);
|
||||
|
||||
/**
|
||||
* Device received RTT modify request from Remote UE
|
||||
* @param session ImsCallProfile with updated attribute
|
||||
*/
|
||||
void callSessionRttModifyRequestReceived(in IImsCallSession session,
|
||||
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(in int status);
|
||||
|
||||
/*
|
||||
* While in call, device received RTT message from Remote UE
|
||||
* @param rttMessage Received RTT message
|
||||
*/
|
||||
void callSessionRttMessageReceived(in String rttMessage);
|
||||
}
|
||||
|
||||
@@ -403,6 +403,28 @@ public class ImsCallSession {
|
||||
public void callSessionSuppServiceReceived(ImsCallSession session,
|
||||
ImsSuppServiceNotification suppServiceInfo) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Received RTT modify request from Remote Party
|
||||
*/
|
||||
public void callSessionRttModifyRequestReceived(ImsCallSession session,
|
||||
ImsCallProfile callProfile) {
|
||||
// no-op
|
||||
}
|
||||
|
||||
/**
|
||||
* Received response for RTT modify request
|
||||
*/
|
||||
public void callSessionRttModifyResponseReceived(int status) {
|
||||
// no -op
|
||||
}
|
||||
|
||||
/**
|
||||
* Device received RTT message from Remote UE
|
||||
*/
|
||||
public void callSessionRttMessageReceived(String rttMessage) {
|
||||
// no-op
|
||||
}
|
||||
}
|
||||
|
||||
private final IImsCallSession miSession;
|
||||
@@ -943,6 +965,57 @@ public class ImsCallSession {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends Rtt Message
|
||||
*
|
||||
* @param rttMessage rtt text to be sent
|
||||
* @throws ImsException if call is absent
|
||||
*/
|
||||
public void sendRttMessage(String rttMessage) {
|
||||
if (mClosed) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
miSession.sendRttMessage(rttMessage);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends RTT Upgrade request
|
||||
*
|
||||
* @param to : expected profile
|
||||
* @throws CallStateException
|
||||
*/
|
||||
public void sendRttModifyRequest(ImsCallProfile to) {
|
||||
if (mClosed) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
miSession.sendRttModifyRequest(to);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends RTT Upgrade response
|
||||
*
|
||||
* @param response : response for upgrade
|
||||
* @throws CallStateException
|
||||
*/
|
||||
public void sendRttModifyResponse(boolean response) {
|
||||
if (mClosed) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
miSession.sendRttModifyResponse(response);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A listener type for receiving notification on IMS call session events.
|
||||
* When an event is generated for an {@link IImsCallSession},
|
||||
@@ -1267,6 +1340,36 @@ public class ImsCallSession {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Received RTT modify request from remote party
|
||||
*/
|
||||
@Override
|
||||
public void callSessionRttModifyRequestReceived(IImsCallSession session,
|
||||
ImsCallProfile callProfile) {
|
||||
if (mListener != null) {
|
||||
mListener.callSessionRttModifyRequestReceived(ImsCallSession.this, callProfile);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Received response for RTT modify request
|
||||
*/
|
||||
@Override
|
||||
public void callSessionRttModifyResponseReceived(int status) {
|
||||
if (mListener != null) {
|
||||
mListener.callSessionRttModifyResponseReceived(status);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* RTT Message received
|
||||
*/
|
||||
@Override
|
||||
public void callSessionRttMessageReceived(String rttMessage) {
|
||||
if (mListener != null) {
|
||||
mListener.callSessionRttMessageReceived(rttMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user