Add disconnect cause to setDisconnected.
Change-Id: I4ba9b8f47a942b82b7a3d4bed43c0ca945957592
This commit is contained in:
committed by
Santos Cordon
parent
75e1341f89
commit
20e3f02c2d
@@ -24868,7 +24868,7 @@ package android.telecomm {
|
||||
method public void notifyIncomingCall(android.telecomm.CallInfo);
|
||||
method public void setActive(java.lang.String);
|
||||
method public void setDialing(java.lang.String);
|
||||
method public void setDisconnected(java.lang.String);
|
||||
method public void setDisconnected(java.lang.String, int, java.lang.String);
|
||||
method public void setIsCompatibleWith(java.lang.String, boolean);
|
||||
method public void setOnHold(java.lang.String);
|
||||
method public void setRinging(java.lang.String);
|
||||
@@ -24954,7 +24954,7 @@ package android.telecomm {
|
||||
method protected abstract void onAudioStateChanged(android.telecomm.CallAudioState);
|
||||
method public final android.os.IBinder onBind(android.content.Intent);
|
||||
method protected abstract void setActive(java.lang.String);
|
||||
method protected abstract void setDisconnected(java.lang.String);
|
||||
method protected abstract void setDisconnected(java.lang.String, int);
|
||||
method protected abstract void setInCallAdapter(android.telecomm.InCallAdapter);
|
||||
method protected abstract void setOnHold(java.lang.String);
|
||||
}
|
||||
@@ -25120,6 +25120,50 @@ package android.telephony {
|
||||
field public static final android.os.Parcelable.Creator CREATOR;
|
||||
}
|
||||
|
||||
public class DisconnectCause {
|
||||
method public static java.lang.String toString(int);
|
||||
field public static final int BUSY = 4; // 0x4
|
||||
field public static final int CALL_BARRED = 20; // 0x14
|
||||
field public static final int CDMA_ACCESS_BLOCKED = 35; // 0x23
|
||||
field public static final int CDMA_ACCESS_FAILURE = 32; // 0x20
|
||||
field public static final int CDMA_DROP = 27; // 0x1b
|
||||
field public static final int CDMA_INTERCEPT = 28; // 0x1c
|
||||
field public static final int CDMA_LOCKED_UNTIL_POWER_CYCLE = 26; // 0x1a
|
||||
field public static final int CDMA_NOT_EMERGENCY = 34; // 0x22
|
||||
field public static final int CDMA_PREEMPTED = 33; // 0x21
|
||||
field public static final int CDMA_REORDER = 29; // 0x1d
|
||||
field public static final int CDMA_RETRY_ORDER = 31; // 0x1f
|
||||
field public static final int CDMA_SO_REJECT = 30; // 0x1e
|
||||
field public static final int CONGESTION = 5; // 0x5
|
||||
field public static final int CS_RESTRICTED = 22; // 0x16
|
||||
field public static final int CS_RESTRICTED_EMERGENCY = 24; // 0x18
|
||||
field public static final int CS_RESTRICTED_NORMAL = 23; // 0x17
|
||||
field public static final int ERROR_UNSPECIFIED = 36; // 0x24
|
||||
field public static final int FDN_BLOCKED = 21; // 0x15
|
||||
field public static final int ICC_ERROR = 19; // 0x13
|
||||
field public static final int INCOMING_MISSED = 1; // 0x1
|
||||
field public static final int INCOMING_REJECTED = 16; // 0x10
|
||||
field public static final int INVALID_CREDENTIALS = 10; // 0xa
|
||||
field public static final int INVALID_NUMBER = 7; // 0x7
|
||||
field public static final int LIMIT_EXCEEDED = 15; // 0xf
|
||||
field public static final int LOCAL = 3; // 0x3
|
||||
field public static final int LOST_SIGNAL = 14; // 0xe
|
||||
field public static final int MAXIMUM_VALID_VALUE = 36; // 0x24
|
||||
field public static final int MINIMUM_VALID_VALUE = 0; // 0x0
|
||||
field public static final int MMI = 6; // 0x6
|
||||
field public static final int NORMAL = 2; // 0x2
|
||||
field public static final int NOT_DISCONNECTED = 0; // 0x0
|
||||
field public static final int NOT_VALID = -1; // 0xffffffff
|
||||
field public static final int NUMBER_UNREACHABLE = 8; // 0x8
|
||||
field public static final int OUT_OF_NETWORK = 11; // 0xb
|
||||
field public static final int OUT_OF_SERVICE = 18; // 0x12
|
||||
field public static final int POWER_OFF = 17; // 0x11
|
||||
field public static final int SERVER_ERROR = 12; // 0xc
|
||||
field public static final int SERVER_UNREACHABLE = 9; // 0x9
|
||||
field public static final int TIMED_OUT = 13; // 0xd
|
||||
field public static final int UNOBTAINABLE_NUMBER = 25; // 0x19
|
||||
}
|
||||
|
||||
public class NeighboringCellInfo implements android.os.Parcelable {
|
||||
ctor public deprecated NeighboringCellInfo();
|
||||
ctor public deprecated NeighboringCellInfo(int, int);
|
||||
|
||||
@@ -133,10 +133,13 @@ public final class CallServiceAdapter {
|
||||
* Sets a call's state to disconnected.
|
||||
*
|
||||
* @param callId The unique ID of the call whose state is changing to disconnected.
|
||||
* @param disconnectCause The reason for the disconnection, any of
|
||||
* {@link android.telephony.DisconnectCause}.
|
||||
* @param disconnectMessage Optional call-service-provided message about the disconnect.
|
||||
*/
|
||||
public void setDisconnected(String callId) {
|
||||
public void setDisconnected(String callId, int disconnectCause, String disconnectMessage) {
|
||||
try {
|
||||
mAdapter.setDisconnected(callId);
|
||||
mAdapter.setDisconnected(callId, disconnectCause, disconnectMessage);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public abstract class InCallService extends Service {
|
||||
setActive((String) msg.obj);
|
||||
break;
|
||||
case MSG_SET_DISCONNECTED:
|
||||
setDisconnected((String) msg.obj);
|
||||
setDisconnected((String) msg.obj, msg.arg1);
|
||||
break;
|
||||
case MSG_SET_HOLD:
|
||||
setOnHold((String) msg.obj);
|
||||
@@ -93,8 +93,8 @@ public abstract class InCallService extends Service {
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public void setDisconnected(String callId) {
|
||||
mHandler.obtainMessage(MSG_SET_DISCONNECTED, callId).sendToTarget();
|
||||
public void setDisconnected(String callId, int disconnectCause) {
|
||||
mHandler.obtainMessage(MSG_SET_DISCONNECTED, disconnectCause, 0, callId).sendToTarget();
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@@ -149,12 +149,12 @@ public abstract class InCallService extends Service {
|
||||
/**
|
||||
* Indicates to the in-call app that a call has been moved to the
|
||||
* {@link CallState#DISCONNECTED} and the user should be notified.
|
||||
* TODO(santoscordon): Needs disconnect-cause either as a numberical constant, string or both
|
||||
* depending on what is ultimately needed to support all scenarios.
|
||||
*
|
||||
* @param callId The identifier of the call that was disconnected.
|
||||
* @param disconnectCause The reason for the disconnection, any of
|
||||
* {@link android.telephony.DisconnectCause}.
|
||||
*/
|
||||
protected abstract void setDisconnected(String callId);
|
||||
protected abstract void setDisconnected(String callId, int disconnectCause);
|
||||
|
||||
/**
|
||||
* Indicates to the in-call app that a call has been moved to the
|
||||
|
||||
@@ -89,8 +89,11 @@ oneway interface ICallServiceAdapter {
|
||||
* Sets a call's state to disconnected.
|
||||
*
|
||||
* @param callId The unique ID of the call whose state is changing to disconnected.
|
||||
* @param disconnectCause The reason for the disconnection, any of
|
||||
* {@link android.telephony.DisconnectCause}.
|
||||
* @param disconnectMessage The call-service-provided message about the disconnect cause.
|
||||
*/
|
||||
void setDisconnected(String callId);
|
||||
void setDisconnected(String callId, int disconnectCause, String disconnectMessage);
|
||||
|
||||
/**
|
||||
* Sets a call's state to be on hold.
|
||||
|
||||
@@ -61,12 +61,12 @@ oneway interface IInCallService {
|
||||
/**
|
||||
* Indicates to the in-call app that a call has been moved to the
|
||||
* {@link android.telecomm.CallState#DISCONNECTED} and the user should be notified.
|
||||
* TODO(santoscordon): Needs disconnect-cause either as a numberical constant, string or both
|
||||
* depending on what is ultimately needed to support all scenarios.
|
||||
*
|
||||
* @param callId The identifier of the call that was disconnected.
|
||||
* @param disconnectCause The reason for the disconnection, any of
|
||||
* {@link android.telephony.DisconnectCause}.
|
||||
*/
|
||||
void setDisconnected(String callId);
|
||||
void setDisconnected(String callId, int disconnectCause);
|
||||
|
||||
/**
|
||||
* Indicates to the in-call app that a call has been moved to the
|
||||
|
||||
@@ -17,10 +17,7 @@
|
||||
package android.telephony;
|
||||
|
||||
/**
|
||||
* Contains disconnect call causes generated by the
|
||||
* framework and the RIL.
|
||||
*
|
||||
* @hide
|
||||
* Contains disconnect call causes generated by the framework and the RIL.
|
||||
*/
|
||||
public class DisconnectCause {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user