Merge "IMS: Support for Implicit Call Rejection"
am: 19d032b695
Change-Id: Ic0238e05ea2682ded8420f739834df94db7c7222
This commit is contained in:
@@ -4969,6 +4969,28 @@ package android.telephony.ims {
|
||||
field public static final int CODE_RADIO_SETUP_FAILURE = 1509; // 0x5e5
|
||||
field public static final int CODE_RADIO_UPLINK_FAILURE = 1508; // 0x5e4
|
||||
field public static final int CODE_REGISTRATION_ERROR = 1000; // 0x3e8
|
||||
field public static final int CODE_REJECT_1X_COLLISION = 1603; // 0x643
|
||||
field public static final int CODE_REJECT_CALL_ON_OTHER_SUB = 1602; // 0x642
|
||||
field public static final int CODE_REJECT_CALL_TYPE_NOT_ALLOWED = 1605; // 0x645
|
||||
field public static final int CODE_REJECT_CONFERENCE_TTY_NOT_ALLOWED = 1617; // 0x651
|
||||
field public static final int CODE_REJECT_INTERNAL_ERROR = 1612; // 0x64c
|
||||
field public static final int CODE_REJECT_MAX_CALL_LIMIT_REACHED = 1608; // 0x648
|
||||
field public static final int CODE_REJECT_ONGOING_CALL_SETUP = 1607; // 0x647
|
||||
field public static final int CODE_REJECT_ONGOING_CALL_TRANSFER = 1611; // 0x64b
|
||||
field public static final int CODE_REJECT_ONGOING_CALL_UPGRADE = 1616; // 0x650
|
||||
field public static final int CODE_REJECT_ONGOING_CALL_WAITING_DISABLED = 1601; // 0x641
|
||||
field public static final int CODE_REJECT_ONGOING_CONFERENCE_CALL = 1618; // 0x652
|
||||
field public static final int CODE_REJECT_ONGOING_CS_CALL = 1621; // 0x655
|
||||
field public static final int CODE_REJECT_ONGOING_E911_CALL = 1606; // 0x646
|
||||
field public static final int CODE_REJECT_ONGOING_ENCRYPTED_CALL = 1620; // 0x654
|
||||
field public static final int CODE_REJECT_ONGOING_HANDOVER = 1614; // 0x64e
|
||||
field public static final int CODE_REJECT_QOS_FAILURE = 1613; // 0x64d
|
||||
field public static final int CODE_REJECT_SERVICE_NOT_REGISTERED = 1604; // 0x644
|
||||
field public static final int CODE_REJECT_UNKNOWN = 1600; // 0x640
|
||||
field public static final int CODE_REJECT_UNSUPPORTED_SDP_HEADERS = 1610; // 0x64a
|
||||
field public static final int CODE_REJECT_UNSUPPORTED_SIP_HEADERS = 1609; // 0x649
|
||||
field public static final int CODE_REJECT_VT_AVPF_NOT_ALLOWED = 1619; // 0x653
|
||||
field public static final int CODE_REJECT_VT_TTY_NOT_ALLOWED = 1615; // 0x64f
|
||||
field public static final int CODE_REMOTE_CALL_DECLINE = 1404; // 0x57c
|
||||
field public static final int CODE_SIP_ALTERNATE_EMERGENCY_CALL = 1514; // 0x5ea
|
||||
field public static final int CODE_SIP_BAD_ADDRESS = 337; // 0x151
|
||||
@@ -5240,6 +5262,7 @@ package android.telephony.ims.feature {
|
||||
method public android.telephony.ims.stub.ImsUtImplBase getUt();
|
||||
method public final void notifyCapabilitiesStatusChanged(android.telephony.ims.feature.MmTelFeature.MmTelCapabilities);
|
||||
method public final void notifyIncomingCall(android.telephony.ims.stub.ImsCallSessionImplBase, android.os.Bundle);
|
||||
method public final void notifyRejectedCall(android.telephony.ims.ImsCallProfile, android.telephony.ims.ImsReasonInfo);
|
||||
method public final void notifyVoiceMessageCountUpdate(int);
|
||||
method public void onFeatureReady();
|
||||
method public void onFeatureRemoved();
|
||||
|
||||
@@ -399,6 +399,160 @@ public final class ImsReasonInfo implements Parcelable {
|
||||
*/
|
||||
public static final int CODE_UNOBTAINABLE_NUMBER = 1515;
|
||||
|
||||
/**
|
||||
* The rejection cause is not known.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_UNKNOWN = 1600;
|
||||
|
||||
/**
|
||||
* Ongoing call, and call waiting is disabled.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_ONGOING_CALL_WAITING_DISABLED = 1601;
|
||||
|
||||
/**
|
||||
* A call is ongoing on another sub.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_CALL_ON_OTHER_SUB = 1602;
|
||||
|
||||
/**
|
||||
* CDMA call collision.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_1X_COLLISION = 1603;
|
||||
|
||||
/**
|
||||
* IMS is not registered for service yet.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_SERVICE_NOT_REGISTERED = 1604;
|
||||
|
||||
/**
|
||||
* The call type is not allowed on the current RAT.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_CALL_TYPE_NOT_ALLOWED = 1605;
|
||||
|
||||
/**
|
||||
* And emergency call is ongoing.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_ONGOING_E911_CALL = 1606;
|
||||
|
||||
/**
|
||||
* Another call is in the process of being establilshed.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_ONGOING_CALL_SETUP = 1607;
|
||||
|
||||
/**
|
||||
* Maximum number of allowed calls are already in progress.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_MAX_CALL_LIMIT_REACHED = 1608;
|
||||
|
||||
/**
|
||||
* Invalid/unsupported SIP headers received.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_UNSUPPORTED_SIP_HEADERS = 1609;
|
||||
|
||||
/**
|
||||
* Invalid/unsupported SDP headers received.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_UNSUPPORTED_SDP_HEADERS = 1610;
|
||||
|
||||
/**
|
||||
* A call transfer is in progress.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_ONGOING_CALL_TRANSFER = 1611;
|
||||
|
||||
/**
|
||||
* An internal error occured while processing the call.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_INTERNAL_ERROR = 1612;
|
||||
|
||||
/**
|
||||
* Call failure due to lack of dedicated bearer.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_QOS_FAILURE = 1613;
|
||||
|
||||
/**
|
||||
* A call handover is in progress.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_ONGOING_HANDOVER = 1614;
|
||||
|
||||
/**
|
||||
* Video calling not supported with TTY.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_VT_TTY_NOT_ALLOWED = 1615;
|
||||
|
||||
/**
|
||||
* A call upgrade is in progress.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_ONGOING_CALL_UPGRADE = 1616;
|
||||
|
||||
/**
|
||||
* Call from conference server, when TTY mode is ON.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_CONFERENCE_TTY_NOT_ALLOWED = 1617;
|
||||
|
||||
/**
|
||||
* A conference call is ongoing.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_ONGOING_CONFERENCE_CALL = 1618;
|
||||
|
||||
/**
|
||||
* A video call with AVPF is not supported.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_VT_AVPF_NOT_ALLOWED = 1619;
|
||||
|
||||
/**
|
||||
* And encrypted call is ongoing; other calls not supported.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_ONGOING_ENCRYPTED_CALL = 1620;
|
||||
|
||||
/**
|
||||
* A CS call is ongoing.
|
||||
* <p>
|
||||
* Used with implicit call rejection.
|
||||
*/
|
||||
public static final int CODE_REJECT_ONGOING_CS_CALL = 1621;
|
||||
|
||||
/* OEM specific error codes. To be used by OEMs when they don't want to
|
||||
reveal error code which would be replaced by ERROR_UNSPECIFIED */
|
||||
public static final int CODE_OEM_CAUSE_1 = 0xf001;
|
||||
|
||||
@@ -18,6 +18,9 @@ package android.telephony.ims.aidl;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import android.telephony.ims.ImsCallProfile;
|
||||
import android.telephony.ims.ImsReasonInfo;
|
||||
|
||||
import com.android.ims.internal.IImsCallSession;
|
||||
|
||||
/**
|
||||
@@ -26,5 +29,6 @@ import com.android.ims.internal.IImsCallSession;
|
||||
*/
|
||||
oneway interface IImsMmTelListener {
|
||||
void onIncomingCall(IImsCallSession c, in Bundle extras);
|
||||
void onRejectedCall(in ImsCallProfile callProfile, in ImsReasonInfo reason);
|
||||
void onVoiceMessageCountUpdate(int count);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ import android.telephony.ims.stub.ImsUtImplBase;
|
||||
import android.util.Log;
|
||||
|
||||
import android.telephony.ims.ImsCallProfile;
|
||||
import android.telephony.ims.ImsReasonInfo;
|
||||
import com.android.ims.internal.IImsCallSession;
|
||||
import com.android.ims.internal.IImsEcbm;
|
||||
import com.android.ims.internal.IImsMultiEndpoint;
|
||||
@@ -325,6 +326,16 @@ public class MmTelFeature extends ImsFeature {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the IMS provider implicitly rejects an incoming call during setup.
|
||||
* @param callProfile An {@link ImsCallProfile} with the call details.
|
||||
* @param reason The {@link ImsReasonInfo} reason for call rejection.
|
||||
*/
|
||||
@Override
|
||||
public void onRejectedCall(ImsCallProfile callProfile, ImsReasonInfo reason) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the Listener when the voice message count for IMS has changed.
|
||||
* @param count an integer representing the new message count.
|
||||
@@ -428,6 +439,26 @@ public class MmTelFeature extends ImsFeature {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify the framework that a call has been implicitly rejected by this MmTelFeature
|
||||
* during call setup.
|
||||
* @param callProfile The {@link ImsCallProfile} IMS call profile with details.
|
||||
* This can be null if no call information is available for the rejected call.
|
||||
* @param reason The {@link ImsReasonInfo} call rejection reason.
|
||||
*/
|
||||
public final void notifyRejectedCall(ImsCallProfile callProfile, ImsReasonInfo reason) {
|
||||
synchronized (mLock) {
|
||||
if (mListener == null) {
|
||||
throw new IllegalStateException("Session is not available.");
|
||||
}
|
||||
try {
|
||||
mListener.onRejectedCall(callProfile, reason);
|
||||
} catch (RemoteException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @hide
|
||||
|
||||
Reference in New Issue
Block a user